diff options
author | Andres Gomez <[email protected]> | 2016-07-31 01:46:59 +0300 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2016-08-05 14:27:03 +0300 |
commit | af796d756e9a507d5e055fb4cd03277386c5892a (patch) | |
tree | fc6a660dbfd423aa9f1ad7e5c9928a6733e1fc58 /src/compiler | |
parent | 875341c69b99dea7942a68c9060aa31a459e93fc (diff) |
glsl/types: disallow implicit conversions before GLSL 1.20
Implicit conversions were added in the GLSL 1.20 spec version.
v2: Join the checks for GLSL 1.10 and ESSL (Timothy).
Reviewed-by: Timothy Arceri <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl_types.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 8a0669538e0..641644d2d95 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -1384,11 +1384,11 @@ glsl_type::can_implicitly_convert_to(const glsl_type *desired, if (this == desired) return true; - /* ESSL does not allow implicit conversions. If there is no state, we're - * doing intra-stage function linking where these checks have already been - * done. + /* GLSL 1.10 and ESSL do not allow implicit conversions. If there is no + * state, we're doing intra-stage function linking where these checks have + * already been done. */ - if (state && state->es_shader) + if (state && (state->es_shader || !state->is_version(120, 0))) return false; /* There is no conversion among matrix types. */ |