summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/link_interface_blocks.cpp
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2016-10-18 09:38:30 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2016-10-24 07:04:38 +0200
commitb50b82b8a553f93b4ee9ace734e4c53d5a388a35 (patch)
tree49b7f2a76ccd2b335db3c4a35ae0904f7ef578a4 /src/compiler/glsl/link_interface_blocks.cpp
parent849390a61a92698dec541abfed47791e84c73a32 (diff)
glsl/es31: precision qualifier doesn't need to match in shader interface block members
It is specific only to GLSL ES 3.1. From the spec, section 4.3.9 "Interface Blocks": "Matched block names within a shader interface (as defined above) must match in terms of having the same number of declarations with the same sequence of types and the same sequence of member names, as well as having the same qualification as specified in section 9.2 (“Matching of Qualifiers“)." But in GLSL ES 3.0 and 3.2, it is the opposite: "Matched block names within a shader interface (as defined above) must match in terms of having the same number of declarations with the same sequence of types, precisions and the same sequence of member names, as well as having the matching member-wise layout qualification as defined in section 9.2 (“Matching of Qualifiers”)." Fixes: dEQP-GLES31.functional.shaders.linkage.uniform.block.differing_precision Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98243 Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/compiler/glsl/link_interface_blocks.cpp')
-rw-r--r--src/compiler/glsl/link_interface_blocks.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_interface_blocks.cpp b/src/compiler/glsl/link_interface_blocks.cpp
index 9a0b6ec9256..a176c3b6da7 100644
--- a/src/compiler/glsl/link_interface_blocks.cpp
+++ b/src/compiler/glsl/link_interface_blocks.cpp
@@ -112,8 +112,11 @@ intrastage_match(ir_variable *a,
* don't force their types to match. They might mismatch due to the two
* shaders using different GLSL versions, and that's ok.
*/
- if (a->data.how_declared != ir_var_declared_implicitly ||
- b->data.how_declared != ir_var_declared_implicitly)
+ if ((a->data.how_declared != ir_var_declared_implicitly ||
+ b->data.how_declared != ir_var_declared_implicitly) &&
+ (!prog->IsES || prog->Version != 310 ||
+ interstage_member_mismatch(prog, a->get_interface_type(),
+ b->get_interface_type())))
return false;
}