[Piglit] [PATCH 2/2] varying-struct-centroid: Fix default precision qualifiers

Iago Toral Quiroga itoral at igalia.com
Tue Jul 28 04:52:50 PDT 2015


Default ES precision qualifiers for float types in the VS and FS
are different and that should make the test fail to compile/link
if Mesa actually checked for these things (because it would realize
that VS outputs and FS inputs do not have the exact same type as
a consequence).

Fix this by setting the same default precision qualification for floats
in the VS and FS shaders.
---
 tests/spec/glsl-es-3.00/execution/varying-struct-centroid.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/spec/glsl-es-3.00/execution/varying-struct-centroid.c b/tests/spec/glsl-es-3.00/execution/varying-struct-centroid.c
index b686bf3..02332ae 100644
--- a/tests/spec/glsl-es-3.00/execution/varying-struct-centroid.c
+++ b/tests/spec/glsl-es-3.00/execution/varying-struct-centroid.c
@@ -78,6 +78,7 @@ PIGLIT_GL_TEST_CONFIG_END
 
 static const char vs_text[] =
 	"#version 300 es\n"
+	"precision mediump float;\n"
 	"in vec4 piglit_vertex;\n"
 	"struct Foo {\n"
 	"  vec4 v;\n"
-- 
1.9.1



More information about the Piglit mailing list