Merge pull request #11963 from iwubcode/d3d12_fix

VideoBackends: fix d3d12 error when validation layers enabled
This commit is contained in:
Admiral H. Curtiss 2023-06-19 00:33:40 +02:00 committed by GitHub
commit 9e06b6964b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 11 deletions

View File

@ -204,21 +204,12 @@ std::unique_ptr<DXPipeline> DXPipeline::Create(const AbstractPipelineConfig& con
desc.NumRenderTargets =
static_cast<u8>(config.framebuffer_state.additional_color_attachment_count) + 1;
desc.RTVFormats[0] = D3DCommon::GetRTVFormatForAbstractFormat(
config.framebuffer_state.color_texture_format, false);
config.framebuffer_state.color_texture_format, config.blending_state.logicopenable);
for (u8 i = 0; i < static_cast<u8>(config.framebuffer_state.additional_color_attachment_count);
i++)
{
// For now set all formats to be the same
desc.RTVFormats[i + 1] = D3DCommon::GetRTVFormatForAbstractFormat(
config.framebuffer_state.color_texture_format, false);
}
if (config.blending_state.logicopenable)
{
desc.NumRenderTargets++;
desc.RTVFormats[static_cast<u8>(config.framebuffer_state.additional_color_attachment_count) +
1] =
D3DCommon::GetRTVFormatForAbstractFormat(config.framebuffer_state.color_texture_format,
true);
desc.RTVFormats[i + 1] = desc.RTVFormats[0];
}
}
if (config.framebuffer_state.depth_texture_format != AbstractTextureFormat::Undefined)