From: Eric Anholt Date: Wed, 2 Sep 2009 05:07:37 +0000 (-0700) Subject: intel: Move MapBufferRange mesa state setting up to cover the 915 case. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aecba6b1c8c6a82018183460450f5a4bf53d02ce;p=mesa.git intel: Move MapBufferRange mesa state setting up to cover the 915 case. --- diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index 920da1f4e07..b7e50b0027b 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -299,6 +299,13 @@ intel_bufferobj_map_range(GLcontext * ctx, assert(intel_obj); + /* _mesa_MapBufferRange (GL entrypoint) sets these, but the vbo module also + * internally uses our functions directly. + */ + obj->Offset = offset; + obj->Length = length; + obj->AccessFlags = access; + if (intel_obj->sys_buffer) { obj->Pointer = intel_obj->sys_buffer + offset; return obj->Pointer; @@ -314,13 +321,6 @@ intel_bufferobj_map_range(GLcontext * ctx, if ((access & GL_MAP_WRITE_BIT) && !(access & GL_MAP_UNSYNCHRONIZED_BIT)) intelFlush(ctx); - /* _mesa_MapBufferRange (GL entrypoint) sets these, but the vbo module also - * internally uses our functions directly. - */ - obj->Offset = offset; - obj->Length = length; - obj->AccessFlags = access; - if (intel_obj->buffer == NULL) { obj->Pointer = NULL; return NULL;