Mesa (master): Revert "radv: do not overallocate the SQTT buffer"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 1 13:23:33 UTC 2021


Module: Mesa
Branch: master
Commit: 24f015eddc13d3a9c5693f2eab807e8c5ce277e3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=24f015eddc13d3a9c5693f2eab807e8c5ce277e3

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Feb 26 15:23:33 2021 +0100

Revert "radv: do not overallocate the SQTT buffer"

This fixes computing the thread trace data offset.

This reverts commit c7e6f4ff3da39f36fdda8f0ec6eea4925cd3afdc.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9307>

---

 src/amd/vulkan/radv_sqtt.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_sqtt.c b/src/amd/vulkan/radv_sqtt.c
index 88be1c7d2be..ed7e5df9ebd 100644
--- a/src/amd/vulkan/radv_sqtt.c
+++ b/src/amd/vulkan/radv_sqtt.c
@@ -400,7 +400,6 @@ radv_emit_wait_for_idle(struct radv_device *device,
 static bool
 radv_thread_trace_init_bo(struct radv_device *device)
 {
-	unsigned max_se = device->physical_device->rad_info.max_se;
 	struct radeon_winsys *ws = device->ws;
 	uint64_t size;
 
@@ -410,10 +409,10 @@ radv_thread_trace_init_bo(struct radv_device *device)
 	device->thread_trace.buffer_size = align64(device->thread_trace.buffer_size,
 	                                           1u << SQTT_BUFFER_ALIGN_SHIFT);
 
-	/* Compute total size of the thread trace BO for all SEs. */
-	size = align64(sizeof(struct ac_thread_trace_info) * max_se,
+	/* Compute total size of the thread trace BO for 4 SEs. */
+	size = align64(sizeof(struct ac_thread_trace_info) * 4,
 		       1 << SQTT_BUFFER_ALIGN_SHIFT);
-	size += device->thread_trace.buffer_size * max_se;
+	size += device->thread_trace.buffer_size * 4ll;
 
 	device->thread_trace.bo = ws->buffer_create(ws, size, 4096,
 						    RADEON_DOMAIN_VRAM,



More information about the mesa-commit mailing list