summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_types.h
diff options
context:
space:
mode:
authorKalyan Kondapally <kalyan.kondapally@intel.com>2014-09-22 15:11:29 +0300
committerTapani Pälli <tapani.palli@intel.com>2014-09-26 08:29:10 +0300
commite018ea81bf580da7c771c5fd071343de92560083 (patch)
treed6964e8281df632a99dbb5871b73c710065d16d1 /src/glsl/glsl_types.h
parent1cb81d3a9b65781802f641fb3e4435edfed7f14a (diff)
downloadexternal_mesa3d-e018ea81bf580da7c771c5fd071343de92560083.zip
external_mesa3d-e018ea81bf580da7c771c5fd071343de92560083.tar.gz
external_mesa3d-e018ea81bf580da7c771c5fd071343de92560083.tar.bz2
glsl: Structures must have same name to be considered same type.
According to GLSL(4.2) and GLSL-ES (1.0, 3.0) spec, Structures must have the same name to be considered same type. We currently ignore the name check while checking if two records are same. This patch fixes this. Patch fixes failing tests in WebGL conformance test 'shaders-with-uniform-structs' when running Chrome on OpenGL ES. v2: Do not force name comparison with unnamed types (Tapani) v3: Cleanups (Matt) Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com> Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83934
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r--src/glsl/glsl_types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index 5a307bb..eeb14c2 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -489,6 +489,14 @@ struct glsl_type {
}
/**
+ * Query if a type is unnamed/anonymous (named by the parser)
+ */
+ bool is_anonymous() const
+ {
+ return !strncmp(name, "#anon", 5);
+ }
+
+ /**
* Get the type stripped of any arrays
*
* \return