From: Ian Romanick <[email protected]> If the shader uses the attribute piglit_vertex with the command "draw rect", assume that it wants to use generic vertex attributes. With the preceeding changes to piglit_draw_rect_from_arrays, "draw rect" should now function a desktop OpenGL core profile.
Signed-off-by: Ian Romanick <[email protected]> Cc: Matt Turner <[email protected]> Cc: Paul Berry <[email protected]> --- tests/shaders/shader_runner.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 6676601..7a87943 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -1669,7 +1669,11 @@ piglit_display(void) } else if (string_match("draw rect", line)) { program_must_be_in_use(); get_floats(line + 9, c, 4); - piglit_draw_rect(c[0], c[1], c[2], c[3]); + + if (glGetAttribLocation(prog, "piglit_vertex") >= 0) + piglit_draw_rect_shader(c[0], c[1], c[2], c[3]); + else + piglit_draw_rect(c[0], c[1], c[2], c[3]); } else if (string_match("draw instanced rect", line)) { int primcount; -- 1.8.1.4 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
