aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-08 11:05:14 +0200
committermarha <marha@users.sourceforge.net>2011-09-08 11:05:14 +0200
commit32071a97fb69e2cb5a5dc86016b181a5afd2a87b (patch)
tree23a05e63a91e56c1c97a3c7b991e3acf46893e2f /mesalib/src/mesa/main/teximage.c
parent553aee48675d816bf041a61ab01bb73f8602d365 (diff)
parent23a7aebae0a742d94ffe2304357dcc1234a99155 (diff)
downloadvcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.tar.gz
vcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.tar.bz2
vcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/docs/relnotes.html mesalib/scons/gallium.py mesalib/src/mesa/drivers/common/driverfuncs.c mesalib/src/mesa/main/colortab.c mesalib/src/mesa/main/dd.h mesalib/src/mesa/main/enable.c mesalib/src/mesa/main/formats.c mesalib/src/mesa/main/framebuffer.c mesalib/src/mesa/main/get.c mesalib/src/mesa/main/mtypes.h mesalib/src/mesa/main/pack.c mesalib/src/mesa/main/texgetimage.c mesalib/src/mesa/main/teximage.c mesalib/src/mesa/main/texobj.c mesalib/src/mesa/main/texparam.c mesalib/src/mesa/main/texstate.c mesalib/src/mesa/swrast/s_drawpix.c mesalib/src/mesa/vbo/vbo_attrib_tmp.h
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 1aae03b5f..21bea6587 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -159,21 +159,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
- if (ctx->Extensions.EXT_paletted_texture) {
- switch (internalFormat) {
- case GL_COLOR_INDEX:
- case GL_COLOR_INDEX1_EXT:
- case GL_COLOR_INDEX2_EXT:
- case GL_COLOR_INDEX4_EXT:
- case GL_COLOR_INDEX8_EXT:
- case GL_COLOR_INDEX12_EXT:
- case GL_COLOR_INDEX16_EXT:
- return GL_COLOR_INDEX;
- default:
- ; /* fallthrough */
- }
- }
-
if (ctx->Extensions.ARB_depth_texture) {
switch (internalFormat) {
case GL_DEPTH_COMPONENT:
@@ -1554,7 +1539,13 @@ texture_error_check( struct gl_context *ctx,
const GLenum proxyTarget = get_proxy_target(target);
const GLboolean isProxy = target == proxyTarget;
GLboolean sizeOK = GL_TRUE;
- GLboolean colorFormat, indexFormat;
+ GLboolean colorFormat;
+
+ /* Even though there are no color-index textures, we still have to support
+ * uploading color-index data and remapping it to RGB via the
+ * GL_PIXEL_MAP_I_TO_[RGBA] tables.
+ */
+ const GLboolean indexFormat = (format == GL_COLOR_INDEX);
/* Basic level check (more checking in ctx->Driver.TestProxyTexImage) */
if (level < 0 || level >= MAX_TEXTURE_LEVELS) {
@@ -1635,9 +1626,7 @@ texture_error_check( struct gl_context *ctx,
/* make sure internal format and format basically agree */
colorFormat = _mesa_is_color_format(format);
- indexFormat = _mesa_is_index_format(format);
if ((_mesa_is_color_format(internalFormat) && !colorFormat && !indexFormat) ||
- (_mesa_is_index_format(internalFormat) && !indexFormat) ||
(_mesa_is_depth_format(internalFormat) != _mesa_is_depth_format(format)) ||
(_mesa_is_ycbcr_format(internalFormat) != _mesa_is_ycbcr_format(format)) ||
(_mesa_is_depthstencil_format(internalFormat) != _mesa_is_depthstencil_format(format)) ||