mesa/src
José Roberto de Souza 656b086fcf intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized
u_vector_add() don't keep the returned pointers valid.
After the initial size allocated in u_vector_init() is reached it will
allocate a bigger buffer and copy data from older buffer to the new
one and free the old buffer, making all the previous pointers returned
by u_vector_add() invalid and crashing the application when trying to
access it.

This is reproduced when running
dEQP-VK.synchronization.signal_order.timeline_semaphore.* in DG2 SKUs
that has 4 CCS engines, INTEL_COMPUTE_CLASS=1 is set and of course
perfetto build is enabled.

To fix this issue here I'm moving the storage/allocation of
struct intel_ds_queue to struct anv_queue/iris_batch and using
struct list_head to maintain a chain of intel_ds_queue of the
intel_ds_device.
This allows us to append or remove queues dynamically in future if
necessary.

Fixes: e760c5b37b ("anv: add perfetto source")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20977>
(cherry picked from commit 8092bc2158)

Conflicts:
	src/intel/ds/intel_driver_ds.cc
	src/intel/vulkan/anv_utrace.c
	src/intel/vulkan_hasvk/anv_utrace.c
2023-02-07 18:01:30 -08:00
..
amd aco: fix out-of-bounds access when moving s_mem(real)time across SMEM 2023-02-07 14:23:35 -08:00
android_stub
asahi agx: Don't crash trying to encoding minifloats 2023-01-11 21:14:21 +00:00
broadcom v3dv: ensure we apply binning syncs to secondary command buffers 2023-02-07 14:23:33 -08:00
c11 c11: Remove _MTX_INITIALIZER_NP for windows 2022-11-09 04:38:28 +00:00
compiler nir: mark progress when removing trailing unused load_const channels 2023-02-01 13:48:45 -08:00
drm-shim drm-shim: Use hide_drm_device_path() to hide other drm devices 2022-12-30 15:51:11 -08:00
egl egl: Rewrite eglGetMscRateANGLE to avoid probes and handle multi-monitor 2023-01-27 09:17:37 -08:00
etnaviv etnaviv: drm: fix check if BO is on a deferred destroy list 2023-01-31 10:29:04 -08:00
freedreno tu/kgsl: do not use kgsl_command_object::offset 2023-01-24 15:27:05 -08:00
gallium intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized 2023-02-07 18:01:30 -08:00
gbm gbm: Avoid leaks on screen creation failures 2023-01-12 12:39:37 +00:00
getopt
glx dri: get rid of LIBGL_SHOW_FPS 2023-01-09 14:25:51 +01:00
gtest gtest: Fix maybe-uninitialized compiler warning 2022-06-29 21:02:18 +00:00
hgl
imagination pvr: Remove PVR_STATIC_CLEAR_.*_BIT and use VkImageAspectFlags. 2023-01-04 16:30:39 +00:00
imgui
intel intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized 2023-02-07 18:01:30 -08:00
loader loader: unregister special event in loader_dri3_drawable_fini 2023-02-07 14:23:29 -08:00
mapi glthread: fix glArrayElement handling 2023-01-24 15:27:04 -08:00
mesa glthread: handle GL_*_ARRAY in glEnable/Disable 2023-01-24 15:27:05 -08:00
microsoft dzn: Define a symbol that was present in older D3D headers 2023-02-07 08:35:22 -08:00
nouveau nir: Eliminate nir_op_i2b 2022-12-14 06:23:21 +00:00
panfrost panfrost: Fix logic ops on Bifrost 2023-01-17 10:16:40 -08:00
tool perfetto: Add the intel data sources to system.cfg. 2023-01-12 20:21:03 +00:00
util radv: add a layer for fixing rendering issues with RAGE2 2023-01-27 09:17:37 -08:00
virtio vulkan/wsi: Prepare things for image to image blits 2023-01-11 09:31:02 +00:00
vulkan wsi/win32: Don't require buffer blits for software drivers 2023-02-03 09:49:16 -08:00
meson.build meson: build radeon drm-shim also for r300 and r600 2022-11-16 14:37:47 +00:00