radv/gfx10: fix PS exports for SPI_SHADER_32_AR
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 25 Jun 2019 10:16:39 +0000 (12:16 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 7 Jul 2019 15:03:39 +0000 (17:03 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_nir_to_llvm.c

index bf5571f30c793115adb70d45ee84ce06ee884465..84ab586caacf41b8112c25c6a072142e5b25a174 100644 (file)
@@ -2596,9 +2596,15 @@ si_llvm_init_export_args(struct radv_shader_context *ctx,
                        break;
 
                case V_028714_SPI_SHADER_32_AR:
-                       args->enabled_channels = 0x9;
-                       args->out[0] = values[0];
-                       args->out[3] = values[3];
+                       if (ctx->ac.chip_class >= GFX10) {
+                               args->enabled_channels = 0x3;
+                               args->out[0] = values[0];
+                               args->out[1] = values[3];
+                       } else {
+                               args->enabled_channels = 0x9;
+                               args->out[0] = values[0];
+                               args->out[3] = values[3];
+                       }
                        break;
 
                case V_028714_SPI_SHADER_FP16_ABGR: