[Piglit] [PATCH] genned-names: correct the parameter for glBindBufferRange

Sandra Koroniewska sandra.koroniewska at gmail.com
Fri May 5 18:26:47 UTC 2017


This fixes
tests/spec/gl-3.1/genned-names on Windows Intel driver. According to OpenGL 3.1 Spec Page 63 for BindBufferRange "The error INVALID_VALUE is generated (...) if offset is not a multiple of the implementation-dependent required alignment
(UNIFORM_BUFFER_OFFSET_ALIGNMENT)."
---
 tests/spec/gl-3.1/genned-names.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/spec/gl-3.1/genned-names.c b/tests/spec/gl-3.1/genned-names.c
index bc75ae4d6..38e02f159 100644
--- a/tests/spec/gl-3.1/genned-names.c
+++ b/tests/spec/gl-3.1/genned-names.c
@@ -154,10 +154,13 @@ test_bindbuffer_tfb()
 {
 	bool pass = true;
 
+    GLint uniformBufferAlignSize = 0;
+    glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &uniformBufferAlignSize);
+
 	glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, 600);
 	pass = piglit_check_gl_error(GL_INVALID_OPERATION) && pass;
 
-	glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, 601, 0, 1);
+    glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, 601, 0, uniformBufferAlignSize);
 	pass = piglit_check_gl_error(GL_INVALID_OPERATION) && pass;
 
 	return pass;
-- 
2.11.0.windows.1



More information about the Piglit mailing list