anv: Use anv_device_get_scratch_surface_state_pool()

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
This commit is contained in:
José Roberto de Souza 2025-07-01 12:53:55 -07:00 committed by Marge Bot
parent 0c061693d9
commit ce49340a13
3 changed files with 9 additions and 9 deletions

View file

@ -1369,7 +1369,7 @@ anv_scratch_pool_finish(struct anv_device *device, struct anv_scratch_pool *pool
for (unsigned i = 0; i < 16; i++) {
if (pool->surf_states[i].map != NULL) {
anv_state_pool_free(&device->scratch_surface_state_pool,
anv_state_pool_free(anv_device_get_scratch_surface_state_pool(device),
pool->surf_states[i]);
}
}
@ -1465,7 +1465,7 @@ anv_scratch_pool_get_surf(struct anv_device *device,
struct anv_address addr = { .bo = bo };
struct anv_state state =
anv_state_pool_alloc(&device->scratch_surface_state_pool,
anv_state_pool_alloc(anv_device_get_scratch_surface_state_pool(device),
device->isl_dev.ss.size, 64);
isl_surf_usage_flags_t usage =
@ -1484,7 +1484,7 @@ anv_scratch_pool_get_surf(struct anv_device *device,
uint32_t current = p_atomic_cmpxchg(&pool->surfs[bucket], 0, state.offset);
if (current) {
anv_state_pool_free(&device->scratch_surface_state_pool, state);
anv_state_pool_free(anv_device_get_scratch_surface_state_pool(device), state);
return current;
} else {
pool->surf_states[bucket] = state;

View file

@ -154,7 +154,7 @@ decode_get_bo(void *v_batch, bool ppgtt, uint64_t address)
return ret_bo;
if (get_bo_from_pool(&ret_bo, &anv_device_get_binding_table_pool(device)->block_pool, address))
return ret_bo;
if (get_bo_from_pool(&ret_bo, &device->scratch_surface_state_pool.block_pool, address))
if (get_bo_from_pool(&ret_bo, &anv_device_get_scratch_surface_state_pool(device)->block_pool, address))
return ret_bo;
if (device->physical->indirect_descriptors &&
get_bo_from_pool(&ret_bo, &device->bindless_surface_state_pool.block_pool, address))
@ -347,7 +347,7 @@ anv_device_init_descriptors_view(struct anv_device *device)
/* For descriptor buffers */
{
device->descriptor_buffer_view_state =
anv_state_pool_alloc(&device->scratch_surface_state_pool,
anv_state_pool_alloc(anv_device_get_scratch_surface_state_pool(device),
device->isl_dev.ss.size, 64);
const uint64_t size = pdevice->va.dynamic_visible_pool.size +
@ -369,7 +369,7 @@ anv_device_init_descriptors_view(struct anv_device *device)
/* For descriptors */
{
device->descriptor_view_state =
anv_state_pool_alloc(&device->scratch_surface_state_pool,
anv_state_pool_alloc(anv_device_get_scratch_surface_state_pool(device),
device->isl_dev.ss.size, 64);
const uint64_t size =
@ -395,9 +395,9 @@ anv_device_finish_descriptors_view(struct anv_device *device)
if (!device->info->has_lsc)
return;
anv_state_pool_free(&device->scratch_surface_state_pool,
anv_state_pool_free(anv_device_get_scratch_surface_state_pool(device),
device->descriptor_buffer_view_state);
anv_state_pool_free(&device->scratch_surface_state_pool,
anv_state_pool_free(anv_device_get_scratch_surface_state_pool(device),
device->descriptor_view_state);
}

View file

@ -407,7 +407,7 @@ setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf,
}
/* Add all the global BOs to the object list for softpin case. */
result = pin_state_pool(device, execbuf, &device->scratch_surface_state_pool);
result = pin_state_pool(device, execbuf, anv_device_get_scratch_surface_state_pool(device));
if (result != VK_SUCCESS)
return result;