[Mesa-dev] [PATCH 4/5] mesa/es: Validate glGetRenderbufferParameter pname in Mesa code rather than the ES wrapper
Ian Romanick
idr at freedesktop.org
Fri Aug 24 08:46:12 PDT 2012
From: Ian Romanick <ian.d.romanick at intel.com>
v2: Add proper core-profile and GLES3 filtering.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/APIspec.xml | 28 ----------------------------
src/mesa/main/fbobject.c | 3 ++-
2 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 2e374e4..1b9481e 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 1d2047f..4e869df 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;
}
--
1.7.6.5
More information about the mesa-dev
mailing list