radeonsi: don't call eliminate_const_vs_outputs in shaders without VS exports
authorMarek Olšák <marek.olsak@amd.com>
Fri, 28 Apr 2017 14:35:13 +0000 (16:35 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 4 May 2017 22:23:44 +0000 (00:23 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index 204e641e7226ad003893b567782774eb32afa6ba..2928fc9039ccaba5e1d149d331ca1bff3aa23561 100644 (file)
@@ -7237,10 +7237,10 @@ static void si_eliminate_const_vs_outputs(struct si_shader_context *ctx)
        struct si_shader *shader = ctx->shader;
        struct tgsi_shader_info *info = &shader->selector->info;
 
-       if (ctx->type == PIPE_SHADER_FRAGMENT ||
-           ctx->type == PIPE_SHADER_COMPUTE ||
-           shader->key.as_es ||
-           shader->key.as_ls)
+       if ((ctx->type != PIPE_SHADER_VERTEX &&
+            ctx->type != PIPE_SHADER_TESS_EVAL) ||
+           shader->key.as_ls ||
+           shader->key.as_es)
                return;
 
        ac_optimize_vs_outputs(&ctx->ac,