[Mesa-dev] [PATCH 2/9] mesa: Disallow SNORM formats for renderbuffers in OpenGL ES
Ian Romanick
idr at freedesktop.org
Wed Dec 19 15:58:36 PST 2012
From: Ian Romanick <ian.d.romanick at intel.com>
v2: Move {RED,RG,RGB,RGBA}_SNORM changes from the previous commit to
this commit. Based on suggestions from Ken.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Marek Olšák <maraeo at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/mesa/main/fbobject.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 0ae4d38..ab53bac 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1169,35 +1169,23 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
return ctx->API != API_OPENGLES && ctx->Extensions.ARB_texture_rg
? GL_RG : 0;
/* signed normalized texture formats */
- case GL_R8_SNORM:
- return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.EXT_texture_snorm)
- ? GL_RED : 0;
case GL_RED_SNORM:
+ case GL_R8_SNORM:
case GL_R16_SNORM:
return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
? GL_RED : 0;
- case GL_RG8_SNORM:
- return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.EXT_texture_snorm)
- ? GL_RG : 0;
case GL_RG_SNORM:
+ case GL_RG8_SNORM:
case GL_RG16_SNORM:
return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
? GL_RG : 0;
- case GL_RGB8_SNORM:
- return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.EXT_texture_snorm)
- ? GL_RGB : 0;
case GL_RGB_SNORM:
+ case GL_RGB8_SNORM:
case GL_RGB16_SNORM:
return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
? GL_RGB : 0;
- case GL_RGBA8_SNORM:
- return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.EXT_texture_snorm)
- ? GL_RGBA : 0;
case GL_RGBA_SNORM:
+ case GL_RGBA8_SNORM:
case GL_RGBA16_SNORM:
return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_snorm
? GL_RGBA : 0;
--
1.7.11.7
More information about the mesa-dev
mailing list