radv/llvm: do not set COMPR for exports on GFX11
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 20 Oct 2022 04:40:20 +0000 (04:40 +0000)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 24 Oct 2022 05:53:59 +0000 (07:53 +0200)
Use 0x3 channel mask instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19216>

src/amd/vulkan/radv_nir_to_llvm.c

index 47ae712..1cd57a1 100644 (file)
@@ -668,7 +668,6 @@ si_llvm_init_export_args(struct radv_shader_context *ctx, LLVMValueRef *values,
             packed = packf(&ctx->ac, pack_args);
             args->out[chan] = ac_to_float(&ctx->ac, packed);
          }
-         args->compr = 1; /* COMPR flag */
       }
 
       /* Pack i16/u16. */
@@ -681,8 +680,16 @@ si_llvm_init_export_args(struct radv_shader_context *ctx, LLVMValueRef *values,
             packed = packi(&ctx->ac, pack_args, is_int8 ? 8 : is_int10 ? 10 : 16, chan == 1);
             args->out[chan] = ac_to_float(&ctx->ac, packed);
          }
-         args->compr = 1; /* COMPR flag */
       }
+
+      if (packf || packi) {
+         if (ctx->options->gfx_level >= GFX11) {
+            args->enabled_channels = 0x3;
+         } else {
+            args->compr = 1; /* COMPR flag */
+         }
+      }
+
       return;
    }