<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Feb 22, 2017 11:17 PM, "Samuel Iglesias Gonsálvez" <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text"><br>
<br>
On 22/02/17 17:32, Jason Ekstrand wrote:<br>
> Seems reasonable Are you sure this isn't somehow required on old hardware?<br>
><br>
<br>
</div>This assert is inside if (gen >= 7) block. I have checked all gen7+<br>
specs and they all say the same.<br>
<br>
What I saw was that for PLANAR* surface formats, num_elements must be a<br>
multiple of 4, which is what we were asserting before. However as we are<br>
asserting the limits for raw surfaces, this doesn't apply here.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Sounds good to me</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> <mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>>><br>
><br>
<br>
Thanks!<br>
<br>
Sam<br>
<div class="quoted-text"><br>
> On Wed, Feb 22, 2017 at 3:39 AM, Samuel Iglesias Gonsálvez<br>
</div><div class="quoted-text">> <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a> <mailto:<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>>> wrote:<br>
><br>
> 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>
</div>> <mailto:<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>>><br>
> Cc: <a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a> <mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
<div class="elided-text">> ---<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<br>
> 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>
> --<br>
> 2.11.0<br>
><br>
><br>
<br>
</div></blockquote></div><br></div></div></div>