From: Ian Romanick Date: Tue, 24 May 2016 19:04:53 +0000 (-0700) Subject: glsl/linker: Fail linking on ES if uniform precision qualifiers don't match X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=259fc505454ea6a67aeacf6cdebf1398d9947759;p=mesa.git 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 Reviewed-by: Ilia Mirkin Reviewed-by: Kenneth Graunke --- 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); }