MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_GetDeviceExtensionsVk

Function ovr_GetDeviceExtensionsVk

ReviveXR/REV_CAPI_Vk.cpp:61–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60OVR_PUBLIC_FUNCTION(ovrResult)
61ovr_GetDeviceExtensionsVk(
62 ovrGraphicsLuid luid,
63 char* extensionNames,
64 uint32_t* inoutExtensionNamesSize)
65{
66 if (!inoutExtensionNamesSize)
67 ovrError_InvalidParameter;
68
69 if (Runtime::Get().Supports(XR_KHR_VULKAN_ENABLE_EXTENSION_NAME))
70 {
71 XR_FUNCTION(g_Instance, GetVulkanDeviceExtensionsKHR);
72
73 XrSystemId system;
74 XrSystemGetInfo info = XR_TYPE(SYSTEM_GET_INFO);
75 info.formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
76 CHK_XR(xrGetSystem(g_Instance, &info, &system));
77 CHK_XR(GetVulkanDeviceExtensionsKHR(g_Instance, system, *inoutExtensionNamesSize, inoutExtensionNamesSize, extensionNames));
78 }
79 else
80 {
81 uint32_t size = *inoutExtensionNamesSize;
82 *inoutExtensionNamesSize = 1;
83
84 if (extensionNames && size >= 1)
85 *extensionNames = '\0';
86 if (size < 1)
87 return ovrError_InsufficientArraySize;
88 }
89 return ovrSuccess;
90}
91
92OVR_PUBLIC_FUNCTION(ovrResult)
93ovr_GetSessionPhysicalDeviceVk(

Callers

nothing calls this directly

Calls 1

SupportsMethod · 0.80

Tested by

no test coverage detected