mesa/src/intel
Lionel Landwerlin cab7ba00e2 anv: fix push descriptor deferred surface state packing
Yuzu is running into a segfault because it writes the push descriptor
twice with 2 different layouts, but without a draw/dispatch in
between.

First vkCmdPushDescriptorSetKHR() writes descriptor 0 & 1 with a
uniform buffer. We toggle the 2 first bits of
anv_descriptor_set::generate_surface_states.

Second vkCmdPushDescriptorSetKHR() writes descriptor 0 with uniform
buffer and descriptor 1 with an image view. The first bit of
anv_descriptor_set::generate_surface_states stays, but the second bit
was already set before and it should now be off.

When we finally flush the push descriptor, we try to generate a
surface state for descriptor 1, but there is no valid buffer view for
it, we access an invalid pointer and segfault.

This fix resets the anv_descriptor_set::generate_surface_states when
the descriptor layout changes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b49b18f0b7 ("anv: reduce BT emissions & surface state writes with push descriptors")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23156>
2023-05-22 10:50:26 +00:00
..
blorp nir: Drop unused name from nir_ssa_dest_init 2023-05-17 23:46:16 +00:00
ci anv/ci: Add tests for video formats to the failing tests. 2023-05-19 06:15:02 +00:00
common intel: Secondary CB print primary CB's renderpass 2023-05-12 21:15:09 +00:00
compiler intel/compiler: Fix 64-bit ufind_msb, find_lsb, and bit_count 2023-05-19 22:44:37 +00:00
dev intel/devinfo: call intel_device_info_init_was only once 2023-05-16 19:32:41 +00:00
ds meson: remove needless c++17-overrides 2023-05-19 12:45:31 +00:00
genxml intel/genxml: add a command VD_CONTROL_STATE to gen12/125 2023-05-19 06:15:01 +00:00
isl anv/image: Add a surface usage bit for video decoding 2023-05-19 06:15:01 +00:00
nullhw-layer vulkan/layers: Use PUBLIC instead of VK_LAYER_EXPORT 2023-02-17 03:42:34 +00:00
perf intel/perf: fix OA format selection on MTL 2023-04-03 23:34:17 +00:00
tools intel/tools: decode ACTHD printed by newer kernels 2023-05-05 14:55:41 +00:00
vulkan anv: fix push descriptor deferred surface state packing 2023-05-22 10:50:26 +00:00
vulkan_hasvk nir: Drop unused name from nir_ssa_dest_init 2023-05-17 23:46:16 +00:00
meson.build blorp: add dependency on idep_intel_dev 2023-03-03 13:04:23 +00:00