diff options
author | marha <marha@users.sourceforge.net> | 2011-09-05 08:42:34 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-05 08:42:34 +0200 |
commit | 324c1ed4069c7d49d0ff7c63261281148f9b6cd8 (patch) | |
tree | b03f9a87fc540816c1c78c325a53aed6240db739 /mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c | |
parent | 746359d2f7e675a0bfc48a4ba6f8200cace98df2 (diff) | |
download | vcxsrv-324c1ed4069c7d49d0ff7c63261281148f9b6cd8.tar.gz vcxsrv-324c1ed4069c7d49d0ff7c63261281148f9b6cd8.tar.bz2 vcxsrv-324c1ed4069c7d49d0ff7c63261281148f9b6cd8.zip |
git update libxcb mesa 5 sep 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c index a451b4404..aab7444e2 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -229,13 +229,6 @@ st_bufferobj_data(struct gl_context *ctx, /** - * Dummy data whose's pointer is used for zero size buffers or ranges. - */ -static long st_bufferobj_zero_length = 0; - - - -/** * Called via glMapBufferRange(). */ static void * @@ -280,24 +273,15 @@ st_bufferobj_map_range(struct gl_context *ctx, assert(offset < obj->Size); assert(offset + length <= obj->Size); - /* - * We go out of way here to hide the degenerate yet valid case of zero - * length range from the pipe driver. - */ - if (!length) { - obj->Pointer = &st_bufferobj_zero_length; - } - else { - obj->Pointer = pipe_buffer_map_range(pipe, - st_obj->buffer, - offset, length, - flags, - &st_obj->transfer); - if (obj->Pointer) { - obj->Pointer = (ubyte *) obj->Pointer + offset; - } + obj->Pointer = pipe_buffer_map_range(pipe, + st_obj->buffer, + offset, length, + flags, + &st_obj->transfer); + if (obj->Pointer) { + obj->Pointer = (ubyte *) obj->Pointer + offset; } - + if (obj->Pointer) { obj->Offset = offset; obj->Length = length; |