From: Maciej Cencora Date: Sun, 20 Sep 2009 11:54:59 +0000 (+0200) Subject: radeon: update buffer map/unmap code for changes introduced in 92033a9516942d7272ce4b... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4916a5a2e72b05c176809dd0db5066a966a45b80;p=mesa.git radeon: update buffer map/unmap code for changes introduced in 92033a9516942d7272ce4bf36ecd422009bbaf60 and 822c7964819ca1fcc270880d4ca8b3de8a4276d0 --- diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c index a24b6dac265..8fac5c6c512 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; }