[Mesa-dev] [PATCH 1/3] intel: Fix bad read/write flags on self-copies for glCopyBufferSubData().

Kenneth Graunke kenneth at whitecape.org
Mon Jan 2 02:51:30 PST 2012


On 12/28/2011 11:14 AM, Eric Anholt wrote:
> We didn't consume these flags in any way that would produce a
> functional difference, but we might have some day.
> ---
>  src/mesa/drivers/dri/intel/intel_buffer_objects.c |    4 +++-
>  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 4a1a816..9b1f642 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 {

For the series (1-3):
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list