Skip to content

wgl, d3d12: HDR support

Jesse Natalie requested to merge jenatali/mesa:gl-hdr into main

This MR enables R10G10B10A2_UNORM and R16G16B16A16_FLOAT formats for HDR in the WGL frontend and hooks them up in the d3d12 backend. R10G10B10A2 was already supported, both by the DXGI and GDI path, but R16G16B16A16 isn't supported by GDI, and so we don't claim the pixel format at all in the frontend today. I added a path in the d3d12 driver where we can support it with GDI, so we can claim the pixel format universally. Note that it just does a straight blit right now, no tonemapping, so it's not entirely correct, but better than nothing.

This change also enables single-buffered pixel formats to use the DXGI swapchain path in the d3d12 driver, as well as enabling single-buffered pixel formats to present using wglSwapBuffers in case they weren't expecting a single-buffered pixel format. Some apps just don't pay attention, and the sorting from Mesa's OpenGL32 is different from Windows.

Merge request reports