fix d3d12 error when create backbuffer with msaa and srgb format (#2261)
This commit is contained in:
parent
95b4e6eaa5
commit
aa24588800
@ -989,7 +989,9 @@ namespace bgfx { namespace d3d12
|
||||
resourceDesc.Width = m_scd.width;
|
||||
resourceDesc.Height = m_scd.height;
|
||||
resourceDesc.MipLevels = 1;
|
||||
resourceDesc.Format = m_scd.format;
|
||||
resourceDesc.Format = (m_resolution.reset & BGFX_RESET_SRGB_BACKBUFFER)
|
||||
? s_textureFormat[m_resolution.format].m_fmtSrgb
|
||||
: s_textureFormat[m_resolution.format].m_fmt;
|
||||
resourceDesc.SampleDesc = m_scd.sampleDesc;
|
||||
resourceDesc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
|
||||
resourceDesc.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
|
||||
@ -2300,7 +2302,9 @@ namespace bgfx { namespace d3d12
|
||||
resourceDesc.Width = m_scd.width;
|
||||
resourceDesc.Height = m_scd.height;
|
||||
resourceDesc.MipLevels = 1;
|
||||
resourceDesc.Format = m_scd.format;
|
||||
resourceDesc.Format = (m_resolution.reset & BGFX_RESET_SRGB_BACKBUFFER)
|
||||
? s_textureFormat[m_resolution.format].m_fmtSrgb
|
||||
: s_textureFormat[m_resolution.format].m_fmt;
|
||||
resourceDesc.SampleDesc = m_scd.sampleDesc;
|
||||
resourceDesc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
|
||||
resourceDesc.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
|
||||
|
Loading…
Reference in New Issue
Block a user