mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 17:00:13 +01:00
anv: allocate slice_hash for descriptor buffer
Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22151>
This commit is contained in:
parent
859f087c0b
commit
271f0b8b9c
3 changed files with 14 additions and 0 deletions
|
|
@ -3918,6 +3918,8 @@ void anv_DestroyDevice(
|
|||
anv_state_pool_free(&device->dynamic_state_pool, device->slice_hash);
|
||||
anv_state_pool_free(&device->dynamic_state_pool, device->cps_states);
|
||||
anv_state_pool_free(&device->dynamic_state_pool, device->breakpoint);
|
||||
if (device->vk.enabled_extensions.EXT_descriptor_buffer)
|
||||
anv_state_pool_free(&device->dynamic_state_db_pool, device->slice_hash_db);
|
||||
#endif
|
||||
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(device->rt_scratch_bos); i++) {
|
||||
|
|
|
|||
|
|
@ -1776,6 +1776,7 @@ struct anv_device {
|
|||
struct anv_state border_colors;
|
||||
|
||||
struct anv_state slice_hash;
|
||||
struct anv_state slice_hash_db;
|
||||
|
||||
/** An array of CPS_STATE structures grouped by MAX_VIEWPORTS elements
|
||||
*
|
||||
|
|
|
|||
|
|
@ -818,6 +818,17 @@ genX(init_device_state)(struct anv_device *device)
|
|||
return res;
|
||||
}
|
||||
|
||||
if (device->vk.enabled_extensions.EXT_descriptor_buffer &&
|
||||
device->slice_hash.alloc_size) {
|
||||
device->slice_hash_db =
|
||||
anv_state_pool_alloc(&device->dynamic_state_db_pool,
|
||||
device->slice_hash.alloc_size, 64);
|
||||
|
||||
memcpy(device->slice_hash_db.map,
|
||||
device->slice_hash.map,
|
||||
device->slice_hash.alloc_size);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue