[Mesa-dev] [PATCH 05/17] glsl/linker: Fail linking on ES if uniform precision qualifiers don't match
Ian Romanick
idr at freedesktop.org
Wed Aug 24 22:12:31 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
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 <ian.d.romanick at intel.com>
---
src/compiler/glsl/linker.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 4b404ff..e92c822 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);
}
--
2.5.5
More information about the mesa-dev
mailing list