<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 9, 2017 at 8:18 PM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</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 Thursday, March 9, 2017 3:35:15 PM PST Nanley Chery wrote:<br>
> The PRMs state that this packet is 16 DWORDS long. Ensure that the last<br>
> three DWORDS are zeroed as required by the hardware when allocating a<br>
> null surface state.<br>
><br>
> Cc: <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
> Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
> ---<br>
> src/intel/isl/isl.c | 2 +-<br>
> src/mesa/drivers/dri/i965/<wbr>gen8_surface_state.c | 5 ++---<br>
> 2 files changed, 3 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c<br>
> index 6eb1e93efd..b4bdf2059a 100644<br>
> --- a/src/intel/isl/isl.c<br>
> +++ b/src/intel/isl/isl.c<br>
> @@ -56,7 +56,7 @@ static const struct {<br>
> [5] = {24, 32, 4},<br>
> [6] = {24, 32, 4},<br>
> [7] = {32, 32, 4, 24},<br>
> - [8] = {52, 64, 32, 40},<br>
> + [8] = {64, 64, 32, 40},<br>
> [9] = {64, 64, 32, 40},<br>
> };<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>gen8_surface_state.c b/src/mesa/drivers/dri/i965/<wbr>gen8_surface_state.c<br>
> index 501531d4ad..f868293217 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>gen8_surface_state.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>gen8_surface_state.c<br>
> @@ -46,10 +46,9 @@ static uint32_t *<br>
> gen8_allocate_surface_state(<wbr>struct brw_context *brw,<br>
> uint32_t *out_offset, int index)<br>
> {<br>
> - int dwords = brw->gen >= 9 ? 16 : 13;<br>
> uint32_t *surf = __brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,<br>
> - dwords * 4, 64, index, out_offset);<br>
> - memset(surf, 0, dwords * 4);<br>
> + 64, 64, index, out_offset);<br>
> + memset(surf, 0, 64);<br>
> return surf;<br>
> }<br>
><br>
><br>
<br>
</div></div>Does this actually fix anything, or just use more batch space?<br></blockquote><div><br></div><div>If you allocate more than one, it won't use any more batch space due to alignments. <br></div></div><br></div></div>