The open source OpenXR runtime

c/main: Move A2B10G10R10 format to top, and add 16-bit float format.

10bit colour is the native format of the PSVR2. I'm not sure which should go first since on
displays which natively support float formats you would likely want that to come first.
However, since no other HMDs support 10bit colour or floating point formats to my knowledge,
this is fine for now.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2488>

authored by

Beyley Cardellio and committed by
Marge Bot
fdfcc2e4 d56ce58a

+11 -6
+11 -6
src/xrt/compositor/main/comp_settings.c
··· 67 67 s->use_compute = debug_get_bool_option_compute(); 68 68 69 69 if (s->use_compute) { 70 - // This was the default before, keep it first. 70 + // Tested working with a PSVR2 and a patched Mesa. Native format of the PSVR2. 10-bit formats should be 71 + // preferred in all cases for lower colour banding. 72 + add_format(s, VK_FORMAT_A2B10G10R10_UNORM_PACK32); 73 + 74 + // Default 8-bit channel 32-bit pixel format, most commonly supported UNORM format across Windows and 75 + // Linux. 71 76 add_format(s, VK_FORMAT_B8G8R8A8_UNORM); 72 77 73 - // This is according to GPU info more supported. 74 - add_format(s, VK_FORMAT_B8G8R8A8_UNORM); 78 + // Next most common UNORM format. 79 + add_format(s, VK_FORMAT_R8G8B8A8_UNORM); 75 80 76 81 // Seen on some NVIDIA cards. 77 82 add_format(s, VK_FORMAT_A8B8G8R8_UNORM_PACK32); 78 83 79 - // Untested: 30 bit format, should we move this higher up? 80 - add_format(s, VK_FORMAT_A2B10G10R10_UNORM_PACK32); 84 + // 32-bit formats should be preferred over a 64-bit format, for performance/memory reasons. 85 + add_format(s, VK_FORMAT_R16G16B16A16_SFLOAT); 81 86 82 - // Untested: Super constrained platforms. 87 + // Untested: Super constrained platforms. Absolute last resort. 83 88 add_format(s, VK_FORMAT_A1R5G5B5_UNORM_PACK16); 84 89 } else { 85 90 #if defined(XRT_OS_ANDROID)