mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-27 15:20:37 +02:00
anv: allocate compute scratch using the right scratch pool
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29778>
(cherry picked from commit 57e74d7b56)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29985>
This commit is contained in:
parent
7b216f9cb7
commit
5b1e09ed90
2 changed files with 7 additions and 5 deletions
|
|
@ -154,7 +154,7 @@
|
|||
"description": "anv: allocate compute scratch using the right scratch pool",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -66,16 +66,18 @@ genX(cmd_buffer_ensure_cfe_state)(struct anv_cmd_buffer *cmd_buffer,
|
|||
|
||||
uint32_t scratch_surf = 0xffffffff;
|
||||
if (total_scratch > 0) {
|
||||
struct anv_scratch_pool *scratch_pool =
|
||||
(cmd_buffer->vk.pool->flags & VK_COMMAND_POOL_CREATE_PROTECTED_BIT) ?
|
||||
&cmd_buffer->device->protected_scratch_pool :
|
||||
&cmd_buffer->device->scratch_pool;
|
||||
struct anv_bo *scratch_bo =
|
||||
anv_scratch_pool_alloc(cmd_buffer->device,
|
||||
&cmd_buffer->device->scratch_pool,
|
||||
anv_scratch_pool_alloc(cmd_buffer->device, scratch_pool,
|
||||
MESA_SHADER_COMPUTE,
|
||||
total_scratch);
|
||||
anv_reloc_list_add_bo(cmd_buffer->batch.relocs,
|
||||
scratch_bo);
|
||||
scratch_surf =
|
||||
anv_scratch_pool_get_surf(cmd_buffer->device,
|
||||
&cmd_buffer->device->scratch_pool,
|
||||
anv_scratch_pool_get_surf(cmd_buffer->device, scratch_pool,
|
||||
total_scratch);
|
||||
cfe.ScratchSpaceBuffer = scratch_surf >> 4;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue