mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 15:20:17 +01:00
v3dv: only clear depth/stencil attachments if any aspect needs clearing
When we can't perform the clears using the TLB and fallback to vkCmdClearAttachments make sure we only emit the clear if any of the depth/stencil aspects actually needs it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
c4564f62aa
commit
c5d07802dc
1 changed files with 7 additions and 5 deletions
|
|
@ -2046,11 +2046,13 @@ cmd_buffer_emit_subpass_clears(struct v3dv_cmd_buffer *cmd_buffer)
|
|||
if (att->desc.stencilLoadOp != VK_ATTACHMENT_LOAD_OP_CLEAR)
|
||||
aspects &= ~VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
|
||||
atts[att_count].aspectMask = aspects;
|
||||
atts[att_count].colorAttachment = 0; /* Ignored */
|
||||
atts[att_count].clearValue =
|
||||
state->attachments[ds_att_idx].vk_clear_value;
|
||||
att_count++;
|
||||
if (aspects) {
|
||||
atts[att_count].aspectMask = aspects;
|
||||
atts[att_count].colorAttachment = 0; /* Ignored */
|
||||
atts[att_count].clearValue =
|
||||
state->attachments[ds_att_idx].vk_clear_value;
|
||||
att_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue