Fix D3D11 exception with srgb backbuffer

This commit is contained in:
Gary Hsu 2019-11-15 14:52:59 -08:00 committed by Бранимир Караџић
parent c7d986f729
commit 9ec0fd243a

View File

@ -2389,7 +2389,10 @@ namespace bgfx { namespace d3d11
m_scd.width = _resolution.width;
m_scd.height = _resolution.height;
m_scd.format = s_textureFormat[_resolution.format].m_fmt;
m_scd.format = (_resolution.reset & BGFX_RESET_SRGB_BACKBUFFER)
? s_textureFormat[_resolution.format].m_fmtSrgb
: s_textureFormat[_resolution.format].m_fmt
;
preReset();