summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_draw.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-08-21 18:34:27 -0700
committerIan Romanick <[email protected]>2011-08-23 14:52:11 -0700
commit28249bd260f4c52badf3eb61ade2744604b21bca (patch)
treef9b85dee32fed632243ecfd72bde53d6e99b0231 /src/mesa/vbo/vbo_exec_draw.c
parentcccc7412c22a704d85203d7bb9c8e73d45cccf49 (diff)
mesa: Eliminate dd_function_table::MapBuffer
Replace all calls to dd_function_table::MapBuffer with appropriate calls to dd_function_table::MapBufferRange, then remove all the cruft. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 2dc60661796..25436c6d6d2 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -296,7 +296,6 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
{
struct gl_context *ctx = exec->ctx;
const GLenum target = GL_ARRAY_BUFFER_ARB;
- const GLenum access = GL_READ_WRITE_ARB; /* for MapBuffer */
const GLenum accessRange = GL_MAP_WRITE_BIT | /* for MapBufferRange */
GL_MAP_INVALIDATE_RANGE_BIT |
GL_MAP_UNSYNCHRONIZED_BIT |
@@ -310,8 +309,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
assert(!exec->vtx.buffer_map);
assert(!exec->vtx.buffer_ptr);
- if (VBO_VERT_BUFFER_SIZE > exec->vtx.buffer_used + 1024 &&
- ctx->Driver.MapBufferRange) {
+ if (VBO_VERT_BUFFER_SIZE > exec->vtx.buffer_used + 1024) {
/* The VBO exists and there's room for more */
exec->vtx.buffer_map =
(GLfloat *)ctx->Driver.MapBufferRange(ctx,
@@ -332,15 +330,11 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
NULL, usage, exec->vtx.bufferobj);
- if (ctx->Driver.MapBufferRange)
- exec->vtx.buffer_map =
- (GLfloat *)ctx->Driver.MapBufferRange(ctx,
- 0, VBO_VERT_BUFFER_SIZE,
- accessRange,
- exec->vtx.bufferobj);
- if (!exec->vtx.buffer_map)
- exec->vtx.buffer_map =
- (GLfloat *)ctx->Driver.MapBuffer(ctx, access, exec->vtx.bufferobj);
+ exec->vtx.buffer_map =
+ (GLfloat *)ctx->Driver.MapBufferRange(ctx,
+ 0, VBO_VERT_BUFFER_SIZE,
+ accessRange,
+ exec->vtx.bufferobj);
assert(exec->vtx.buffer_map);
exec->vtx.buffer_ptr = exec->vtx.buffer_map;
}