You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix d3d12 stencil buffer not clearing
(cherry picked from commit d1246b099e)
This commit is contained in:
committed by
Thaddeus Crews
parent
da0c3122f1
commit
eed94508f0
@@ -4619,9 +4619,12 @@ void RenderingDeviceDriverD3D12::command_begin_render_pass(CommandBufferID p_cmd
|
|||||||
tex_info->pending_clear.remove_from_list();
|
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].load_op == ATTACHMENT_LOAD_OP_CLEAR) {
|
||||||
clear.aspect.set_flag(TEXTURE_ASPECT_DEPTH_BIT);
|
clear.aspect.set_flag(TEXTURE_ASPECT_DEPTH_BIT);
|
||||||
}
|
}
|
||||||
|
if (pass_info->attachments[i].stencil_load_op == ATTACHMENT_LOAD_OP_CLEAR) {
|
||||||
|
clear.aspect.set_flag(TEXTURE_ASPECT_STENCIL_BIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!clear.aspect.is_empty()) {
|
if (!clear.aspect.is_empty()) {
|
||||||
clear.value = p_attachment_clears[i];
|
clear.value = p_attachment_clears[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user