[Piglit] [PATCH 09/15] arb_direct_state_access: Testing MapNamedBufferRange.

Laura Ekstrand laura at jlekstrand.net
Fri Jan 23 11:03:33 PST 2015


---
 tests/spec/arb_direct_state_access/namedbufferstorage.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/spec/arb_direct_state_access/namedbufferstorage.c b/tests/spec/arb_direct_state_access/namedbufferstorage.c
index c68bc27..a997311 100644
--- a/tests/spec/arb_direct_state_access/namedbufferstorage.c
+++ b/tests/spec/arb_direct_state_access/namedbufferstorage.c
@@ -63,22 +63,19 @@ create_mapped_buffer(GLuint *buffer, GLfloat **map, GLboolean coherent,
 			     (coherent ? GL_MAP_COHERENT_BIT : 0) |
 			     GL_DYNAMIC_STORAGE_BIT |
 			     (client_storage ? GL_CLIENT_STORAGE_BIT : 0));
-	glBindBuffer(GL_ARRAY_BUFFER, *buffer);
 
 	piglit_check_gl_error(GL_NO_ERROR);
 
-	*map = glMapBufferRange(GL_ARRAY_BUFFER, 0, BUF_SIZE,
-			        GL_MAP_WRITE_BIT |
-			        GL_MAP_PERSISTENT_BIT |
-			        (coherent ? GL_MAP_COHERENT_BIT : 0));
+	*map = glMapNamedBufferRange(*buffer, 0, BUF_SIZE,
+				     GL_MAP_WRITE_BIT |
+			             GL_MAP_PERSISTENT_BIT |
+			             (coherent ? GL_MAP_COHERENT_BIT : 0));
 
 	piglit_check_gl_error(GL_NO_ERROR);
 
 	if (!*map)
 		return false;
 
-	glBindBuffer(GL_ARRAY_BUFFER, 0);
-
 	return true;
 }
 
-- 
2.1.0



More information about the Piglit mailing list