[Piglit] [PATCH] ARB_ubo/maxuniformblocksize: unmap buffer before drawing with it

Christoph Bumiller christoph.bumiller at speed.at
Wed Apr 3 03:23:37 PDT 2013


From: Christoph Bumiller <e0425955 at student.tuwien.ac.at>

>From the description of glMapBuffer:
"A mapped data store must be unmapped with glUnmapBuffer before its
buffer object is used.
Otherwise an error will be generated by any GL command that
attempts to dereference the buffer object's data store."
---
 .../maxuniformblocksize.c                          |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c b/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c
index d29b0f7..c109328 100644
--- a/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c
+++ b/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c
@@ -199,6 +199,7 @@ piglit_display(void)
 	data[(vec4s - 1) * 4 + 1] = 1.0;
 	data[(vec4s - 1) * 4 + 2] = 0.0;
 	data[(vec4s - 1) * 4 + 3] = 0.0;
+	glUnmapBuffer(GL_UNIFORM_BUFFER);
 
 	glUseProgram(prog);
 	i_location = glGetUniformLocation(prog, "i");
-- 
1.7.3.4



More information about the Piglit mailing list