Merge pull request #95064 from RandomShaper/d3d12_flicker
D3D12: Avoid cases of redundant render target clears
This commit is contained in:
commit
43d2ab280a
|
@ -5057,6 +5057,7 @@ void RenderingDeviceDriverD3D12::command_begin_render_pass(CommandBufferID p_cmd
|
||||||
if (pass_info->attachments[i].load_op == ATTACHMENT_LOAD_OP_CLEAR) {
|
if (pass_info->attachments[i].load_op == ATTACHMENT_LOAD_OP_CLEAR) {
|
||||||
clear.aspect.set_flag(TEXTURE_ASPECT_COLOR_BIT);
|
clear.aspect.set_flag(TEXTURE_ASPECT_COLOR_BIT);
|
||||||
clear.color_attachment = i;
|
clear.color_attachment = i;
|
||||||
|
tex_info->pending_clear.remove_from_list();
|
||||||
}
|
}
|
||||||
} else if ((tex_info->desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) {
|
} else if ((tex_info->desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) {
|
||||||
if (pass_info->attachments[i].stencil_load_op == ATTACHMENT_LOAD_OP_CLEAR) {
|
if (pass_info->attachments[i].stencil_load_op == ATTACHMENT_LOAD_OP_CLEAR) {
|
||||||
|
|
Loading…
Reference in New Issue