<div dir="ltr"><div>Seems reasonable  Are you sure this isn't somehow required on old hardware?<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 3:39 AM, Samuel Iglesias Gonsálvez <span dir="ltr"><<a href="mailto:siglesias@igalia.com" target="_blank">siglesias@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From IVB PRM, SURFACE_STATE::Height:<br>
<br>
"For typed buffer and structured buffer surfaces, the number of<br>
 entries in the buffer ranges from 1 to 2^27 . For raw buffer<br>
 surfaces, the number of entries in the buffer is the number of bytes<br>
 which can range from 1 to 2^30."<br>
<br>
The minimum value is 1, according to the spec. The spec quote<br>
was already added into the code by 028f6d8317f00.<br>
<br>
Fixes crashing tests under:<br>
<br>
dEQP-VK.robustness.buffer_<wbr>access.*<br>
<br>
Signed-off-by: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
Cc: <a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
---<br>
 src/intel/isl/isl_surface_<wbr>state.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/isl/isl_surface_<wbr>state.c b/src/intel/isl/isl_surface_<wbr>state.c<br>
index 29ec289a5d..853bb11846 100644<br>
--- a/src/intel/isl/isl_surface_<wbr>state.c<br>
+++ b/src/intel/isl/isl_surface_<wbr>state.c<br>
@@ -671,7 +671,7 @@ isl_genX(buffer_fill_state_s)(<wbr>void *state,<br>
        */<br>
       if (info->format == ISL_FORMAT_RAW) {<br>
          assert(num_elements <= (1ull << 30));<br>
-         assert((num_elements & 3) == 0);<br>
+         assert(num_elements > 0);<br>
       } else {<br>
          assert(num_elements <= (1ull << 27));<br>
       }<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.0<br>
<br>
</font></span></blockquote></div><br></div>