diff options
author | Jason Ekstrand <[email protected]> | 2019-07-19 10:42:56 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-07-29 23:30:26 +0000 |
commit | 44268b1c72e327a812678f123000942083407944 (patch) | |
tree | d808505bab90bd13dcb88cc38c75c4a0f21cfd07 /src/compiler/glsl/ast_to_hir.cpp | |
parent | 169d896df2ac3882378c0323832c1253828f96fb (diff) |
glsl: Treat gl_FragCoord as a varying even when it's a system value
This fixes glsl-fcoord-invariant-pass.shader_test on drivers that set
GLSLFragCoordIsSysVal which includes radeonsi among others.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 9cd67ab7885..d7c396aa0eb 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -2706,7 +2706,9 @@ is_varying_var(ir_variable *var, gl_shader_stage target) case MESA_SHADER_VERTEX: return var->data.mode == ir_var_shader_out; case MESA_SHADER_FRAGMENT: - return var->data.mode == ir_var_shader_in; + return var->data.mode == ir_var_shader_in || + (var->data.mode == ir_var_system_value && + var->data.location == SYSTEM_VALUE_FRAG_COORD); default: return var->data.mode == ir_var_shader_out || var->data.mode == ir_var_shader_in; } |