mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 04:40:39 +02:00
radv: restore previous stencil reference after depth-stencil clear
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alex Smith <asmith@feralinteractive.com>
(cherry picked from commit 005375717b)
This commit is contained in:
parent
623d843692
commit
93ffa56658
1 changed files with 6 additions and 0 deletions
|
|
@ -628,6 +628,7 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer,
|
|||
VK_SHADER_STAGE_VERTEX_BIT, 0, 4,
|
||||
&clear_value.depth);
|
||||
|
||||
uint32_t prev_reference = cmd_buffer->state.dynamic.stencil_reference.front;
|
||||
if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
||||
radv_CmdSetStencilReference(cmd_buffer_h, VK_STENCIL_FACE_FRONT_BIT,
|
||||
clear_value.stencil);
|
||||
|
|
@ -662,6 +663,11 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer,
|
|||
radv_CmdSetScissor(radv_cmd_buffer_to_handle(cmd_buffer), 0, 1, &clear_rect->rect);
|
||||
|
||||
radv_CmdDraw(cmd_buffer_h, 3, clear_rect->layerCount, 0, clear_rect->baseArrayLayer);
|
||||
|
||||
if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
||||
radv_CmdSetStencilReference(cmd_buffer_h, VK_STENCIL_FACE_FRONT_BIT,
|
||||
prev_reference);
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue