<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 15, 2019 at 10:48 AM Rafael Antognolli <<a href="mailto:rafael.antognolli@intel.com">rafael.antognolli@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Aug 14, 2019 at 10:05:34PM -0500, Jason Ekstrand wrote:<br>
> I take it this happens when subslices_delta == 0 and we take the early return?<br>
<br>
Yes, exactly, in that case device->slice_hash is not initialized. I can<br>
add this to the commit message to make it more clear.<br></blockquote><div><br></div><div>That'd be nice.</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> On Wed, Aug 14, 2019 at 5:45 PM Rafael Antognolli <<a href="mailto:rafael.antognolli@intel.com" target="_blank">rafael.antognolli@intel.com</a>><br>
> wrote:<br>
> <br>
> I failed to initialize it on the other cases in GEN11 and it was causing<br>
> a segfault when going through anv_DestroyDevice, if compiled with<br>
> valgrind.<br>
> <br>
> Fixes: 7bc022b4bbc ("anv/gen11: Emit SLICE_HASH_TABLE when pipes are<br>
> unbalanced.)<br>
> ---<br>
> src/intel/vulkan/genX_state.c | 4 ++--<br>
> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
> <br>
> diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c<br>
> index de8b753dd34..3bf4890b4a4 100644<br>
> --- a/src/intel/vulkan/genX_state.c<br>
> +++ b/src/intel/vulkan/genX_state.c<br>
> @@ -92,6 +92,8 @@ static void<br>
> genX(emit_slice_hashing_state)(struct anv_device *device,<br>
> struct anv_batch *batch)<br>
> {<br>
> + device->slice_hash = (struct anv_state) { 0 };<br>
> +<br>
> #if GEN_GEN == 11<br>
> const unsigned *ppipe_subslices = device->info.ppipe_subslices;<br>
> int subslices_delta = ppipe_subslices[0] - ppipe_subslices[1];<br>
> @@ -156,8 +158,6 @@ genX(emit_slice_hashing_state)(struct anv_device<br>
> *device,<br>
> anv_batch_emit(batch, GENX(3DSTATE_3D_MODE), mode) {<br>
> mode.SliceHashingTableEnable = true;<br>
> }<br>
> -#else<br>
> - device->slice_hash = (struct anv_state) { 0 };<br>
> #endif<br>
> }<br>
> <br>
> --<br>
> 2.21.0<br>
> <br>
> <br>
</blockquote></div></div>