diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index adb613a2c78..5cdeb94720b 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -4077,30 +4077,8 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, } } - if (state->all_invariant && (state->current_function == NULL)) { - switch (state->stage) { - case MESA_SHADER_VERTEX: - if (var->data.mode == ir_var_shader_out) - var->data.invariant = true; - break; - case MESA_SHADER_TESS_CTRL: - case MESA_SHADER_TESS_EVAL: - case MESA_SHADER_GEOMETRY: - if ((var->data.mode == ir_var_shader_in) - || (var->data.mode == ir_var_shader_out)) - var->data.invariant = true; - break; - case MESA_SHADER_FRAGMENT: - if (var->data.mode == ir_var_shader_in) - var->data.invariant = true; - break; - case MESA_SHADER_COMPUTE: - /* Invariance isn't meaningful in compute shaders. */ - break; - default: - break; - } - } + if (state->all_invariant && var->data.mode == ir_var_shader_out) + var->data.invariant = true; var->data.interpolation = interpret_interpolation_qualifier(qual, var->type, |