[Mesa-dev] [PATCH 2/2] mesa: do runtime validation of precision varyings only on ES
Tapani Pälli
tapani.palli at intel.com
Sun Nov 15 22:44:19 PST 2015
Precision qualifier should be ignored on desktop OpenGL.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
src/mesa/main/shader_query.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 58ba041..dc39f24 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -1413,9 +1413,15 @@ _mesa_validate_pipeline_io(struct gl_pipeline_object *pipeline)
for (idx = prev + 1; idx < ARRAY_SIZE(pipeline->CurrentProgram); idx++) {
if (shProg[idx]) {
- if (!validate_io(shProg[prev]->_LinkedShaders[prev],
- shProg[idx]->_LinkedShaders[idx]))
- return false;
+
+ /* Since we now only validate precision, we can skip this step for
+ * desktop GLSL shaders, there precision qualifier is ignored.
+ */
+ if (shProg[prev]->IsES || shProg[idx]->IsES) {
+ if (!validate_io(shProg[prev]->_LinkedShaders[prev],
+ shProg[idx]->_LinkedShaders[idx]))
+ return false;
+ }
prev = idx;
}
}
--
2.4.3
More information about the mesa-dev
mailing list