diff options
author | Ian Romanick <[email protected]> | 2011-08-29 09:37:24 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-09-06 12:08:25 -0700 |
commit | eba527bf9ffc2fd67c44fb77104107556f509b49 (patch) | |
tree | 0cf5ef242a98a43f3293039b3dfb912ed6333865 /src/mesa/main/teximage.c | |
parent | becd54eedb26ec9076e6f5f98f485861b3e13a90 (diff) |
mesa: Remove API facing bits of EXT_paletted_texture and EXT_shared_texture_palette
This was also discussed at XDS 2010. However, actually making the
change was delayed because several drivers still exposed these
extensions to significant benefit (e.g., tdfx). Now that those
drivers have been removed, this code can be removed as well.
v2: A lot of bits that were missed in the previous patch have been removed.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 886e52114f2..cb4a5b4e437 100644 --- a/src/mesa/main/teximage.c +++ b/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)) || |