radv/gfx10: fix a possible hang with exp pos0 with done=0 and exec=0
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 25 Jun 2019 10:05:35 +0000 (12:05 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 7 Jul 2019 15:03:38 +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 e310c5c495e023609fd53b5f586596bb91ba40f3..bf5571f30c793115adb70d45ee84ce06ee884465 100644 (file)
@@ -2989,6 +2989,14 @@ handle_vs_outputs_post(struct radv_shader_context *ctx,
                        num_pos_exports++;
        }
 
+       /* Navi10-14 skip POS0 exports if EXEC=0 and DONE=0, causing a hang.
+        * Setting valid_mask=1 prevents it and has no other effect.
+        */
+       if (ctx->ac.family == CHIP_NAVI10 ||
+           ctx->ac.family == CHIP_NAVI12 ||
+           ctx->ac.family == CHIP_NAVI14)
+               pos_args[0].valid_mask = 1;
+
        pos_idx = 0;
        for (i = 0; i < 4; i++) {
                if (!pos_args[i].out[0])