Possibly incorrect swap chain color space treatment
In Vulkan, when creating a swapchain, you can specify the color space as a separate field from the image format: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VkSwapchainCreateInfoKHR However, there is no such field in the OpenXR equivalent: https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSwapchainCreateInfo The only mention of the color space in the OpenXR docs states, that
Images submitted in sRGB color space must be created using an API-specific sRGB format (e.g. DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, GL_SRGBA, VK_FORMAT_R8G8B8A8_SRGB) to apply automatic sRGB-to-linear conversion when read by the runtime. All other formats will be treated as linear values.
Despite using the B8G8R8A8_SRGB
format, the image appears to be darker in the HMD, as seen in this demo: https://streamable.com/081e7
This might be an indication that there is a bug in the implementation in Monado. However, I am not 100% sure that my own code is correct, either.