summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2019-04-23 15:19:35 +0200
committerNeil Roberts <[email protected]>2019-06-14 09:29:53 +0200
commit19b27a85694bd2440609a218386ab6d9f834019a (patch)
treeafd9e548d7277d9e7a31a00af226a054c2abf12a /src/compiler
parent230d1e8d863f917db42a4afd2623b3eeb28844c3 (diff)
glsl/linker: Don’t check precision for shader interface
On GLES, the interface between vertex and fragment shaders doesn’t need to have matching precision. Section 4.3.10 of the GLSL ES 3.00 spec: “The type of vertex outputs and fragment inputs with the same name must match, otherwise the link command will fail. The precision does not need to match.” Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/link_varyings.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index 4e00840c53e..1263d6cbdb1 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -218,9 +218,12 @@ cross_validate_types_and_qualifiers(struct gl_context *ctx,
/* Structures across shader stages can have different name
* and considered to match in type if and only if structure
* members match in name, type, qualification, and declaration
- * order.
+ * order. The precision doesn’t need to match.
*/
- if (!output->type->record_compare(type_to_match, false, true)) {
+ if (!output->type->record_compare(type_to_match,
+ false, /* match_name */
+ true, /* match_locations */
+ false /* match_precision */)) {
linker_error(prog,
"%s shader output `%s' declared as struct `%s', "
"doesn't match in type with %s shader input "