[Piglit] [PATCH] shader_runner: Set uniform block bindings for multiple UBOs
Chris Forbes
chrisf at ijw.co.nz
Sun Jul 6 01:08:58 PDT 2014
glLinkProgram (re)sets all uniform block bindings to zero. If we want
to actually use multiple uniform blocks, we need to call
glUniformBlockBinding to specify which binding point goes with which
uniform block.
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
tests/shaders/shader_runner.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index fce5e9d..410ade6 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1990,6 +1990,8 @@ setup_ubos(void)
glBindBuffer(GL_UNIFORM_BUFFER, uniform_block_bos[i]);
glBufferData(GL_UNIFORM_BUFFER, size, NULL, GL_STATIC_DRAW);
glBindBufferBase(GL_UNIFORM_BUFFER, i, uniform_block_bos[i]);
+
+ glUniformBlockBinding(prog, i, i);
}
}
--
2.0.1
More information about the Piglit
mailing list