The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/main: On Android prefer RGBA over BGRA VkSwapchains

BGRA is only supported on 0.1% of devices according to GPUinfo.

+17
+17
src/xrt/compositor/main/comp_settings.c
··· 46 46 if (s->use_compute) { 47 47 s->color_format = VK_FORMAT_B8G8R8A8_UNORM; 48 48 } else { 49 + #if defined(XRT_OS_ANDROID) 50 + /* 51 + * On Android the most ubiquitous sRGB format is R8G8B8A8_SRGB. 52 + * https://vulkan.gpuinfo.org/listsurfaceformats.php?platform=android 53 + */ 54 + s->color_format = VK_FORMAT_R8G8B8A8_SRGB; 55 + #elif defined(XRT_OS_LINUX) || defined(XRT_OS_WINDOWS) 56 + /* 57 + * On Linux the most ubiquitous sRGB format is B8G8R8A8_SRGB. 58 + * https://vulkan.gpuinfo.org/listsurfaceformats.php?platform=linux 59 + * 60 + * On Windows the most ubiquitous sRGB format is B8G8R8A8_SRGB. 61 + * https://vulkan.gpuinfo.org/listsurfaceformats.php?platform=windows 62 + */ 49 63 s->color_format = VK_FORMAT_B8G8R8A8_SRGB; 64 + #else 65 + #error "Need to pick default swapchain format for this platform!" 66 + #endif 50 67 } 51 68 52 69 s->display = debug_get_num_option_xcb_display();