1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

OpenXR: Fix building with vulkan=no

This commit is contained in:
David Snopek
2025-12-02 10:04:15 -06:00
parent f5918a9d35
commit 59e83a5c14
2 changed files with 6 additions and 0 deletions

View File

@@ -63,10 +63,12 @@ OpenXRFBFoveationExtension::OpenXRFBFoveationExtension(const String &p_rendering
meta_foveation_eye_tracked_properties.next = nullptr;
meta_foveation_eye_tracked_properties.supportsFoveationEyeTracked = XR_FALSE;
#ifdef VULKAN_ENABLED
meta_vulkan_swapchain_create_info.type = XR_TYPE_VULKAN_SWAPCHAIN_CREATE_INFO_META;
meta_vulkan_swapchain_create_info.next = nullptr;
meta_vulkan_swapchain_create_info.additionalCreateFlags = VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM;
meta_vulkan_swapchain_create_info.additionalUsageFlags = 0;
#endif
if (rendering_driver == "opengl3") {
swapchain_create_info_foveation_fb.flags = XR_SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FB;
@@ -144,10 +146,12 @@ void *OpenXRFBFoveationExtension::set_swapchain_create_info_and_get_next_pointer
swapchain_create_info_foveation_fb.next = next;
next = &swapchain_create_info_foveation_fb;
#ifdef VULKAN_ENABLED
if (meta_foveation_eye_tracked_ext && meta_vulkan_swapchain_create_info_ext && meta_foveation_eye_tracked_properties.supportsFoveationEyeTracked) {
meta_vulkan_swapchain_create_info.next = next;
next = &meta_vulkan_swapchain_create_info;
}
#endif
}
return next;

View File

@@ -107,7 +107,9 @@ private:
// Enable eye tracked foveation
XrSystemFoveationEyeTrackedPropertiesMETA meta_foveation_eye_tracked_properties;
XrFoveationEyeTrackedProfileCreateInfoMETA meta_foveation_eye_tracked_create_info;
#ifdef VULKAN_ENABLED
XrVulkanSwapchainCreateInfoMETA meta_vulkan_swapchain_create_info;
#endif
// OpenXR API call wrappers
EXT_PROTO_XRRESULT_FUNC3(xrCreateFoveationProfileFB, (XrSession), session, (const XrFoveationProfileCreateInfoFB *), create_info, (XrFoveationProfileFB *), profile);