mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 20:00:11 +01:00
radv: allow clear merging for depth/stencil with no care stencil
Some of the Sascha Willems demos pick a D32/S8 format for the depth buffer, then do a LOAD_OP_CLEAR/LOAD_OP_DONT_CARE on it, which means we don't get to merge the undefined->depth and clear htile transitions. This add the stencil aspect to the pending clears if there is a depth clear pending and the stencil aspect is don't care. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
373f707fbb
commit
b86f86f55c
1 changed files with 3 additions and 0 deletions
|
|
@ -1824,6 +1824,9 @@ radv_cmd_state_setup_attachments(struct radv_cmd_buffer *cmd_buffer,
|
|||
if ((att_aspects & VK_IMAGE_ASPECT_DEPTH_BIT) &&
|
||||
att->load_op == VK_ATTACHMENT_LOAD_OP_CLEAR) {
|
||||
clear_aspects |= VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
if ((att_aspects & VK_IMAGE_ASPECT_STENCIL_BIT) &&
|
||||
att->stencil_load_op == VK_ATTACHMENT_LOAD_OP_DONT_CARE)
|
||||
clear_aspects |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
}
|
||||
if ((att_aspects & VK_IMAGE_ASPECT_STENCIL_BIT) &&
|
||||
att->stencil_load_op == VK_ATTACHMENT_LOAD_OP_CLEAR) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue