mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
radv: do not overallocate the SQTT buffer
The total size is computed for all available SEs which is not always 4. 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/8960>
This commit is contained in:
parent
72709c2bce
commit
c7e6f4ff3d
1 changed files with 4 additions and 3 deletions
|
|
@ -493,6 +493,7 @@ radv_thread_trace_init_cs(struct radv_device *device)
|
||||||
static bool
|
static bool
|
||||||
radv_thread_trace_init_bo(struct radv_device *device)
|
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;
|
struct radeon_winsys *ws = device->ws;
|
||||||
uint64_t size;
|
uint64_t size;
|
||||||
|
|
||||||
|
|
@ -502,10 +503,10 @@ radv_thread_trace_init_bo(struct radv_device *device)
|
||||||
device->thread_trace.buffer_size = align64(device->thread_trace.buffer_size,
|
device->thread_trace.buffer_size = align64(device->thread_trace.buffer_size,
|
||||||
1u << SQTT_BUFFER_ALIGN_SHIFT);
|
1u << SQTT_BUFFER_ALIGN_SHIFT);
|
||||||
|
|
||||||
/* Compute total size of the thread trace BO for 4 SEs. */
|
/* Compute total size of the thread trace BO for all SEs. */
|
||||||
size = align64(sizeof(struct ac_thread_trace_info) * 4,
|
size = align64(sizeof(struct ac_thread_trace_info) * max_se,
|
||||||
1 << SQTT_BUFFER_ALIGN_SHIFT);
|
1 << SQTT_BUFFER_ALIGN_SHIFT);
|
||||||
size += device->thread_trace.buffer_size * 4ll;
|
size += device->thread_trace.buffer_size * max_se;
|
||||||
|
|
||||||
device->thread_trace.bo = ws->buffer_create(ws, size, 4096,
|
device->thread_trace.bo = ws->buffer_create(ws, size, 4096,
|
||||||
RADEON_DOMAIN_VRAM,
|
RADEON_DOMAIN_VRAM,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue