Skip to content

Commit d3ae45d

Browse files
committed
Merge pull request godotengine#105708 from dsnopek/openxr-foveated-no-vulkan
OpenXR: Fix building foveation extension without Vulkan
2 parents 760fb30 + 1ca9372 commit d3ae45d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/openxr/extensions/openxr_fb_foveation_extension.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ HashMap<String, bool *> OpenXRFBFoveationExtension::get_requested_extensions() {
7272
request_extensions[XR_FB_FOVEATION_EXTENSION_NAME] = &fb_foveation_ext;
7373
request_extensions[XR_FB_FOVEATION_CONFIGURATION_EXTENSION_NAME] = &fb_foveation_configuration_ext;
7474

75+
#ifdef XR_USE_GRAPHICS_API_VULKAN
7576
if (rendering_driver == "vulkan") {
7677
request_extensions[XR_FB_FOVEATION_VULKAN_EXTENSION_NAME] = &fb_foveation_vulkan_ext;
7778
}
79+
#endif // XR_USE_GRAPHICS_API_VULKAN
7880

7981
return request_extensions;
8082
}
@@ -97,9 +99,11 @@ void OpenXRFBFoveationExtension::on_instance_destroyed() {
9799

98100
bool OpenXRFBFoveationExtension::is_enabled() const {
99101
bool enabled = swapchain_update_state_ext != nullptr && swapchain_update_state_ext->is_enabled() && fb_foveation_ext && fb_foveation_configuration_ext;
102+
#ifdef XR_USE_GRAPHICS_API_VULKAN
100103
if (rendering_driver == "vulkan") {
101104
enabled = enabled && fb_foveation_vulkan_ext;
102105
}
106+
#endif // XR_USE_GRAPHICS_API_VULKAN
103107
return enabled;
104108
}
105109

0 commit comments

Comments
 (0)