summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-05-24 12:04:53 -0700
committerIan Romanick <[email protected]>2016-08-26 15:03:15 -0700
commit259fc505454ea6a67aeacf6cdebf1398d9947759 (patch)
tree1493c7c463547c18305203550a8c3524535acf7a /src/compiler
parent06201e4f1afb5c4354d5e2238a57e54c9463cf9f (diff)
glsl/linker: Fail linking on ES if uniform precision qualifiers don't match
When GL_OES_geometry_shader is enabled, this fixes dEQP-GLES31.functional.shaders.linkage.geometry.uniform.rules.type_mismatch_1. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/linker.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 436b452f7d9..c95edf3e63d 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1153,6 +1153,13 @@ cross_validate_globals(struct gl_shader_program *prog,
mode_string(var), var->name);
return;
}
+
+ if (prog->IsES && existing->data.precision != var->data.precision) {
+ linker_error(prog, "declarations for %s `%s` have "
+ "mismatching precision qualifiers\n",
+ mode_string(var), var->name);
+ return;
+ }
} else
variables->add_variable(var);
}