diff options
author | Ian Romanick <[email protected]> | 2018-10-09 12:01:22 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2018-11-15 14:27:29 -0800 |
commit | 61e003ce7ec40a1a41802f8fea97c7c33b46a8ba (patch) | |
tree | 6d11a362e3702a5891c1d848c57164982a9fb908 /src/compiler/glsl/ast_to_hir.cpp | |
parent | 9b9f3218dbad1079aec6ed90ef8aa1da39f5d6e3 (diff) |
glsl: Omit redundant qualifier checks on redeclarations
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 8a41db66b97..f1fdd0c4a54 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -4284,8 +4284,7 @@ get_variable_being_redeclared(ir_variable **var_ptr, YYLTYPE loc, } else if ((state->ARB_fragment_coord_conventions_enable || state->is_version(150, 0)) && strcmp(var->name, "gl_FragCoord") == 0 - && earlier->type == var->type - && var->data.mode == ir_var_shader_in) { + && earlier->type == var->type) { /* Allow redeclaration of gl_FragCoord for ARB_fcc layout * qualifiers. */ @@ -4309,8 +4308,7 @@ get_variable_being_redeclared(ir_variable **var_ptr, YYLTYPE loc, || strcmp(var->name, "gl_BackSecondaryColor") == 0 || strcmp(var->name, "gl_Color") == 0 || strcmp(var->name, "gl_SecondaryColor") == 0) - && earlier->type == var->type - && earlier->data.mode == var->data.mode) { + && earlier->type == var->type) { earlier->data.interpolation = var->data.interpolation; /* Layout qualifiers for gl_FragDepth. */ @@ -4318,8 +4316,7 @@ get_variable_being_redeclared(ir_variable **var_ptr, YYLTYPE loc, state->AMD_conservative_depth_enable || state->ARB_conservative_depth_enable) && strcmp(var->name, "gl_FragDepth") == 0 - && earlier->type == var->type - && earlier->data.mode == var->data.mode) { + && earlier->type == var->type) { /** From the AMD_conservative_depth spec: * Within any shader, the first redeclarations of gl_FragDepth |