[Mesa-dev] [PATCH 4/4] mesa/es: Validate glGetBufferParameteriv pname in Mesa code rather than the ES wrapper

Eric Anholt eric at anholt.net
Fri Aug 24 13:32:50 PDT 2012


Ian Romanick <idr at freedesktop.org> writes:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> v2: Add proper core-profile and GLES3 filtering.

> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 6ad0787..f8938a5 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -1142,7 +1142,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
>     switch (access) {
>     case GL_READ_ONLY_ARB:
>        accessFlags = GL_MAP_READ_BIT;
> -      valid_access = (ctx->API == API_OPENGL);
> +      valid_access = _mesa_is_desktop_gl(ctx);
>        break;
>     case GL_WRITE_ONLY_ARB:
>        accessFlags = GL_MAP_WRITE_BIT;
> @@ -1150,7 +1150,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
>        break;
>     case GL_READ_WRITE_ARB:
>        accessFlags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
> -      valid_access = (ctx->API == API_OPENGL);
> +      valid_access = _mesa_is_desktop_gl(ctx);
>        break;
>     default:
>        valid_access = false;

This hunk should be in 3/4.

Other than these two notes, I think this series is:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120824/5fd7eae6/attachment.pgp>


More information about the mesa-dev mailing list