wineopenxr: Support XR_KHR_vulkan_enable2 extension.

This commit is contained in:
Paul Gofman 2021-02-26 20:24:23 +03:00 committed by Andrew Eikum
parent 0a4a8b7a01
commit 7c2bd90636
5 changed files with 230 additions and 1 deletions

View File

@ -93,7 +93,6 @@ UNSUPPORTED_EXTENSIONS = [
"XR_KHR_display", # Needs WSI work.
"XR_KHR_surface_protected_capabilities",
"XR_KHR_loader_init",
"XR_KHR_vulkan_enable2",
"XR_MSFT_perception_anchor_interop",
# Device extensions
@ -166,8 +165,11 @@ FUNCTION_OVERRIDES = {
"xrGetD3D12GraphicsRequirementsKHR" : {"dispatch" : False, "driver" : True, "thunk" : False},
"xrGetVulkanGraphicsDeviceKHR" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrGetVulkanGraphicsDevice2KHR" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrGetVulkanDeviceExtensionsKHR" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrGetVulkanInstanceExtensionsKHR" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrCreateVulkanInstanceKHR" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrCreateVulkanDeviceKHR" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrPollEvent" : {"dispatch" : True, "driver" : True, "thunk" : False},
"xrEnumerateSwapchainImages" : {"dispatch" : True, "driver" : True, "thunk" : False},

View File

@ -71,6 +71,17 @@ VkInstance(WINAPI *get_native_VkInstance)(VkInstance);
VkPhysicalDevice(WINAPI *get_native_VkPhysicalDevice)(VkPhysicalDevice);
VkPhysicalDevice(WINAPI *get_wrapped_VkPhysicalDevice)(VkInstance, VkPhysicalDevice);
VkQueue(WINAPI *get_native_VkQueue)(VkQueue);
VkResult (WINAPI *create_vk_instance_with_callback)(const VkInstanceCreateInfo *create_info,
const VkAllocationCallbacks *allocator, VkInstance *instance,
VkResult (WINAPI *native_vkCreateInstance)(const VkInstanceCreateInfo *, const VkAllocationCallbacks *,
VkInstance *, void * (*)(VkInstance, const char *), void *),
void *native_vkCreateInstance_context);
VkResult (WINAPI *create_vk_device_with_callback)(VkPhysicalDevice phys_dev,
const VkDeviceCreateInfo *create_info,
const VkAllocationCallbacks *allocator, VkDevice *device,
VkResult (WINAPI *native_vkCreateDevice)(VkPhysicalDevice, const VkDeviceCreateInfo *, const VkAllocationCallbacks *,
VkDevice *, void * (*)(VkInstance, const char *), void *),
void *native_vkCreateDevice_context);
static void load_vk_unwrappers(void)
{
@ -91,6 +102,8 @@ static void load_vk_unwrappers(void)
get_native_VkPhysicalDevice = (void*)GetProcAddress(h, "__wine_get_native_VkPhysicalDevice");
get_wrapped_VkPhysicalDevice = (void*)GetProcAddress(h, "__wine_get_wrapped_VkPhysicalDevice");
get_native_VkQueue = (void*)GetProcAddress(h, "__wine_get_native_VkQueue");
create_vk_instance_with_callback = (void*)GetProcAddress(h, "__wine_create_vk_instance_with_callback");
create_vk_device_with_callback = (void*)GetProcAddress(h, "__wine_create_vk_device_with_callback");
}
#define XR_CURRENT_LOADER_API_LAYER_VERSION 1
@ -1057,6 +1070,25 @@ XrResult WINAPI wine_xrGetVulkanGraphicsDeviceKHR(XrInstance instance,
return res;
}
XrResult WINAPI wine_xrGetVulkanGraphicsDevice2KHR(XrInstance instance, const XrVulkanGraphicsDeviceGetInfoKHR *getInfo, VkPhysicalDevice *vulkanPhysicalDevice)
{
XrVulkanGraphicsDeviceGetInfoKHR our_getinfo;
XrResult res;
WINE_TRACE("instance %p, getInfo %p, vulkanPhysicalDevice %p.\n", instance, getInfo, vulkanPhysicalDevice);
if (getInfo->next)
WINE_WARN("Unsupported chained structure %p.\n", getInfo->next);
our_getinfo = *getInfo;
our_getinfo.vulkanInstance = get_native_VkInstance(our_getinfo.vulkanInstance);
res = ((wine_XrInstance *)instance)->funcs.p_xrGetVulkanGraphicsDevice2KHR(((wine_XrInstance *)instance)->instance, &our_getinfo, vulkanPhysicalDevice);
if (res == XR_SUCCESS)
*vulkanPhysicalDevice = get_wrapped_VkPhysicalDevice(getInfo->vulkanInstance, *vulkanPhysicalDevice);
return res;
}
XrResult WINAPI wine_xrGetVulkanDeviceExtensionsKHR(XrInstance instance, XrSystemId systemId, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer)
{
XrResult res;
@ -1145,6 +1177,129 @@ XrResult WINAPI wine_xrGetVulkanInstanceExtensionsKHR(XrInstance instance,
return res;
}
struct vk_create_instance_callback_context
{
wine_XrInstance *wine_instance;
const XrVulkanInstanceCreateInfoKHR *xr_create_info;
XrResult ret;
};
static VkResult WINAPI vk_create_instance_callback(const VkInstanceCreateInfo *create_info, const VkAllocationCallbacks *allocator,
VkInstance *vk_instance, void * (*pfnGetInstanceProcAddr)(VkInstance, const char *), void *context)
{
struct vk_create_instance_callback_context *c = context;
XrVulkanInstanceCreateInfoKHR our_create_info;
VkInstanceCreateInfo our_vulkan_create_info;
const char **enabled_extensions = NULL;
unsigned int i;
VkResult ret;
WINE_TRACE("create_info %p, allocator %p, vk_instance %p, pfnGetInstanceProcAddr %p, context %p.\n",
create_info, allocator, vk_instance, pfnGetInstanceProcAddr, context);
our_create_info = *c->xr_create_info;
our_create_info.pfnGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)pfnGetInstanceProcAddr;
our_create_info.vulkanCreateInfo = create_info;
our_create_info.vulkanAllocator = allocator;
for (i = 0; i < create_info->enabledExtensionCount; ++i)
if (!strcmp(create_info->ppEnabledExtensionNames[i], "VK_KHR_surface"))
break;
if (i == create_info->enabledExtensionCount)
{
our_vulkan_create_info = *create_info;
our_create_info.vulkanCreateInfo = &our_vulkan_create_info;
enabled_extensions = heap_alloc((create_info->enabledExtensionCount + 2) * sizeof(*enabled_extensions));
memcpy(enabled_extensions, create_info->ppEnabledExtensionNames,
create_info->enabledExtensionCount * sizeof(*enabled_extensions));
enabled_extensions[our_vulkan_create_info.enabledExtensionCount++] = "VK_KHR_surface";
enabled_extensions[our_vulkan_create_info.enabledExtensionCount++] = "VK_KHR_xlib_surface";
our_vulkan_create_info.ppEnabledExtensionNames = enabled_extensions;
for (i = create_info->enabledExtensionCount; i < our_vulkan_create_info.enabledExtensionCount; ++i)
WINE_TRACE("Added extension %s.\n", enabled_extensions[i]);
}
c->ret = c->wine_instance->funcs.p_xrCreateVulkanInstanceKHR(c->wine_instance->instance, &our_create_info, vk_instance, &ret);
heap_free(enabled_extensions);
return ret;
}
XrResult WINAPI wine_xrCreateVulkanInstanceKHR(XrInstance instance, const XrVulkanInstanceCreateInfoKHR *createInfo,
VkInstance *vulkanInstance, VkResult *vulkanResult)
{
struct vk_create_instance_callback_context context;
WINE_TRACE("instance %p, createInfo %p, vulkanInstance %p, vulkanResult %p.\n",
instance, createInfo, vulkanInstance, vulkanResult);
if (createInfo->createFlags)
WINE_WARN("Unexpected flags %#x.\n", createInfo->createFlags);
context.wine_instance = (wine_XrInstance *)instance;
context.xr_create_info = createInfo;
*vulkanResult = create_vk_instance_with_callback(createInfo->vulkanCreateInfo, createInfo->vulkanAllocator, vulkanInstance,
vk_create_instance_callback, &context);
if (context.ret == XR_SUCCESS && *vulkanResult != VK_SUCCESS)
WINE_WARN("winevulkan instance creation failed after native xrCreateVulkanInstanceKHR() success.\n");
WINE_TRACE("result %d, vk result %d.\n", context.ret, *vulkanResult);
return context.ret;
}
struct vk_create_device_callback_context
{
wine_XrInstance *wine_instance;
const XrVulkanDeviceCreateInfoKHR *xr_create_info;
XrResult ret;
};
static VkResult WINAPI vk_create_device_callback(VkPhysicalDevice phys_dev, const VkDeviceCreateInfo *create_info, const VkAllocationCallbacks *allocator,
VkDevice *vk_device, void * (*pfnGetInstanceProcAddr)(VkInstance, const char *), void *context)
{
struct vk_create_device_callback_context *c = context;
XrVulkanDeviceCreateInfoKHR our_create_info;
VkResult ret;
WINE_TRACE("phys_dev %p, create_info %p, allocator %p, vk_device %p, pfnGetInstanceProcAddr %p, context %p.\n",
phys_dev, create_info, allocator, vk_device, pfnGetInstanceProcAddr, context);
our_create_info = *c->xr_create_info;
our_create_info.pfnGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)pfnGetInstanceProcAddr;
our_create_info.vulkanPhysicalDevice = phys_dev;
our_create_info.vulkanCreateInfo = create_info;
our_create_info.vulkanAllocator = allocator;
c->ret = c->wine_instance->funcs.p_xrCreateVulkanDeviceKHR(c->wine_instance->instance, &our_create_info, vk_device, &ret);
return ret;
}
XrResult WINAPI wine_xrCreateVulkanDeviceKHR(XrInstance instance, const XrVulkanDeviceCreateInfoKHR *createInfo, VkDevice *vulkanDevice, VkResult *vulkanResult)
{
struct vk_create_device_callback_context context;
WINE_TRACE("instance %p, createInfo %p, vulkanDevice %p, vulkanResult %p.\n",
instance, createInfo, vulkanDevice, vulkanResult);
if (createInfo->createFlags)
WINE_WARN("Unexpected flags %#x.\n", createInfo->createFlags);
context.wine_instance = (wine_XrInstance *)instance;
context.xr_create_info = createInfo;
*vulkanResult = create_vk_device_with_callback(createInfo->vulkanPhysicalDevice, createInfo->vulkanCreateInfo,
createInfo->vulkanAllocator, vulkanDevice, vk_create_device_callback, &context);
if (context.ret == XR_SUCCESS && *vulkanResult != VK_SUCCESS)
WINE_WARN("winevulkan instance creation failed after native xrCreateVulkanInstanceKHR() success.\n");
WINE_TRACE("result %d, vk result %d.\n", context.ret, *vulkanResult);
return context.ret;
}
XrResult WINAPI wine_xrPollEvent(XrInstance instance, XrEventDataBuffer *eventData)
{
XrResult res;

View File

@ -308,6 +308,12 @@ static XrResult WINAPI wine_xrGetVisibilityMaskKHR(XrSession session, XrViewConf
return ((wine_XrSession *)session)->wine_instance->funcs.p_xrGetVisibilityMaskKHR(((wine_XrSession *)session)->session, viewConfigurationType, viewIndex, visibilityMaskType, visibilityMask);
}
static XrResult WINAPI wine_xrGetVulkanGraphicsRequirements2KHR(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkanKHR *graphicsRequirements)
{
WINE_TRACE("%p, 0x%s, %p\n", instance, wine_dbgstr_longlong(systemId), graphicsRequirements);
return ((wine_XrInstance *)instance)->funcs.p_xrGetVulkanGraphicsRequirements2KHR(((wine_XrInstance *)instance)->instance, systemId, graphicsRequirements);
}
static XrResult WINAPI wine_xrGetVulkanGraphicsRequirementsKHR(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkanKHR *graphicsRequirements)
{
WINE_TRACE("%p, 0x%s, %p\n", instance, wine_dbgstr_longlong(systemId), graphicsRequirements);
@ -485,6 +491,8 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrCreateSpatialAnchorSpaceMSFT", &wine_xrCreateSpatialAnchorSpaceMSFT},
{"xrCreateSpatialGraphNodeSpaceMSFT", &wine_xrCreateSpatialGraphNodeSpaceMSFT},
{"xrCreateSwapchain", &wine_xrCreateSwapchain},
{"xrCreateVulkanDeviceKHR", &wine_xrCreateVulkanDeviceKHR},
{"xrCreateVulkanInstanceKHR", &wine_xrCreateVulkanInstanceKHR},
{"xrDestroyAction", &wine_xrDestroyAction},
{"xrDestroyActionSet", &wine_xrDestroyActionSet},
{"xrDestroyHandTrackerEXT", &wine_xrDestroyHandTrackerEXT},
@ -527,7 +535,9 @@ static const struct openxr_func xr_dispatch_table[] =
{"xrGetViewConfigurationProperties", &wine_xrGetViewConfigurationProperties},
{"xrGetVisibilityMaskKHR", &wine_xrGetVisibilityMaskKHR},
{"xrGetVulkanDeviceExtensionsKHR", &wine_xrGetVulkanDeviceExtensionsKHR},
{"xrGetVulkanGraphicsDevice2KHR", &wine_xrGetVulkanGraphicsDevice2KHR},
{"xrGetVulkanGraphicsDeviceKHR", &wine_xrGetVulkanGraphicsDeviceKHR},
{"xrGetVulkanGraphicsRequirements2KHR", &wine_xrGetVulkanGraphicsRequirements2KHR},
{"xrGetVulkanGraphicsRequirementsKHR", &wine_xrGetVulkanGraphicsRequirementsKHR},
{"xrGetVulkanInstanceExtensionsKHR", &wine_xrGetVulkanInstanceExtensionsKHR},
{"xrLoadControllerModelMSFT", &wine_xrLoadControllerModelMSFT},
@ -601,6 +611,7 @@ static const char * const xr_extensions[] =
"XR_KHR_opengl_enable",
"XR_KHR_visibility_mask",
"XR_KHR_vulkan_enable",
"XR_KHR_vulkan_enable2",
"XR_KHR_vulkan_swapchain_format_list",
"XR_KHR_win32_convert_performance_counter_time",
"XR_MND_headless",

View File

@ -32,6 +32,8 @@ XrResult WINAPI wine_xrCreateInstance(const XrInstanceCreateInfo *createInfo, Xr
XrResult WINAPI wine_xrCreateSession(XrInstance instance, const XrSessionCreateInfo *createInfo, XrSession *session);
XrResult WINAPI wine_xrCreateSpatialAnchorMSFT(XrSession session, const XrSpatialAnchorCreateInfoMSFT *createInfo, XrSpatialAnchorMSFT *anchor) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrCreateSwapchain(XrSession session, const XrSwapchainCreateInfo *createInfo, XrSwapchain *swapchain);
XrResult WINAPI wine_xrCreateVulkanDeviceKHR(XrInstance instance, const XrVulkanDeviceCreateInfoKHR *createInfo, VkDevice *vulkanDevice, VkResult *vulkanResult) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrCreateVulkanInstanceKHR(XrInstance instance, const XrVulkanInstanceCreateInfoKHR *createInfo, VkInstance *vulkanInstance, VkResult *vulkanResult) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrDestroyHandTrackerEXT(XrHandTrackerEXT handTracker) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrDestroyInstance(XrInstance instance);
XrResult WINAPI wine_xrDestroySession(XrSession session);
@ -46,6 +48,7 @@ XrResult WINAPI wine_xrGetD3D12GraphicsRequirementsKHR(XrInstance instance, XrSy
XrResult WINAPI wine_xrGetInstanceProcAddr(XrInstance instance, const char *name, PFN_xrVoidFunction *function);
XrResult WINAPI wine_xrGetSystem(XrInstance instance, const XrSystemGetInfo *getInfo, XrSystemId *systemId);
XrResult WINAPI wine_xrGetVulkanDeviceExtensionsKHR(XrInstance instance, XrSystemId systemId, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrGetVulkanGraphicsDevice2KHR(XrInstance instance, const XrVulkanGraphicsDeviceGetInfoKHR *getInfo, VkPhysicalDevice *vulkanPhysicalDevice) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrGetVulkanGraphicsDeviceKHR(XrInstance instance, XrSystemId systemId, VkInstance vkInstance, VkPhysicalDevice *vkPhysicalDevice) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrGetVulkanInstanceExtensionsKHR(XrInstance instance, XrSystemId systemId, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer) DECLSPEC_HIDDEN;
XrResult WINAPI wine_xrPollEvent(XrInstance instance, XrEventDataBuffer *eventData);
@ -75,6 +78,8 @@ struct openxr_instance_funcs
XrResult (*p_xrCreateSpatialAnchorSpaceMSFT)(XrSession, const XrSpatialAnchorSpaceCreateInfoMSFT *, XrSpace *);
XrResult (*p_xrCreateSpatialGraphNodeSpaceMSFT)(XrSession, const XrSpatialGraphNodeSpaceCreateInfoMSFT *, XrSpace *);
XrResult (*p_xrCreateSwapchain)(XrSession, const XrSwapchainCreateInfo *, XrSwapchain *);
XrResult (*p_xrCreateVulkanDeviceKHR)(XrInstance, const XrVulkanDeviceCreateInfoKHR *, VkDevice *, VkResult *);
XrResult (*p_xrCreateVulkanInstanceKHR)(XrInstance, const XrVulkanInstanceCreateInfoKHR *, VkInstance *, VkResult *);
XrResult (*p_xrDestroyAction)(XrAction);
XrResult (*p_xrDestroyActionSet)(XrActionSet);
XrResult (*p_xrDestroyHandTrackerEXT)(XrHandTrackerEXT);
@ -112,7 +117,9 @@ struct openxr_instance_funcs
XrResult (*p_xrGetViewConfigurationProperties)(XrInstance, XrSystemId, XrViewConfigurationType, XrViewConfigurationProperties *);
XrResult (*p_xrGetVisibilityMaskKHR)(XrSession, XrViewConfigurationType, uint32_t, XrVisibilityMaskTypeKHR, XrVisibilityMaskKHR *);
XrResult (*p_xrGetVulkanDeviceExtensionsKHR)(XrInstance, XrSystemId, uint32_t, uint32_t *, char *);
XrResult (*p_xrGetVulkanGraphicsDevice2KHR)(XrInstance, const XrVulkanGraphicsDeviceGetInfoKHR *, VkPhysicalDevice *);
XrResult (*p_xrGetVulkanGraphicsDeviceKHR)(XrInstance, XrSystemId, VkInstance, VkPhysicalDevice *);
XrResult (*p_xrGetVulkanGraphicsRequirements2KHR)(XrInstance, XrSystemId, XrGraphicsRequirementsVulkanKHR *);
XrResult (*p_xrGetVulkanGraphicsRequirementsKHR)(XrInstance, XrSystemId, XrGraphicsRequirementsVulkanKHR *);
XrResult (*p_xrGetVulkanInstanceExtensionsKHR)(XrInstance, XrSystemId, uint32_t, uint32_t *, char *);
XrResult (*p_xrLoadControllerModelMSFT)(XrSession, XrControllerModelKeyMSFT, uint32_t, uint32_t *, uint8_t *);
@ -160,6 +167,8 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrCreateSpatialAnchorSpaceMSFT) \
USE_XR_FUNC(xrCreateSpatialGraphNodeSpaceMSFT) \
USE_XR_FUNC(xrCreateSwapchain) \
USE_XR_FUNC(xrCreateVulkanDeviceKHR) \
USE_XR_FUNC(xrCreateVulkanInstanceKHR) \
USE_XR_FUNC(xrDestroyAction) \
USE_XR_FUNC(xrDestroyActionSet) \
USE_XR_FUNC(xrDestroyHandTrackerEXT) \
@ -197,7 +206,9 @@ struct openxr_instance_funcs
USE_XR_FUNC(xrGetViewConfigurationProperties) \
USE_XR_FUNC(xrGetVisibilityMaskKHR) \
USE_XR_FUNC(xrGetVulkanDeviceExtensionsKHR) \
USE_XR_FUNC(xrGetVulkanGraphicsDevice2KHR) \
USE_XR_FUNC(xrGetVulkanGraphicsDeviceKHR) \
USE_XR_FUNC(xrGetVulkanGraphicsRequirements2KHR) \
USE_XR_FUNC(xrGetVulkanGraphicsRequirementsKHR) \
USE_XR_FUNC(xrGetVulkanInstanceExtensionsKHR) \
USE_XR_FUNC(xrLoadControllerModelMSFT) \

View File

@ -132,6 +132,8 @@
#define XR_HUAWEI_CONTROLLER_INTERACTION_EXTENSION_NAME "XR_HUAWEI_controller_interaction"
#define XR_VALVE_analog_threshold_SPEC_VERSION 1
#define XR_VALVE_ANALOG_THRESHOLD_EXTENSION_NAME "XR_VALVE_analog_threshold"
#define XR_KHR_vulkan_enable2_SPEC_VERSION 1
#define XR_KHR_VULKAN_ENABLE2_EXTENSION_NAME "XR_KHR_vulkan_enable2"
#define XR_KHR_composition_layer_equirect2_SPEC_VERSION 1
#define XR_KHR_COMPOSITION_LAYER_EQUIRECT2_EXTENSION_NAME "XR_KHR_composition_layer_equirect2"
#define XR_EXT_samsung_odyssey_controller_SPEC_VERSION 1
@ -611,10 +613,16 @@ typedef enum XrStructureType
XR_TYPE_VIEW_CONFIGURATION_VIEW_FOV_EPIC = 1000059000,
XR_TYPE_HOLOGRAPHIC_WINDOW_ATTACHMENT_MSFT = 1000063000,
XR_TYPE_INTERACTION_PROFILE_ANALOG_THRESHOLD_VALVE = 1000079000,
XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR = 1000090000,
XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHR = 1000090001,
XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR = 1000090003,
XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR = 1000091000,
XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB = 1000101000,
XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB = 1000108000,
XR_TYPE_BINDING_MODIFICATIONS_KHR = 1000120000,
XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR = XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR,
XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR = XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR,
XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR = XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR,
XR_STRUCTURE_TYPE_MAX_ENUM = 0x7fffffff,
} XrStructureType;
@ -690,6 +698,8 @@ typedef struct XrVector3f XrVector3f;
typedef struct XrViewConfigurationDepthRangeEXT XrViewConfigurationDepthRangeEXT;
typedef struct XrViewConfigurationView XrViewConfigurationView;
typedef struct XrViewLocateInfo XrViewLocateInfo;
typedef struct XrVulkanDeviceCreateInfoKHR XrVulkanDeviceCreateInfoKHR;
typedef struct XrVulkanInstanceCreateInfoKHR XrVulkanInstanceCreateInfoKHR;
typedef struct XrActionSetCreateInfo XrActionSetCreateInfo;
typedef struct XrActionStateFloat XrActionStateFloat;
typedef struct XrActionsSyncInfo XrActionsSyncInfo;
@ -769,6 +779,7 @@ typedef struct XrHandJointLocationEXT XrHandJointLocationEXT;
typedef struct XrHandMeshMSFT XrHandMeshMSFT;
typedef struct XrRect2Df XrRect2Df;
typedef struct XrSwapchainImageD3D11KHR XrSwapchainImageD3D11KHR;
typedef struct XrVulkanGraphicsDeviceGetInfoKHR XrVulkanGraphicsDeviceGetInfoKHR;
typedef struct XrCompositionLayerCylinderKHR XrCompositionLayerCylinderKHR;
typedef struct XrCompositionLayerProjection XrCompositionLayerProjection;
typedef struct XrFrameBeginInfo XrFrameBeginInfo;
@ -1210,6 +1221,29 @@ struct XrViewLocateInfo
XrSpace space;
};
struct XrVulkanDeviceCreateInfoKHR
{
XrStructureType type;
const void *next;
XrSystemId systemId;
XrVulkanDeviceCreateFlagsKHR createFlags;
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
VkPhysicalDevice vulkanPhysicalDevice;
const VkDeviceCreateInfo *vulkanCreateInfo;
const VkAllocationCallbacks *vulkanAllocator;
};
struct XrVulkanInstanceCreateInfoKHR
{
XrStructureType type;
const void *next;
XrSystemId systemId;
XrVulkanInstanceCreateFlagsKHR createFlags;
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
const VkInstanceCreateInfo *vulkanCreateInfo;
const VkAllocationCallbacks *vulkanAllocator;
};
struct XrActionSetCreateInfo
{
XrStructureType type;
@ -1849,6 +1883,14 @@ struct XrSwapchainImageD3D11KHR
ID3D11Texture2D *texture;
};
struct XrVulkanGraphicsDeviceGetInfoKHR
{
XrStructureType type;
const void *next;
XrSystemId systemId;
VkInstance vulkanInstance;
};
struct XrCompositionLayerCylinderKHR
{
XrStructureType type;
@ -1960,6 +2002,8 @@ typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorMSFT)(XrSession, const XrS
typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorSpaceMSFT)(XrSession, const XrSpatialAnchorSpaceCreateInfoMSFT *, XrSpace *);
typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialGraphNodeSpaceMSFT)(XrSession, const XrSpatialGraphNodeSpaceCreateInfoMSFT *, XrSpace *);
typedef XrResult (XRAPI_PTR *PFN_xrCreateSwapchain)(XrSession, const XrSwapchainCreateInfo *, XrSwapchain *);
typedef XrResult (XRAPI_PTR *PFN_xrCreateVulkanDeviceKHR)(XrInstance, const XrVulkanDeviceCreateInfoKHR *, VkDevice *, VkResult *);
typedef XrResult (XRAPI_PTR *PFN_xrCreateVulkanInstanceKHR)(XrInstance, const XrVulkanInstanceCreateInfoKHR *, VkInstance *, VkResult *);
typedef XrResult (XRAPI_PTR *PFN_xrDestroyAction)(XrAction);
typedef XrResult (XRAPI_PTR *PFN_xrDestroyActionSet)(XrActionSet);
typedef XrResult (XRAPI_PTR *PFN_xrDestroyHandTrackerEXT)(XrHandTrackerEXT);
@ -2002,7 +2046,9 @@ typedef XrResult (XRAPI_PTR *PFN_xrGetSystemProperties)(XrInstance, XrSystemId,
typedef XrResult (XRAPI_PTR *PFN_xrGetViewConfigurationProperties)(XrInstance, XrSystemId, XrViewConfigurationType, XrViewConfigurationProperties *);
typedef XrResult (XRAPI_PTR *PFN_xrGetVisibilityMaskKHR)(XrSession, XrViewConfigurationType, uint32_t, XrVisibilityMaskTypeKHR, XrVisibilityMaskKHR *);
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanDeviceExtensionsKHR)(XrInstance, XrSystemId, uint32_t, uint32_t *, char *);
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsDevice2KHR)(XrInstance, const XrVulkanGraphicsDeviceGetInfoKHR *, VkPhysicalDevice *);
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsDeviceKHR)(XrInstance, XrSystemId, VkInstance, VkPhysicalDevice *);
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsRequirements2KHR)(XrInstance, XrSystemId, XrGraphicsRequirementsVulkanKHR *);
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsRequirementsKHR)(XrInstance, XrSystemId, XrGraphicsRequirementsVulkanKHR *);
typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanInstanceExtensionsKHR)(XrInstance, XrSystemId, uint32_t, uint32_t *, char *);
typedef XrResult (XRAPI_PTR *PFN_xrLoadControllerModelMSFT)(XrSession, XrControllerModelKeyMSFT, uint32_t, uint32_t *, uint8_t *);
@ -2052,6 +2098,8 @@ XrResult XRAPI_CALL xrCreateSpatialAnchorMSFT(XrSession session, const XrSpatial
XrResult XRAPI_CALL xrCreateSpatialAnchorSpaceMSFT(XrSession session, const XrSpatialAnchorSpaceCreateInfoMSFT *createInfo, XrSpace *space);
XrResult XRAPI_CALL xrCreateSpatialGraphNodeSpaceMSFT(XrSession session, const XrSpatialGraphNodeSpaceCreateInfoMSFT *createInfo, XrSpace *space);
XrResult XRAPI_CALL xrCreateSwapchain(XrSession session, const XrSwapchainCreateInfo *createInfo, XrSwapchain *swapchain);
XrResult XRAPI_CALL xrCreateVulkanDeviceKHR(XrInstance instance, const XrVulkanDeviceCreateInfoKHR *createInfo, VkDevice *vulkanDevice, VkResult *vulkanResult);
XrResult XRAPI_CALL xrCreateVulkanInstanceKHR(XrInstance instance, const XrVulkanInstanceCreateInfoKHR *createInfo, VkInstance *vulkanInstance, VkResult *vulkanResult);
XrResult XRAPI_CALL xrDestroyAction(XrAction action);
XrResult XRAPI_CALL xrDestroyActionSet(XrActionSet actionSet);
XrResult XRAPI_CALL xrDestroyHandTrackerEXT(XrHandTrackerEXT handTracker);
@ -2094,7 +2142,9 @@ XrResult XRAPI_CALL xrGetSystemProperties(XrInstance instance, XrSystemId system
XrResult XRAPI_CALL xrGetViewConfigurationProperties(XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, XrViewConfigurationProperties *configurationProperties);
XrResult XRAPI_CALL xrGetVisibilityMaskKHR(XrSession session, XrViewConfigurationType viewConfigurationType, uint32_t viewIndex, XrVisibilityMaskTypeKHR visibilityMaskType, XrVisibilityMaskKHR *visibilityMask);
XrResult XRAPI_CALL xrGetVulkanDeviceExtensionsKHR(XrInstance instance, XrSystemId systemId, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer);
XrResult XRAPI_CALL xrGetVulkanGraphicsDevice2KHR(XrInstance instance, const XrVulkanGraphicsDeviceGetInfoKHR *getInfo, VkPhysicalDevice *vulkanPhysicalDevice);
XrResult XRAPI_CALL xrGetVulkanGraphicsDeviceKHR(XrInstance instance, XrSystemId systemId, VkInstance vkInstance, VkPhysicalDevice *vkPhysicalDevice);
XrResult XRAPI_CALL xrGetVulkanGraphicsRequirements2KHR(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkanKHR *graphicsRequirements);
XrResult XRAPI_CALL xrGetVulkanGraphicsRequirementsKHR(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkanKHR *graphicsRequirements);
XrResult XRAPI_CALL xrGetVulkanInstanceExtensionsKHR(XrInstance instance, XrSystemId systemId, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer);
XrResult XRAPI_CALL xrLoadControllerModelMSFT(XrSession session, XrControllerModelKeyMSFT modelKey, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, uint8_t *buffer);