mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 17:30:29 +01:00
anv/meta_clear: Don't try to clear depth-stencil without LOAD_OP_CLEAR
This commit is contained in:
parent
438eaa3ae7
commit
83c305f8ef
1 changed files with 7 additions and 5 deletions
|
|
@ -629,20 +629,22 @@ anv_cmd_buffer_clear_attachments(struct anv_cmd_buffer *cmd_buffer,
|
|||
emit_load_color_clear(cmd_buffer, a, clear_values[a].color);
|
||||
}
|
||||
} else {
|
||||
VkImageAspectFlags aspects = 0;
|
||||
VkImageAspectFlags clear_aspects = 0;
|
||||
|
||||
if (att->format->depth_format &&
|
||||
att->load_op == VK_ATTACHMENT_LOAD_OP_CLEAR) {
|
||||
aspects |= VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
clear_aspects |= VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
}
|
||||
|
||||
if (att->format->has_stencil &&
|
||||
att->stencil_load_op == VK_ATTACHMENT_LOAD_OP_CLEAR) {
|
||||
aspects |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
clear_aspects |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
}
|
||||
|
||||
emit_load_depthstencil_clear(cmd_buffer, a, aspects,
|
||||
clear_values[a].depthStencil);
|
||||
if (clear_aspects) {
|
||||
emit_load_depthstencil_clear(cmd_buffer, a, clear_aspects,
|
||||
clear_values[a].depthStencil);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue