summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl_types.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-01-27 13:52:41 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2016-01-28 11:31:19 -0500
commit089f60543930fcdab3848d59e6182abcaaeb1b86 (patch)
tree9c3c05b5ebb6b8ba514f428b969b6ad2c35cb2ae /src/compiler/glsl_types.cpp
parentdda7a849868d5a4be6cec9d28c86a52aba62b32b (diff)
downloadexternal_mesa3d-089f60543930fcdab3848d59e6182abcaaeb1b86.zip
external_mesa3d-089f60543930fcdab3848d59e6182abcaaeb1b86.tar.gz
external_mesa3d-089f60543930fcdab3848d59e6182abcaaeb1b86.tar.bz2
glsl: disallow implicit conversions in ESSL shaders
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/compiler/glsl_types.cpp')
-rw-r--r--src/compiler/glsl_types.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index 17ebf07..ef6c3c6 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -1139,6 +1139,13 @@ 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.
+ */
+ if (state && state->es_shader)
+ return false;
+
/* There is no conversion among matrix types. */
if (this->matrix_columns > 1 || desired->matrix_columns > 1)
return false;