mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #113277 from blueskythlikesclouds/d3d12-framebuffer-clear-fix
Fix framebuffers getting cleared multiple times on D3D12.
This commit is contained in:
commit
2e4d5c261f
1 changed files with 1 additions and 3 deletions
|
|
@ -4752,7 +4752,6 @@ void RenderingDeviceDriverD3D12::command_begin_render_pass(CommandBufferID p_cmd
|
|||
command_next_render_subpass(p_cmd_buffer, p_cmd_buffer_type);
|
||||
|
||||
AttachmentClear *clears = ALLOCA_ARRAY(AttachmentClear, pass_info->attachments.size());
|
||||
Rect2i *clear_rects = ALLOCA_ARRAY(Rect2i, pass_info->attachments.size());
|
||||
uint32_t num_clears = 0;
|
||||
|
||||
for (uint32_t i = 0; i < pass_info->attachments.size(); i++) {
|
||||
|
|
@ -4778,13 +4777,12 @@ void RenderingDeviceDriverD3D12::command_begin_render_pass(CommandBufferID p_cmd
|
|||
if (!clear.aspect.is_empty()) {
|
||||
clear.value = p_attachment_clears[i];
|
||||
clears[num_clears] = clear;
|
||||
clear_rects[num_clears] = p_rect;
|
||||
num_clears++;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_clears) {
|
||||
command_render_clear_attachments(p_cmd_buffer, VectorView(clears, num_clears), VectorView(clear_rects, num_clears));
|
||||
command_render_clear_attachments(p_cmd_buffer, VectorView(clears, num_clears), VectorView(p_rect));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue