From ae86ebfcc9fb3e89744c3ee38766a505857b3e7a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 27 Jul 2012 07:49:49 -0700 Subject: mesa/es: Validate glGetRenderbufferParameter pname in Mesa code rather than the ES wrapper v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt --- src/mesa/main/fbobject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/fbobject.c') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 43fb6e863ce..5c36bd5a60d 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1572,7 +1572,8 @@ _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params) *params = get_component_bits(pname, rb->_BaseFormat, rb->Format); break; case GL_RENDERBUFFER_SAMPLES: - if (ctx->Extensions.ARB_framebuffer_object) { + if ((_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_framebuffer_object) + || _mesa_is_gles3(ctx)) { *params = rb->NumSamples; break; } -- cgit v1.2.3