From b97b64ca071b93d8e390c395edcf5f061556212a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 4 Nov 2015 12:04:58 -0800 Subject: ext_texture_array: Use piglit_build_simple_program I don't think piglit_build_simple_program supported piglit_vertex and piglit_texcoord when this test was written, but it does now. Use it! Signed-off-by: Ian Romanick Reviewed-by: Matt Turner --- tests/spec/ext_texture_array/compressed.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'tests/spec/ext_texture_array') diff --git a/tests/spec/ext_texture_array/compressed.c b/tests/spec/ext_texture_array/compressed.c index cc45cc9cf..f8acc1d16 100644 --- a/tests/spec/ext_texture_array/compressed.c +++ b/tests/spec/ext_texture_array/compressed.c @@ -86,24 +86,22 @@ PIGLIT_GL_TEST_CONFIG_END static const char vs_text[] = #ifdef PIGLIT_USE_OPENGL "#version 120\n" - "#define piglit_Vertex gl_Vertex\n" - "#define piglit_MultiTexCoord0 gl_MultiTexCoord0\n" "#define piglit_in attribute\n" "#define piglit_out varying\n" #else // PIGLIT_USE_OPENGL_ES3 "#version 300 es\n" "#define piglit_in in\n" "#define piglit_out out\n" - "piglit_in vec4 piglit_Vertex;\n" - "piglit_in vec4 piglit_MultiTexCoord0;\n" #endif + "piglit_in vec4 piglit_vertex;\n" + "piglit_in vec4 piglit_texcoord;\n" "piglit_out vec3 texcoord;\n" "uniform mat4 proj;\n" "uniform int layer;\n" "void main()\n" "{\n" - " gl_Position = proj * piglit_Vertex;\n" - " texcoord = vec3(piglit_MultiTexCoord0.xy, float(layer));\n" + " gl_Position = proj * piglit_vertex;\n" + " texcoord = vec3(piglit_texcoord.xy, float(layer));\n" "}\n"; static const char fs_text[] = @@ -251,12 +249,7 @@ piglit_init(int argc, char **argv) } /* Create the shaders */ - prog = piglit_build_simple_program_unlinked(vs_text, fs_text); - glBindAttribLocation(prog, PIGLIT_ATTRIB_POS, "piglit_Vertex"); - glBindAttribLocation(prog, PIGLIT_ATTRIB_TEX, "piglit_MultiTexCoord0"); - glLinkProgram(prog); - if (!piglit_link_check_status(prog)) - piglit_report_result(PIGLIT_FAIL); + prog = piglit_build_simple_program(vs_text, fs_text); proj_loc = glGetUniformLocation(prog, "proj"); layer_loc = glGetUniformLocation(prog, "layer"); if (!piglit_check_gl_error(GL_NO_ERROR)) -- cgit v1.2.3