From e5536e4a78e5d9a0028951ea13dc0bf818d4c5a1 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 21 Jul 2020 11:57:21 -0500 Subject: [PATCH] aco: Use nir_foreach_variable_with_modes to walk SSBOs Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/compiler/aco_instruction_selection_setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index f39f8476b80..aae5967b30f 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -327,8 +327,8 @@ void fill_desc_set_info(isel_context *ctx, nir_function_impl *impl) } ctx->buffer_resource_flags = std::vector(resource_flag_count); - nir_foreach_variable(var, &impl->function->shader->uniforms) { - if (var->data.mode == nir_var_mem_ssbo && (var->data.access & ACCESS_RESTRICT)) { + nir_foreach_variable_with_modes(var, impl->function->shader, nir_var_mem_ssbo) { + if (var->data.access & ACCESS_RESTRICT) { uint32_t offset = ctx->resource_flag_offsets[var->data.descriptor_set]; ctx->buffer_resource_flags[offset + var->data.binding] |= buffer_is_restrict; } -- 2.30.2