summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-09-24 20:03:21 -0700
committerEric Anholt <eric@anholt.net>2009-09-24 20:04:42 -0700
commit126d62edd18f22ff9e744efea81e0383cd0a19c5 (patch)
tree6e605013bba4f53827b400e8346b70becd4bad10
parent1730b8db1237485778abdc4ae37e122414b5423b (diff)
i915: Fix GetBufferSubData in the case of a system-memory BO.mesa_7_5_2_rc1
Bug #23760 (crashes in wine)
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 2e6b77824d..db0de0343a 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -209,7 +209,10 @@ intel_bufferobj_get_subdata(GLcontext * ctx,
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
assert(intel_obj);
- dri_bo_get_subdata(intel_obj->buffer, offset, size, data);
+ if (intel_obj->sys_buffer)
+ memcpy(data, (char *)intel_obj->sys_buffer + offset, size);
+ else
+ dri_bo_get_subdata(intel_obj->buffer, offset, size, data);
}