summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-12-27 16:42:44 -0800
committerEric Anholt <[email protected]>2012-01-04 09:51:17 -0800
commit15e309cf84444a8f9ce7f7c86f0a0f391721bc50 (patch)
tree38405c109f3db837f57f8c34c6222915121c8b64 /src
parent3bc4959b14a81ac2b4153acbf63d863d108342cf (diff)
intel: Fix bad read/write flags on self-copies for glCopyBufferSubData().
We didn't consume these flags in any way that would produce a functional difference, but we might have some day. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c4
1 files changed, 3 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 4a1a8165be5..9b1f642c0f1 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -663,7 +663,9 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
*/
if (src == dst) {
char *ptr = intel_bufferobj_map_range(ctx, 0, dst->Size,
- GL_MAP_READ_BIT, dst);
+ GL_MAP_READ_BIT |
+ GL_MAP_WRITE_BIT,
+ dst);
memmove(ptr + write_offset, ptr + read_offset, size);
intel_bufferobj_unmap(ctx, dst);
} else {