[Piglit] [PATCH 3/5] shader_runner: Set a VAO in a GL 3.1 context
Ian Romanick
idr at freedesktop.org
Tue Nov 13 17:00:20 PST 2012
From: Ian Romanick <ian.d.romanick at intel.com>
There's no default VAO (without GL_ARB_compatibility), so we have to
create and bind one.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
tests/shaders/shader_runner.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index e92aefd..2465464 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1625,8 +1625,16 @@ piglit_init(int argc, char **argv)
process_test_script(argv[1]);
link_and_use_shaders();
- if (vertex_data_start != NULL)
+ if (vertex_data_start != NULL) {
+ if (gl_version >= 31) {
+ GLuint vao;
+
+ glGenVertexArrays(1, &vao);
+ glBindVertexArray(vao);
+ }
+
num_vbo_rows = setup_vbo_from_text(prog, vertex_data_start,
vertex_data_end);
+ }
setup_ubos();
}
--
1.7.11.7
More information about the Piglit
mailing list