mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 16:30:29 +01:00
mesa: Disallow SNORM formats for renderbuffers in OpenGL ES
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@intel.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
4b92379da2
commit
2aae3abd77
1 changed files with 4 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue