diff options
author | Rafael Antognolli <[email protected]> | 2019-08-14 15:13:55 -0700 |
---|---|---|
committer | Rafael Antognolli <[email protected]> | 2019-08-15 09:42:48 -0700 |
commit | ceeaf93c8e0ac502410da82e07aa25b15b065b9c (patch) | |
tree | 9078159e17ad7dc83a3c026d8c8975a0e5842b47 | |
parent | 72354d43d405624f09182fe8dfe3bea1a35a9194 (diff) |
anv: Properly initialize device->slice_hash.
When subslices_delta == 0 and we take the early return,
device->slice_hash is not initialized on GEN11. It then causes a
segfault when going through anv_DestroyDevice, if compiled with
valgrind.
Fixes: 7bc022b4bbc ("anv/gen11: Emit SLICE_HASH_TABLE when pipes are
unbalanced.)
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/intel/vulkan/genX_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c index de8b753dd34..3bf4890b4a4 100644 --- a/src/intel/vulkan/genX_state.c +++ b/src/intel/vulkan/genX_state.c @@ -92,6 +92,8 @@ static void genX(emit_slice_hashing_state)(struct anv_device *device, struct anv_batch *batch) { + device->slice_hash = (struct anv_state) { 0 }; + #if GEN_GEN == 11 const unsigned *ppipe_subslices = device->info.ppipe_subslices; int subslices_delta = ppipe_subslices[0] - ppipe_subslices[1]; @@ -156,8 +158,6 @@ genX(emit_slice_hashing_state)(struct anv_device *device, anv_batch_emit(batch, GENX(3DSTATE_3D_MODE), mode) { mode.SliceHashingTableEnable = true; } -#else - device->slice_hash = (struct anv_state) { 0 }; #endif } |