From 9991b63259d72b3e77358d91f1823ec80da216cc Mon Sep 17 00:00:00 2001 From: Elliot Cuzzillo Date: Thu, 13 Aug 2020 16:00:35 -0700 Subject: [PATCH] improve explanatory comment about _SRGB backbuffers (#2230) --- src/renderer_d3d11.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index b799cf4b0..1ca724a48 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -1011,12 +1011,10 @@ namespace bgfx { namespace d3d11 m_scd.height = _init.resolution.height; /* - * Previously, this checked for BGFX_RESET_SRGB_BACKBUFFER and used m_fmtSrgb as the backbuffer format - * instead of m_fmt. - * - * However, according to https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/converting-data-color-space , - * this is not actually required, because you can create the render target view with m_fmtSrgb, and it will work - * identically. + * According to https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/converting-data-color-space , + * it is OK to create the backbuffer with m_fmt (a non- _SRGB format), and then create the render target view into it + * with m_fmtSrgb (the _SRGB format of same), and it will work identically as if you had created the swapchain with + * m_fmtSrgb as the backbuffer format. * * Moreover, it is actually not desirable to create the backbuffer with an _SRGB format, because that * is incompatible with the flip presentation model, which is desirable for various reasons including