aco/gfx10: Fix PS exports for SPI_SHADER_32_AR.
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 15 Oct 2019 07:55:17 +0000 (09:55 +0200)
committerRhys Perry <pendingchaos02@gmail.com>
Mon, 21 Oct 2019 14:33:54 +0000 (14:33 +0000)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_instruction_selection.cpp

index 0e7d8a857e4da06c3e14b1aaab01b470507394fb..fede0979bd2b93a4fa68eb400fafe18bc395036d 100644 (file)
@@ -2524,7 +2524,13 @@ void visit_store_fs_output(isel_context *ctx, nir_intrinsic_instr *instr)
       break;
 
    case V_028714_SPI_SHADER_32_AR:
-      enabled_channels = 0x9;
+      if (ctx->options->chip_class >= GFX10) {
+         /* Special case: on GFX10, the outputs are different for 32_AR */
+         enabled_channels = 0x3;
+         values[1] = values[3];
+      } else {
+         enabled_channels = 0x9;
+      }
       break;
 
    case V_028714_SPI_SHADER_FP16_ABGR: