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

Chad Versace chad.versace at linux.intel.com
Thu Dec 29 12:01:06 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 {


Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

- ----
Chad Versace
chad.versace at linux.intel.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIbBAEBAgAGBQJO/McBAAoJEAIvNt057x8iurQP+PYwcn/TiQhWHzeRde2jxnDs
nOP/Qm79mGNpxncGOxeXMmr8J/GzYFMLfRDLgBIq1q86myEBgi6s0teL26nBQyFM
0ZGOQ/3JuDDlR52FMkQeFzLQpI0uB+BWvyKHB88hh46Z+/ztdULeYSqlqvRjRvWz
ls1g1DwzFFzLGxN3NaaUbQyqI2EXu4kMJOpNHO+3M2DOqQgwX1YXVIl6UcDWIjqM
xAY/wnGfEoNci3PPTF2u2B01EzBfOf0jMT4SzsypBXrNjo+Fzm+VYYp55ylN9Ks0
nPPcSDZcjqH0YwCv2s5EF/fOuWDeDX8U20XowZ55woi4Cp/SrhxHJaAYM+P8zW6B
0KN63Gg+Uwrcu0LJWfAPOVVqAwpvi8zu8gPWIh7UntVoJtLHBsq3mOdGh8pg19HO
1TXl+943jdC7nigWy/foanZtJKJYygyr9O+KB4N9ukFDvbUJvGXw0cTWJlCZOvF1
yRPnGch4zQV6CPUYjIkcwakTN21NmFMQKooUn9j+NEj40UHR3sRx/UZurWF1UBRX
YQzwI48Jtx+eNO2klSbF9D9gcDgsfmwGw7Pzci1FsiLgjIxuCCAaPQ/5AmiKpsdC
ppa3F3E1ac1dc5+aBesCC4UFwcy3BVHQ2Juy7D+LXRGmzJzZGUEUNOSiL6xt8c7x
ZAs68Uovx9LLH0DWT6w=
=/k3Z
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list