mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 04:08:25 +02:00
anv: Replace va.indirect_descriptor_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
ad18acf2f4
commit
1ffdbe276d
3 changed files with 10 additions and 4 deletions
|
|
@ -101,7 +101,7 @@ get_device_descriptor_limits(const struct anv_physical_device *device,
|
|||
*/
|
||||
const uint64_t descriptor_heap_size =
|
||||
device->indirect_descriptors ?
|
||||
device->va.indirect_descriptor_pool.size :
|
||||
anv_physical_device_get_indirect_descriptor_pool_va(device)->size :
|
||||
anv_physical_device_get_bindless_surface_state_pool_va(device)->size;
|
||||
|
||||
const uint32_t buffer_descriptor_size =
|
||||
|
|
|
|||
|
|
@ -1719,6 +1719,12 @@ anv_physical_device_get_bindless_surface_state_pool_va(const struct anv_physical
|
|||
return &pdevice->va.bindless_surface_state_pool;
|
||||
}
|
||||
|
||||
static inline const struct anv_va_range *
|
||||
anv_physical_device_get_indirect_descriptor_pool_va(const struct anv_physical_device *pdevice)
|
||||
{
|
||||
return &pdevice->va.indirect_descriptor_pool;
|
||||
}
|
||||
|
||||
VkResult anv_physical_device_try_create(struct vk_instance *vk_instance,
|
||||
struct _drmDevice *drm_device,
|
||||
struct vk_physical_device **out);
|
||||
|
|
|
|||
|
|
@ -597,14 +597,14 @@ anv_shader_set_relocs(struct anv_device *device,
|
|||
};
|
||||
reloc_values[rv_count++] = (struct intel_shader_reloc_value) {
|
||||
.id = BRW_SHADER_RELOC_PUSH_DESCRIPTORS_BUFFER_ADDR_HIGH,
|
||||
.value = device->physical->va.internal_surface_state_pool.addr >> 32,
|
||||
.value = anv_physical_device_get_indirect_descriptor_pool_va(device->physical)->addr >> 32,
|
||||
};
|
||||
assert((device->physical->va.indirect_descriptor_pool.addr & 0xffffffff) == 0);
|
||||
assert((anv_physical_device_get_indirect_descriptor_pool_va(device->physical)->addr & 0xffffffff) == 0);
|
||||
assert((device->physical->va.internal_surface_state_pool.addr & 0xffffffff) == 0);
|
||||
reloc_values[rv_count++] = (struct intel_shader_reloc_value) {
|
||||
.id = BRW_SHADER_RELOC_DESCRIPTORS_ADDR_HIGH,
|
||||
.value = device->physical->indirect_descriptors ?
|
||||
(device->physical->va.indirect_descriptor_pool.addr >> 32) :
|
||||
(anv_physical_device_get_indirect_descriptor_pool_va(device->physical)->addr >> 32) :
|
||||
(device->physical->va.internal_surface_state_pool.addr >> 32),
|
||||
};
|
||||
assert((device->physical->va.shader_heap.addr & 0xffffffff) == 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue