loader: Add instance callback to set dispatchable objects
Change-Id: I73b8b6edfee491c53216b730c99a7ea34ade3b4e
This commit is contained in:
parent
4e58a0e4d8
commit
c51485f24a
@ -261,9 +261,15 @@ typedef enum VkLayerDbgAction_ {
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// CreateInstance and CreateDevice support structures
|
// CreateInstance and CreateDevice support structures
|
||||||
|
|
||||||
|
/* Sub type of structure for instance and device loader ext of CreateInfo.
|
||||||
|
* When sType == VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO
|
||||||
|
* or sType == VK_STRUCTURE_TYPE_LAYER_DEVICE_CREATE_INFO
|
||||||
|
* then VkLayerFunction indicates struct type pointed to by pNext
|
||||||
|
*/
|
||||||
typedef enum VkLayerFunction_ {
|
typedef enum VkLayerFunction_ {
|
||||||
VK_LAYER_LINK_INFO = 0,
|
VK_LAYER_LINK_INFO = 0,
|
||||||
VK_LAYER_DEVICE_INFO = 1
|
VK_LAYER_DEVICE_INFO = 1,
|
||||||
|
VK_LOADER_DISPATCH_CALLBACK = 2
|
||||||
} VkLayerFunction;
|
} VkLayerFunction;
|
||||||
|
|
||||||
typedef struct VkLayerInstanceLink_ {
|
typedef struct VkLayerInstanceLink_ {
|
||||||
@ -283,12 +289,16 @@ typedef struct VkLayerDeviceInfo_ {
|
|||||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||||
} VkLayerDeviceInfo;
|
} VkLayerDeviceInfo;
|
||||||
|
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
|
||||||
|
void *object);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO
|
VkStructureType sType; // VK_STRUCTURE_TYPE_LAYER_INSTANCE_CREATE_INFO
|
||||||
const void *pNext;
|
const void *pNext;
|
||||||
VkLayerFunction function;
|
VkLayerFunction function;
|
||||||
union {
|
union {
|
||||||
VkLayerInstanceLink *pLayerInfo;
|
VkLayerInstanceLink *pLayerInfo;
|
||||||
|
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
|
||||||
} u;
|
} u;
|
||||||
} VkLayerInstanceCreateInfo;
|
} VkLayerInstanceCreateInfo;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user