[Piglit] [PATCH] shader_runner: check for no GLSL program in setup_ubos()
Brian Paul
brianp at vmware.com
Wed Nov 20 15:06:44 PST 2013
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
More information about the Piglit
mailing list