From 8a563ad905e571dad40f2d16140d70562447aba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Thu, 19 Mar 2026 11:52:29 -0700 Subject: [PATCH] anv: Replace va.aux_tt_pool access with a function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Jordan Justen Signed-off-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_device.c | 4 ++-- src/intel/vulkan/anv_private.h | 6 ++++++ src/intel/vulkan/i915/anv_batch_chain.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index f2a7f23a0d1..bc3626d74e3 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -641,9 +641,9 @@ anv_state_pools_init(struct anv_device *device) result = anv_state_pool_init(&device->aux_tt_pool, device, &(struct anv_state_pool_params) { .name = "aux-tt pool", - .base_address = device->physical->va.aux_tt_pool.addr, + .base_address = anv_physical_device_get_aux_tt_pool_va(device->physical)->addr, .block_size = 16384, - .max_size = device->physical->va.aux_tt_pool.size, + .max_size = anv_physical_device_get_aux_tt_pool_va(device->physical)->size, }); if (result != VK_SUCCESS) goto fail_push_descriptor_buffer_pool; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 0f196a22eff..df17d05b593 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1755,6 +1755,12 @@ anv_physical_device_get_push_descriptor_buffer_pool_va(const struct anv_physical return &pdevice->va.push_descriptor_buffer_pool; } +static inline const struct anv_va_range * +anv_physical_device_get_aux_tt_pool_va(const struct anv_physical_device *pdevice) +{ + return &pdevice->va.aux_tt_pool; +} + VkResult anv_physical_device_try_create(struct vk_instance *vk_instance, struct _drmDevice *drm_device, struct vk_physical_device **out); diff --git a/src/intel/vulkan/i915/anv_batch_chain.c b/src/intel/vulkan/i915/anv_batch_chain.c index 16149220035..5081d82482d 100644 --- a/src/intel/vulkan/i915/anv_batch_chain.c +++ b/src/intel/vulkan/i915/anv_batch_chain.c @@ -443,7 +443,7 @@ setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf, if (result != VK_SUCCESS) return result; - if (device->physical->va.aux_tt_pool.size > 0) { + if (anv_physical_device_get_aux_tt_pool_va(device->physical)->size > 0) { result = pin_state_pool(device, execbuf, anv_device_get_aux_tt_pool(device)); if (result != VK_SUCCESS) return result;