summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-27 07:49:49 -0700
committerIan Romanick <[email protected]>2012-08-29 15:09:34 -0700
commitae86ebfcc9fb3e89744c3ee38766a505857b3e7a (patch)
tree8bf113490dd1e02c306c98eef58391b50aae405c /src
parent0cdaa471ecb7ce6442b5ed4a54314de0ffeab614 (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/APIspec.xml28
-rw-r--r--src/mesa/main/fbobject.c3
2 files changed, 2 insertions, 29 deletions
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 2e374e466b8..1b9481efebb 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -2203,34 +2203,6 @@
<param name="pname" type="GLenum"/>
<vector name="params" type="GLtype *" size="dynamic"/>
</proto>
-
- <desc name="pname" category="OES_framebuffer_object">
- <value name="GL_RENDERBUFFER_WIDTH_OES"/>
- <value name="GL_RENDERBUFFER_HEIGHT_OES"/>
- <value name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES"/>
- <value name="GL_RENDERBUFFER_RED_SIZE_OES"/>
- <value name="GL_RENDERBUFFER_GREEN_SIZE_OES"/>
- <value name="GL_RENDERBUFFER_BLUE_SIZE_OES"/>
- <value name="GL_RENDERBUFFER_ALPHA_SIZE_OES"/>
- <value name="GL_RENDERBUFFER_DEPTH_SIZE_OES"/>
- <value name="GL_RENDERBUFFER_STENCIL_SIZE_OES"/>
-
- <desc name="params" vector_size="1" convert="false"/>
- </desc>
-
- <desc name="pname" category="GLES2.0">
- <value name="GL_RENDERBUFFER_WIDTH"/>
- <value name="GL_RENDERBUFFER_HEIGHT"/>
- <value name="GL_RENDERBUFFER_INTERNAL_FORMAT"/>
- <value name="GL_RENDERBUFFER_RED_SIZE"/>
- <value name="GL_RENDERBUFFER_GREEN_SIZE"/>
- <value name="GL_RENDERBUFFER_BLUE_SIZE"/>
- <value name="GL_RENDERBUFFER_ALPHA_SIZE"/>
- <value name="GL_RENDERBUFFER_DEPTH_SIZE"/>
- <value name="GL_RENDERBUFFER_STENCIL_SIZE"/>
-
- <desc name="params" vector_size="1" convert="false"/>
- </desc>
</template>
<template name="IsRenderbuffer" direction="get">
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;
}