<div dir="ltr">Reviewed-by: Alex Smith <<a href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 January 2018 at 15:14, Samuel Pitoiset <span dir="ltr"><<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Reviewed-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>><div class="HOEnZb"><div class="h5"><br>
<br>
On 01/19/2018 03:11 PM, Matthew Nicholls wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cc: <a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop.<wbr>org</a><br>
---<br>
  src/amd/vulkan/radv_meta_clear<wbr>.c | 6 ++++++<br>
  1 file changed, 6 insertions(+)<br>
<br>
diff --git a/src/amd/vulkan/radv_meta_cle<wbr>ar.c b/src/amd/vulkan/radv_meta_cle<wbr>ar.c<br>
index b42ecedfc9..98fb8fa6a7 100644<br>
--- a/src/amd/vulkan/radv_meta_cle<wbr>ar.c<br>
+++ b/src/amd/vulkan/radv_meta_cle<wbr>ar.c<br>
@@ -624,6 +624,7 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer,<br>
                              VK_SHADER_STAGE_VERTEX_BIT, 0, 4,<br>
                              &clear_value.depth);<br>
  +     uint32_t prev_reference = cmd_buffer->state.dynamic.sten<wbr>cil_reference.front;<br>
        if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {<br>
                radv_CmdSetStencilReference(cm<wbr>d_buffer_h, VK_STENCIL_FACE_FRONT_BIT,<br>
                                                  clear_value.stencil);<br>
@@ -658,6 +659,11 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer,<br>
        radv_CmdSetScissor(radv_cmd_bu<wbr>ffer_to_handle(cmd_buffer), 0, 1, &clear_rect->rect);<br>
        radv_CmdDraw(cmd_buffer_h, 3, clear_rect->layerCount, 0, clear_rect->baseArrayLayer);<br>
+<br>
+       if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {<br>
+               radv_CmdSetStencilReference(c<wbr>md_buffer_h, VK_STENCIL_FACE_FRONT_BIT,<br>
+                                                 prev_reference);<br>
+       }<br>
  }<br>
    static bool<br>
<br>
</blockquote>
</div></div></blockquote></div><br></div>