[Mesa-dev] [PATCH] glsl: fix arrays of anonymous structs matching.
Dave Airlie
airlied at gmail.com
Sun May 22 19:30:07 UTC 2016
From: Dave Airlie <airlied at redhat.com>
"glsl/linker: attempt to match anonymous structures at link"
introduced a fix for matching anon structs, however it didn't
handle arrays of anon structs.
This adds the appropriate without_array() calls, and fixes
some crashes in the CTS tessellation tests.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/compiler/glsl/link_varyings.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index 708e1d1..82b3a74 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -226,9 +226,9 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog,
* fragment language."
*/
if (!output->type->is_array() || !is_gl_identifier(output->name)) {
- bool anon_matches = output->type->is_anonymous() &&
+ bool anon_matches = output->type->without_array()->is_anonymous() &&
type_to_match->is_anonymous() &&
- type_to_match->record_compare(output->type);
+ type_to_match->record_compare(output->type->without_array());
if (!anon_matches) {
linker_error(prog,
--
2.5.5
More information about the mesa-dev
mailing list