anv: fix utrace batch allocation
The introduction of a workaround adding lots of MI_NOOPs broke our
computation.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b9aa66d5d0 ("anv: disable preemption for 3DPRIMITIVE during streamout")
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23792>
This commit is contained in:
committed by
Marge Bot
parent
8e729a2f57
commit
a13ac83f1b
@@ -151,9 +151,18 @@ anv_device_utrace_flush_cmd_buffers(struct anv_queue *queue,
|
||||
if (result != VK_SUCCESS)
|
||||
goto error_trace_buf;
|
||||
|
||||
uint32_t batch_size = 512; /* 128 dwords of setup */
|
||||
if (intel_needs_workaround(device->info, 16013994831)) {
|
||||
/* Enable/Disable preemption at the begin/end */
|
||||
batch_size += 2 * (250 /* 250 MI_NOOPs*/ +
|
||||
6 /* PIPE_CONTROL */ +
|
||||
3 /* MI_LRI */) * 4 /* dwords */;
|
||||
}
|
||||
batch_size += 256 * utrace_copies; /* 64 dwords per copy */
|
||||
batch_size = align(batch_size + 4, 8); /* MI_BATCH_BUFFER_END */
|
||||
|
||||
result = anv_bo_pool_alloc(&device->utrace_bo_pool,
|
||||
/* 128 dwords of setup + 64 dwords per copy */
|
||||
align(512 + 64 * utrace_copies, 4096),
|
||||
align(batch_size, 4096),
|
||||
&submit->batch_bo);
|
||||
if (result != VK_SUCCESS)
|
||||
goto error_batch_buf;
|
||||
|
||||
Reference in New Issue
Block a user