<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 13, 2018 at 4:47 PM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Feb 05, 2018 at 02:35:01PM -0800, Jason Ekstrand wrote:<br>
> ---<br>
>  src/intel/vulkan/genX_cmd_<wbr>buffer.c | 50 ++++++++++++++++++++++--------<wbr>--------<br>
>  1 file changed, 29 insertions(+), 21 deletions(-)<br>
><br>
> diff --git a/src/intel/vulkan/genX_cmd_<wbr>buffer.c b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
> index 4eee85a..2d17c28 100644<br>
> --- a/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
> +++ b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
> @@ -3255,27 +3255,6 @@ cmd_buffer_emit_depth_stencil(<wbr>struct anv_cmd_buffer *cmd_buffer)<br>
>     isl_emit_depth_stencil_hiz_s(&<wbr>device->isl_dev, dw, &info);<br>
><br>
>     cmd_buffer->state.hiz_enabled = info.hiz_usage == ISL_AUX_USAGE_HIZ;<br>
> -<br>
> -   /* We may be writing depth or stencil so we need to mark the surface.<br>
> -    * Unfortunately, there's no way to know at this point whether the depth or<br>
> -    * stencil tests used will actually write to the surface.<br>
> -    */<br>
> -   if (image && (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT)) {<br>
> -      genX(cmd_buffer_mark_image_<wbr>written)(cmd_buffer, image,<br>
> -                                          VK_IMAGE_ASPECT_DEPTH_BIT,<br>
> -                                          info.hiz_usage,<br>
> -                                          info.view->base_level,<br>
> -                                          info.view->base_array_layer,<br>
> -                                          info.view->array_len);<br>
> -   }<br>
> -   if (image && (image->aspects & VK_IMAGE_ASPECT_STENCIL_BIT)) {<br>
> -      genX(cmd_buffer_mark_image_<wbr>written)(cmd_buffer, image,<br>
> -                                          VK_IMAGE_ASPECT_STENCIL_BIT,<br>
> -                                          ISL_AUX_USAGE_NONE,<br>
> -                                          info.view->base_level,<br>
> -                                          info.view->base_array_layer,<br>
> -                                          info.view->array_len);<br>
> -   }<br>
>  }<br>
><br>
><br>
> @@ -3550,6 +3529,35 @@ cmd_buffer_begin_subpass(<wbr>struct anv_cmd_buffer *cmd_buffer,<br>
>                                               iview->planes[0].isl.base_<wbr>level,<br>
>                                               iview->planes[0].isl.base_<wbr>array_layer,<br>
>                                               fb->layers);<br>
> +      } else if (subpass->attachments[i].usage ==<br>
> +                 VK_IMAGE_USAGE_DEPTH_STENCIL_<wbr>ATTACHMENT_BIT) {<br>
> +         /* We may be writing depth or stencil so we need to mark the surface.<br>
> +          * Unfortunately, there's no way to know at this point whether the<br>
> +          * depth or stencil tests used will actually write to the surface.<br>
> +          *<br>
> +          * Even though stencil may be plane 1, it always shares a base_level<br>
> +          * with depth.<br>
> +          */<br>
> +         const struct isl_view *ds_view = &iview->planes[0].isl;<br>
> +         if (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {<br>
<br>
</div></div>I think this should be iview->aspect_mask.<span class=""><br></span></blockquote><div><br></div><div>Done.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> +            genX(cmd_buffer_mark_image_<wbr>written)(cmd_buffer, image,<br>
> +                                                VK_IMAGE_ASPECT_DEPTH_BIT,<br>
> +                                                att_state->aux_usage,<br>
> +                                                ds_view->base_level,<br>
> +                                                ds_view->base_array_layer,<br>
> +                                                fb->layers);<br>
> +         }<br>
> +         if (image->aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {<br>
<br>
</span>Same comment as above.<br></blockquote><div><br></div><div>Done.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With those two issues fixed, this patch is<br>
Reviewed-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><span class=""><br></span></blockquote><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
> +            /* Even though stencil may be plane 1, it always shares a<br>
> +             * base_level with depth.<br>
> +             */<br>
> +            genX(cmd_buffer_mark_image_<wbr>written)(cmd_buffer, image,<br>
> +                                                VK_IMAGE_ASPECT_STENCIL_BIT,<br>
> +                                                ISL_AUX_USAGE_NONE,<br>
> +                                                ds_view->base_level,<br>
> +                                                ds_view->base_array_layer,<br>
> +                                                fb->layers);<br>
> +         }<br>
>        }<br>
><br>
>        att_state->pending_clear_<wbr>aspects = 0;<br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</span>> ______________________________<wbr>_________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>