i915: Initialize Length and Offset fields when mapping a buffer object
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 24 Nov 2009 07:14:49 +0000 (23:14 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 24 Nov 2009 07:14:49 +0000 (23:14 -0800)
This fixes an assertion failure in _mesa_MapBufferARB.

Fixes bugzilla #25253.

src/mesa/drivers/dri/intel/intel_buffer_objects.c

index a0225936c81648a133c1eec15b2ab95f2185b527..ccce9e712d84f3451b8bd17e2d63f6109ad10013 100644 (file)
@@ -254,6 +254,8 @@ intel_bufferobj_map(GLcontext * ctx,
 
    if (intel_obj->sys_buffer) {
       obj->Pointer = intel_obj->sys_buffer;
+      obj->Length = obj->Size;
+      obj->Offset = 0;
       return obj->Pointer;
    }