summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2009-09-20 13:54:59 +0200
committerMaciej Cencora <m.cencora@gmail.com>2009-09-21 21:13:01 +0200
commitff5535c5219047fc56f89c55ee44899d218dc234 (patch)
treeba5deb1045561c3d2ab0b191e66370e6e3283af7 /src/mesa/drivers/dri
parentdb928a5e9155001fd441a32aa5af7d59af02ca5d (diff)
radeon: update buffer map/unmap code for changes introduced in 92033a9516942d7272ce4bf36ecd422009bbaf60 and 822c7964819ca1fcc270880d4ca8b3de8a4276d0
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_buffer_objects.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
index a24b6dac26..8fac5c6c51 100644
--- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
+++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
@@ -187,7 +187,11 @@ radeonMapBuffer(GLcontext * ctx,
radeon_bo_map(radeon_obj->bo, access == GL_WRITE_ONLY_ARB);
- return obj->Pointer = radeon_obj->bo->ptr;
+ obj->Pointer = radeon_obj->bo->ptr;
+ obj->Length = obj->Size;
+ obj->Offset = 0;
+
+ return obj->Pointer;
}
@@ -203,9 +207,12 @@ radeonUnmapBuffer(GLcontext * ctx,
if (radeon_obj->bo != NULL) {
radeon_bo_unmap(radeon_obj->bo);
- obj->Pointer = NULL;
}
+ obj->Pointer = NULL;
+ obj->Offset = 0;
+ obj->Length = 0;
+
return GL_TRUE;
}