Skip to content

Commit

Permalink
Merge pull request #11963 from iwubcode/d3d12_fix
Browse files Browse the repository at this point in the history
VideoBackends: fix d3d12 error when validation layers enabled
  • Loading branch information
AdmiralCurtiss committed Jun 18, 2023
2 parents 8039d10 + ba74902 commit 9e06b69
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 9e06b69

Please sign in to comment.