radeonsi: don't try to eliminate trivial VS outputs for PS and CS
authorMarek Olšák <marek.olsak@amd.com>
Sat, 26 Nov 2016 21:44:10 +0000 (22:44 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 29 Nov 2016 22:52:31 +0000 (23:52 +0100)
PS and CS don't have any param exports, so it's a no-op.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index 6228a68cdcc8d4c15b22b68e475a63f029a51219..20f4a1d0776fd75260f0368ba5ad56c5ed85ed6a 100644 (file)
@@ -6487,7 +6487,10 @@ static void si_eliminate_const_vs_outputs(struct si_shader_context *ctx)
 
        exports.num = 0;
 
-       if (shader->key.as_es || shader->key.as_ls)
+       if (ctx->type == PIPE_SHADER_FRAGMENT ||
+           ctx->type == PIPE_SHADER_COMPUTE ||
+           shader->key.as_es ||
+           shader->key.as_ls)
                return;
 
        /* Process all LLVM instructions. */