From: Ian Romanick <[email protected]>

Signed-off-by: Ian Romanick <[email protected]>
Cc: Vinson Lee <[email protected]>
Cc: Fredrik Höglund <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59331
---
 tests/spec/arb_uniform_buffer_object/getintegeri_v.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/spec/arb_uniform_buffer_object/getintegeri_v.c 
b/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
index e35e653..6850dae 100644
--- a/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
+++ b/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
@@ -78,11 +78,14 @@ piglit_init(int argc, char **argv)
        int size = 1024;
        GLint max_bindings;
        GLint junk;
+       GLint alignment;
 
        piglit_require_extension("GL_ARB_uniform_buffer_object");
 
        test_range(__LINE__, 0, 0, -1, -1);
 
+       glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &alignment);
+
        glGenBuffers(2, bo);
        glBindBuffer(GL_UNIFORM_BUFFER, bo[0]);
        glBufferData(GL_UNIFORM_BUFFER, size, NULL, GL_STATIC_READ);
@@ -90,9 +93,9 @@ piglit_init(int argc, char **argv)
        glBufferData(GL_UNIFORM_BUFFER, size, NULL, GL_STATIC_READ);
 
        glBindBufferRange(GL_UNIFORM_BUFFER, 0, bo[0], 0, 1);
-       glBindBufferRange(GL_UNIFORM_BUFFER, 1, bo[1], 2, 3);
+       glBindBufferRange(GL_UNIFORM_BUFFER, 1, bo[1], 2 * alignment, 3);
        test_range(__LINE__, 0, bo[0], 0, 1);
-       test_range(__LINE__, 1, bo[1], 2, 3);
+       test_range(__LINE__, 1, bo[1], 2 * alignment, 3);
 
        /* There's a bit of a contradiction in the spec.  On the one
         * hand, "BindBufferBase is equivalent to calling
-- 
1.7.11.7

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to