From 46420dd294933ef191e8a8a705940c7236e44e5a Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 20 Sep 2019 12:08:19 +0100 Subject: [PATCH] aco: set dlc/glc correctly for image loads MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-By: Timur Kristóf --- src/amd/compiler/aco_instruction_selection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index de46348c091..249a9d7b77b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -4045,6 +4045,8 @@ void visit_image_load(isel_context *ctx, nir_intrinsic_instr *instr) tmp = {ctx->program->allocateId(), RegClass(RegType::vgpr, num_channels)}; load->definitions[0] = Definition(tmp); load->idxen = true; + load->glc = var->data.access & (ACCESS_VOLATILE | ACCESS_COHERENT); + load->dlc = load->glc && ctx->options->chip_class >= GFX10; load->barrier = barrier_image; ctx->block->instructions.emplace_back(std::move(load)); @@ -4068,6 +4070,7 @@ void visit_image_load(isel_context *ctx, nir_intrinsic_instr *instr) load->operands[1] = Operand(resource); load->definitions[0] = Definition(tmp); load->glc = var->data.access & (ACCESS_VOLATILE | ACCESS_COHERENT) ? 1 : 0; + load->dlc = load->glc && ctx->options->chip_class >= GFX10; load->dim = ac_get_image_dim(ctx->options->chip_class, dim, is_array); load->dmask = dmask; load->unrm = true; -- 2.30.2