mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #11963 from iwubcode/d3d12_fix
VideoBackends: fix d3d12 error when validation layers enabled
This commit is contained in:
@ -204,21 +204,12 @@ std::unique_ptr<DXPipeline> DXPipeline::Create(const AbstractPipelineConfig& con
|
|||||||
desc.NumRenderTargets =
|
desc.NumRenderTargets =
|
||||||
static_cast<u8>(config.framebuffer_state.additional_color_attachment_count) + 1;
|
static_cast<u8>(config.framebuffer_state.additional_color_attachment_count) + 1;
|
||||||
desc.RTVFormats[0] = D3DCommon::GetRTVFormatForAbstractFormat(
|
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);
|
for (u8 i = 0; i < static_cast<u8>(config.framebuffer_state.additional_color_attachment_count);
|
||||||
i++)
|
i++)
|
||||||
{
|
{
|
||||||
// For now set all formats to be the same
|
// For now set all formats to be the same
|
||||||
desc.RTVFormats[i + 1] = D3DCommon::GetRTVFormatForAbstractFormat(
|
desc.RTVFormats[i + 1] = desc.RTVFormats[0];
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.framebuffer_state.depth_texture_format != AbstractTextureFormat::Undefined)
|
if (config.framebuffer_state.depth_texture_format != AbstractTextureFormat::Undefined)
|
||||||
|
Reference in New Issue
Block a user