diff options
Diffstat (limited to 'intern/ghost/intern/GHOST_XrSwapchain.cpp')
-rw-r--r-- | intern/ghost/intern/GHOST_XrSwapchain.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_XrSwapchain.cpp b/intern/ghost/intern/GHOST_XrSwapchain.cpp index f50cfde0687..f7808c20112 100644 --- a/intern/ghost/intern/GHOST_XrSwapchain.cpp +++ b/intern/ghost/intern/GHOST_XrSwapchain.cpp @@ -68,7 +68,7 @@ GHOST_XrSwapchain::GHOST_XrSwapchain(GHOST_IXrGraphicsBinding &gpu_binding, "Failed to get swapchain image formats."); assert(swapchain_formats.size() == format_count); - if (!gpu_binding.chooseSwapchainFormat(swapchain_formats, &chosen_format)) { + if (!gpu_binding.chooseSwapchainFormat(swapchain_formats, chosen_format, m_is_srgb_buffer)) { throw GHOST_XrException( "Error: No format matching OpenXR runtime supported swapchain formats found."); } @@ -132,6 +132,11 @@ void GHOST_XrSwapchain::updateCompositionLayerProjectViewSubImage(XrSwapchainSub r_sub_image.imageRect.extent = {m_image_width, m_image_height}; } +bool GHOST_XrSwapchain::isBufferSRGB() +{ + return m_is_srgb_buffer; +} + void GHOST_XrSwapchain::releaseImage() { XrSwapchainImageReleaseInfo release_info = {XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO}; |