diff options
author | marha <marha@users.sourceforge.net> | 2014-01-26 20:19:23 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-26 20:19:23 +0100 |
commit | 5f455179ae4b279a82d99a7a3dabe61f58c42ad6 (patch) | |
tree | fdecec022cf1b8b782b90a64c14e374fa6d400cb /mesalib/src/mesa/main/glformats.c | |
parent | 78d84bd03c744b0ed420c450dd2807904ccaef21 (diff) | |
parent | 30af30b78075159fce477ae99cc72540133714d0 (diff) | |
download | vcxsrv-5f455179ae4b279a82d99a7a3dabe61f58c42ad6.tar.gz vcxsrv-5f455179ae4b279a82d99a7a3dabe61f58c42ad6.tar.bz2 vcxsrv-5f455179ae4b279a82d99a7a3dabe61f58c42ad6.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver randrproto libxtrans fontconfig libxcb xcb-proto mesa git update 26 Jan 2014
Conflicts:
X11/xtrans/Xtrans.c
xorg-server/dix/dispatch.c
xorg-server/os/xdmcp.c
Diffstat (limited to 'mesalib/src/mesa/main/glformats.c')
-rw-r--r-- | mesalib/src/mesa/main/glformats.c | 130 |
1 files changed, 56 insertions, 74 deletions
diff --git a/mesalib/src/mesa/main/glformats.c b/mesalib/src/mesa/main/glformats.c index bec7a9bbb..7d4a31057 100644 --- a/mesalib/src/mesa/main/glformats.c +++ b/mesalib/src/mesa/main/glformats.c @@ -1136,76 +1136,60 @@ GLenum _mesa_get_nongeneric_internalformat(GLenum format) { switch (format) { - /* GL 1.1 formats. */ - case 4: - case GL_RGBA: - return GL_RGBA8; - - case 3: - case GL_RGB: - return GL_RGB8; - - case 2: - case GL_LUMINANCE_ALPHA: - return GL_LUMINANCE8_ALPHA8; - - case 1: - case GL_LUMINANCE: - return GL_LUMINANCE8; - - case GL_ALPHA: - return GL_ALPHA8; - - case GL_INTENSITY: - return GL_INTENSITY8; - - /* GL_ARB_texture_rg */ - case GL_RED: - return GL_R8; - - case GL_RG: - return GL_RG8; - - /* GL_EXT_texture_sRGB */ - case GL_SRGB: - return GL_SRGB8; - - case GL_SRGB_ALPHA: - return GL_SRGB8_ALPHA8; - - case GL_SLUMINANCE: - return GL_SLUMINANCE8; - - case GL_SLUMINANCE_ALPHA: - return GL_SLUMINANCE8_ALPHA8; - - /* GL_EXT_texture_snorm */ - case GL_RGBA_SNORM: - return GL_RGBA8_SNORM; - - case GL_RGB_SNORM: - return GL_RGB8_SNORM; - - case GL_RG_SNORM: - return GL_RG8_SNORM; - - case GL_RED_SNORM: - return GL_R8_SNORM; - - case GL_LUMINANCE_ALPHA_SNORM: - return GL_LUMINANCE8_ALPHA8_SNORM; - - case GL_LUMINANCE_SNORM: - return GL_LUMINANCE8_SNORM; + /* GL 1.1 formats. */ + case 4: + case GL_RGBA: + return GL_RGBA8; + case 3: + case GL_RGB: + return GL_RGB8; + case 2: + case GL_LUMINANCE_ALPHA: + return GL_LUMINANCE8_ALPHA8; + case 1: + case GL_LUMINANCE: + return GL_LUMINANCE8; + case GL_ALPHA: + return GL_ALPHA8; + case GL_INTENSITY: + return GL_INTENSITY8; - case GL_ALPHA_SNORM: - return GL_ALPHA8_SNORM; + /* GL_ARB_texture_rg */ + case GL_RED: + return GL_R8; + case GL_RG: + return GL_RG8; - case GL_INTENSITY_SNORM: - return GL_INTENSITY8_SNORM; + /* GL_EXT_texture_sRGB */ + case GL_SRGB: + return GL_SRGB8; + case GL_SRGB_ALPHA: + return GL_SRGB8_ALPHA8; + case GL_SLUMINANCE: + return GL_SLUMINANCE8; + case GL_SLUMINANCE_ALPHA: + return GL_SLUMINANCE8_ALPHA8; + + /* GL_EXT_texture_snorm */ + case GL_RGBA_SNORM: + return GL_RGBA8_SNORM; + case GL_RGB_SNORM: + return GL_RGB8_SNORM; + case GL_RG_SNORM: + return GL_RG8_SNORM; + case GL_RED_SNORM: + return GL_R8_SNORM; + case GL_LUMINANCE_ALPHA_SNORM: + return GL_LUMINANCE8_ALPHA8_SNORM; + case GL_LUMINANCE_SNORM: + return GL_LUMINANCE8_SNORM; + case GL_ALPHA_SNORM: + return GL_ALPHA8_SNORM; + case GL_INTENSITY_SNORM: + return GL_INTENSITY8_SNORM; - default: - return format; + default: + return format; } } @@ -1219,22 +1203,20 @@ _mesa_get_linear_internalformat(GLenum format) switch (format) { case GL_SRGB: return GL_RGB; - case GL_SRGB_ALPHA: return GL_RGBA; - case GL_SRGB8: return GL_RGB8; - case GL_SRGB8_ALPHA8: return GL_RGBA8; - - case GL_SLUMINANCE: + case GL_SLUMINANCE8: return GL_LUMINANCE8; - + case GL_SLUMINANCE: + return GL_LUMINANCE; case GL_SLUMINANCE_ALPHA: + return GL_LUMINANCE_ALPHA; + case GL_SLUMINANCE8_ALPHA8: return GL_LUMINANCE8_ALPHA8; - default: return format; } |