diff options
author | Ian Romanick <[email protected]> | 2012-07-27 07:16:41 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-08-24 19:15:20 -0700 |
commit | f9767dac9a06aad93a9d61d108055ad673498bf8 (patch) | |
tree | fb99590946056441a4f48bd1c2a6057aff10a646 /src/mesa/main/bufferobj.c | |
parent | 93d109645a2b3d43b4b0106f2b496ece11970c01 (diff) |
mesa/es: Validate glGetBufferParameteriv pname in Mesa code rather than the ES wrapper
v2: Add proper core-profile and GLES3 filtering.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index d800a4f0f96..f8938a51054 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1311,17 +1311,20 @@ _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params) *params = _mesa_bufferobj_mapped(bufObj); return; case GL_BUFFER_ACCESS_FLAGS: - if (!ctx->Extensions.ARB_map_buffer_range) + if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_map_buffer_range) + && !_mesa_is_gles3(ctx)) goto invalid_pname; *params = bufObj->AccessFlags; return; case GL_BUFFER_MAP_OFFSET: - if (!ctx->Extensions.ARB_map_buffer_range) + if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_map_buffer_range) + && !_mesa_is_gles3(ctx)) goto invalid_pname; *params = (GLint) bufObj->Offset; return; case GL_BUFFER_MAP_LENGTH: - if (!ctx->Extensions.ARB_map_buffer_range) + if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_map_buffer_range) + && !_mesa_is_gles3(ctx)) goto invalid_pname; *params = (GLint) bufObj->Length; return; |