radeonsi: emit param exports after position exports
authorMarek Olšák <marek.olsak@amd.com>
Tue, 4 Jul 2017 22:24:11 +0000 (00:24 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 17 Jul 2017 14:50:39 +0000 (10:50 -0400)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index ae9f4033a9815d2c74b8fccfbfb84086be95005c..a5baf71b0d037720cce8d7b972418897b69d026c 100644 (file)
@@ -2348,9 +2348,6 @@ static void si_llvm_export_vs(struct lp_build_tgsi_context *bld_base,
                }
        }
 
-       /* Build parameter exports. */
-       si_build_param_exports(ctx, outputs, noutput);
-
        /* We need to add the position output manually if it's missing. */
        if (!pos_args[0].out[0]) {
                pos_args[0].enabled_channels = 0xf; /* writemask */
@@ -2449,6 +2446,9 @@ static void si_llvm_export_vs(struct lp_build_tgsi_context *bld_base,
 
                ac_build_export(&ctx->ac, &pos_args[i]);
        }
+
+       /* Build parameter exports. */
+       si_build_param_exports(ctx, outputs, noutput);
 }
 
 /**