aco: only use scalar loads for readonly buffers on SI/CI
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 6 Nov 2019 09:13:50 +0000 (10:13 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Sat, 7 Dec 2019 10:23:11 +0000 (11:23 +0100)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
src/amd/compiler/aco_instruction_selection.cpp

index 7d6e6d4435e97dc53cde0b79cc97662d937e9208..f63daa31bcae42d8ca6b741c3701ff4cc7efe7ef 100644 (file)
@@ -3313,7 +3313,7 @@ void load_buffer(isel_context *ctx, unsigned num_components, Temp dst,
    bool dlc = glc && ctx->options->chip_class >= GFX10;
 
    aco_opcode op;
-   if (dst.type() == RegType::vgpr || (glc && ctx->options->chip_class < GFX8)) {
+   if (dst.type() == RegType::vgpr || (ctx->options->chip_class < GFX8 && !readonly)) {
       if (ctx->options->chip_class < GFX8)
          offset = as_vgpr(ctx, offset);