summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_buffer_objects.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-09-24 16:15:52 -0700
committerEric Anholt <eric@anholt.net>2009-09-24 16:24:46 -0700
commitcc8084932cc552587e3036dbbf62c77db3b4a08e (patch)
tree94c79bc5258b4237092420cf23a0f2288187e993 /src/mesa/drivers/dri/intel/intel_buffer_objects.c
parent54107a097904129ff794534542acd09ed152ea2e (diff)
intel: Flush the batch when we're about to subdata into a VBO.mesa_7_6_rc1
This fixes the clears in openarena with the new metaops clear code, and the new piglit vbo-subdata-sync test. Bug #23857.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_buffer_objects.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c6
1 files changed, 5 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 c55c5c426e0..7f6fb66d52f 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -207,8 +207,12 @@ intel_bufferobj_subdata(GLcontext * ctx,
if (intel_obj->sys_buffer)
memcpy((char *)intel_obj->sys_buffer + offset, data, size);
- else
+ else {
+ /* Flush any existing batchbuffer that might reference this data. */
+ intelFlush(ctx);
+
dri_bo_subdata(intel_obj->buffer, offset, size, data);
+ }
}