radeonsi/gfx10: fix PS exports for SPI_SHADER_32_AR
authorMarek Olšák <marek.olsak@amd.com>
Sat, 25 May 2019 02:49:27 +0000 (22:49 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Jul 2019 19:51:13 +0000 (15:51 -0400)
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/gallium/drivers/radeonsi/si_shader.c

index 6f11225c9af20e81f39609cb8e7292ade6c7f2b9..2d022438841a81f1bf8ef7209446bb0bb94c0284 100644 (file)
@@ -2450,9 +2450,15 @@ static void si_llvm_init_export_args(struct si_shader_context *ctx,
                break;
 
        case V_028714_SPI_SHADER_32_AR:
-               args->enabled_channels = 0x9; /* writemask */
-               args->out[0] = values[0];
-               args->out[3] = values[3];
+               if (ctx->screen->info.chip_class >= GFX10) {
+                       args->enabled_channels = 0x3; /* writemask */
+                       args->out[0] = values[0];
+                       args->out[1] = values[3];
+               } else {
+                       args->enabled_channels = 0x9; /* writemask */
+                       args->out[0] = values[0];
+                       args->out[3] = values[3];
+               }
                break;
 
        case V_028714_SPI_SHADER_FP16_ABGR: