I'm not intentionally singling this test out (which would have tried
to continue if a shader stage failed to compile), it's just the first
thing I looked at when I was going to crib code for a new GLES test,
and decided to go work on new util functions instead.
---
 tests/spec/glsl-es-3.00/execution/varying-struct-centroid.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

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 d1692a7..e8734b9 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,7 +78,7 @@ PIGLIT_GL_TEST_CONFIG_END
 
 static const char vs_text[] =
        "#version 300 es\n"
-       "in vec4 vertex;\n"
+       "in vec4 piglit_vertex;\n"
        "struct Foo {\n"
        "  vec4 v;\n"
        "};\n"
@@ -125,15 +125,7 @@ void
 piglit_init(int argc, char **argv)
 {
        /* Create the shaders */
-       prog = glCreateProgram();
-       glAttachShader(prog, piglit_compile_shader_text(GL_VERTEX_SHADER,
-                                                       vs_text));
-       glAttachShader(prog, piglit_compile_shader_text(GL_FRAGMENT_SHADER,
-                                                       fs_text));
-       glBindAttribLocation(prog, PIGLIT_ATTRIB_POS, "vertex");
-       glLinkProgram(prog);
-       if (!piglit_link_check_status(prog))
-               piglit_report_result(PIGLIT_FAIL);
+       prog = piglit_build_simple_program(vs_text, fs_text);
 
        /* Create the multisampled framebuffer */
        glGenFramebuffers(1, &fbo);
-- 
1.8.3.rc0

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to