summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-03-04 11:59:00 +0000
committerJosé Fonseca <[email protected]>2009-03-04 11:59:00 +0000
commitcfd5298f240612ef69ae321aebbc425710a8d731 (patch)
tree2b201783f5df1fc2ba416a9ae9640354f2aac343 /src/mesa/vbo
parent004d8f11882c6c149a395cf2e86d5d5fb3fa114b (diff)
mesa: Implement and use FlushMappedBufferRange.
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index b08909c76fb..c85e142a5a7 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -240,6 +240,13 @@ static void vbo_exec_vtx_unmap( struct vbo_exec_context *exec )
if (exec->vtx.bufferobj->Name) {
GLcontext *ctx = exec->ctx;
+ GLintptr offset = exec->vtx.buffer_used;
+ GLsizeiptr length = (exec->vtx.buffer_ptr - exec->vtx.buffer_map) * sizeof(float);
+
+ if(ctx->Driver.FlushMappedBufferRange)
+ ctx->Driver.FlushMappedBufferRange(ctx, target,
+ offset, length,
+ exec->vtx.bufferobj);
exec->vtx.buffer_used += (exec->vtx.buffer_ptr -
exec->vtx.buffer_map) * sizeof(float);