summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2021-02-17 10:28:44 +0100
committerMarge Bot <eric+marge@anholt.net>2021-02-17 16:08:07 +0000
commitde542784f8ccd2c7511572dedbf0e91a155b193e (patch)
tree4dd2a7bc7bf320a6f201da8870d248ab635edf73
parent80709d11d299fc2b1fb0c941340d7aa4bce78bb2 (diff)
radv: make sure to allocate enough space when emitting SQTT userdata
If we emit a lot of markers, we might reach the limit easily. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9097>
-rw-r--r--src/amd/vulkan/radv_sqtt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_sqtt.c b/src/amd/vulkan/radv_sqtt.c
index 12f32ca0d6f..35de6e6976c 100644
--- a/src/amd/vulkan/radv_sqtt.c
+++ b/src/amd/vulkan/radv_sqtt.c
@@ -327,6 +327,8 @@ radv_emit_thread_trace_userdata(const struct radv_device *device,
while (num_dwords > 0) {
uint32_t count = MIN2(num_dwords, 2);
+ radeon_check_space(device->ws, cs, 2 + count);
+
/* Without the perfctr bit the CP might not always pass the
* write on correctly. */
if (device->physical_device->rad_info.chip_class >= GFX10)