If we're running an ARB_vertex/fragment_program test, there will be
no GLSL shader program and 'prog' will be zero. Return early to avoid
generating an error from the GL_ACTIVE_UNIFORM_BLOCKS query.
---
tests/shaders/shader_runner.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 1a144a2..d78514b 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1639,6 +1639,11 @@ setup_ubos(void)
return;
}
+ if (prog == 0) {
+ /* probably running an ARB_vertex/fragment_program test */
+ return;
+ }
+
glGetProgramiv(prog, GL_ACTIVE_UNIFORM_BLOCKS, &num_uniform_blocks);
if (num_uniform_blocks == 0)
return;
--
1.7.10.4
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit