From: Danylo Piliaiev Date: Wed, 5 Sep 2018 12:26:48 +0000 (+0300) Subject: glsl: Make invariant outputs in ES fragment shader not to cause error X-Git-Tag: upstream/19.0.0~583 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2db6b4254462c62fe60dcc62645da6901986690;p=platform%2Fupstream%2Fmesa.git glsl: Make invariant outputs in ES fragment shader not to cause error In all GLSL ES versions output variables in fragment shader are allowed to be invariant. From Section 4.6.1 ("The Invariant Qualifier") GLSL ES 1.00 spec: "Only the following variables may be declared as invariant: ... - Built-in special variables output from the fragment shader." From Section 4.6.1 ("The Invariant Qualifier") GLSL ES 3.00 spec: "Only variables output from a shader can be candidates for invariance." Signed-off-by: Danylo Piliaiev Reviewed-by: Kenneth Graunke Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107842 --- diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 611cfab..67a5a8c 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -2721,7 +2721,7 @@ is_allowed_invariant(ir_variable *var, struct _mesa_glsl_parse_state *state) * "Only variables output from a vertex shader can be candidates * for invariance". */ - if (!state->is_version(130, 0)) + if (!state->is_version(130, 100)) return false; /*