From: Jason Ekstrand Date: Tue, 21 Jul 2020 16:57:21 +0000 (-0500) Subject: aco: Use nir_foreach_variable_with_modes to walk SSBOs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5536e4a78e5d9a0028951ea13dc0bf818d4c5a1;p=mesa.git aco: Use nir_foreach_variable_with_modes to walk SSBOs Reviewed-by: Bas Nieuwenhuizen Part-of: --- 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; }