<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 22, 2017 at 6:45 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This fixes a number of new CTS tests that would crash otherwise:<br>
dEQP-VK.pipeline.render_to_<wbr>image.*<br>
---<br>
src/intel/vulkan/genX_cmd_<wbr>buffer.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/genX_cmd_<wbr>buffer.c b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
index 40a72f4..cdd4501 100644<br>
--- a/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
+++ b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
@@ -2270,7 +2270,8 @@ cmd_buffer_emit_depth_stencil(<wbr>struct anv_cmd_buffer *cmd_buffer)<br>
assert(image->depth_surface.<wbr>isl.dim != ISL_SURF_DIM_3D);<br>
db.Depth =<br>
db.RenderTargetViewExtent =<br>
- iview->isl.array_len - iview->isl.base_array_layer - 1;<br>
+ iview->isl.array_len <= iview->isl.base_array_layer<br>
+ ? 0 : iview->isl.array_len - iview->isl.base_array_layer - 1;<br></blockquote><div><br></div><div>I think both the old code and the new code is broken. :( I believe what we actually want here is just array_len; we don't want to subtract base_array_layer.<br><br></div><div>Does using just iview->isl.array_len fix the issue?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
#if GEN_GEN >= 8<br>
db.SurfaceQPitch =<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
______________________________<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>
</font></span></blockquote></div><br></div></div>