From 7ec12b537a4b3852828c2e16b53bafde828bf6e4 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 20 Jul 2023 16:43:08 +0300 Subject: [PATCH] anv: don't try to access dynamic buffers from surface states Even with direct descriptors, our current implementation works by doing A64 messages to read/write dynamic buffers. This is so that we can apply the sliding range view of the descriptor while having robustness support. Signed-off-by: Lionel Landwerlin Fixes: 06dfd216d3 ("anv: add direct descriptor support to apply_layout") Reviewed-by: Ivan Briano Part-of: --- src/intel/vulkan/anv_nir_apply_pipeline_layout.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c index 487ecc6..7958ad2 100644 --- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c +++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c @@ -1199,8 +1199,7 @@ try_lower_direct_buffer_intrinsic(nir_builder *b, /* If a dynamic has not been assigned a binding table entry, we need to * bail here. */ - if (state->layout->type == ANV_PIPELINE_DESCRIPTOR_SET_LAYOUT_TYPE_INDIRECT && - (bind_layout->type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || + if ((bind_layout->type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || bind_layout->type == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) && !descriptor_has_bti(desc, state)) return false; -- 2.7.4