mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 17:18:30 +02:00
anv: Replace va.binding_table_pool access with a function
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:
parent
8a563ad905
commit
c58b2f0d40
2 changed files with 10 additions and 4 deletions
|
|
@ -582,18 +582,18 @@ anv_state_pools_init(struct anv_device *device)
|
|||
result = anv_state_pool_init(&device->binding_table_pool, device,
|
||||
&(struct anv_state_pool_params) {
|
||||
.name = "binding table pool",
|
||||
.base_address = device->physical->va.binding_table_pool.addr,
|
||||
.base_address = anv_physical_device_get_binding_table_pool_va(device->physical)->addr,
|
||||
.block_size = device->physical->instance->drirc.perf.bt_block_size,
|
||||
.max_size = device->physical->va.binding_table_pool.size,
|
||||
.max_size = anv_physical_device_get_binding_table_pool_va(device->physical)->size,
|
||||
});
|
||||
} else {
|
||||
/* The binding table should be in front of the surface states in virtual
|
||||
* address space so that all surface states can be express as relative
|
||||
* offsets from the binding table location.
|
||||
*/
|
||||
assert(device->physical->va.binding_table_pool.addr <
|
||||
assert(anv_physical_device_get_binding_table_pool_va(device->physical)->addr <
|
||||
anv_physical_device_get_internal_surface_state_pool_va(device->physical)->addr);
|
||||
int64_t bt_pool_offset = (int64_t)device->physical->va.binding_table_pool.addr -
|
||||
int64_t bt_pool_offset = (int64_t)anv_physical_device_get_binding_table_pool_va(device->physical)->addr -
|
||||
(int64_t)anv_physical_device_get_internal_surface_state_pool_va(device->physical)->addr;
|
||||
assert(INT32_MIN < bt_pool_offset && bt_pool_offset < 0);
|
||||
result = anv_state_pool_init(&device->binding_table_pool, device,
|
||||
|
|
|
|||
|
|
@ -1761,6 +1761,12 @@ anv_physical_device_get_aux_tt_pool_va(const struct anv_physical_device *pdevice
|
|||
return &pdevice->va.aux_tt_pool;
|
||||
}
|
||||
|
||||
static inline const struct anv_va_range *
|
||||
anv_physical_device_get_binding_table_pool_va(const struct anv_physical_device *pdevice)
|
||||
{
|
||||
return &pdevice->va.binding_table_pool;
|
||||
}
|
||||
|
||||
VkResult anv_physical_device_try_create(struct vk_instance *vk_instance,
|
||||
struct _drmDevice *drm_device,
|
||||
struct vk_physical_device **out);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue