mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
mesa: Remove all mention of GL_COLOR_INDEX*_EXT
These enums were only valid with the paletted texture extensions. This allows a couple other trivial clean-ups. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
eb805a5182
commit
0b6dd75058
3 changed files with 2 additions and 36 deletions
|
|
@ -249,12 +249,6 @@ _mesa_components_in_format( GLenum format )
|
|||
{
|
||||
switch (format) {
|
||||
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:
|
||||
case GL_STENCIL_INDEX:
|
||||
case GL_DEPTH_COMPONENT:
|
||||
case GL_RED:
|
||||
|
|
@ -862,27 +856,6 @@ _mesa_is_color_format(GLenum format)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test if the given image format is a color index format.
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_is_index_format(GLenum format)
|
||||
{
|
||||
switch (format) {
|
||||
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_TRUE;
|
||||
default:
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test if the given image format is a depth component format.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -60,9 +60,6 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
|
|||
extern GLboolean
|
||||
_mesa_is_color_format(GLenum format);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_index_format(GLenum format);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_depth_format(GLenum format);
|
||||
|
||||
|
|
|
|||
|
|
@ -515,16 +515,12 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level,
|
|||
}
|
||||
|
||||
if (_mesa_components_in_format(format) <= 0 ||
|
||||
format == GL_STENCIL_INDEX) {
|
||||
format == GL_STENCIL_INDEX ||
|
||||
format == GL_COLOR_INDEX) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" );
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (_mesa_is_index_format(format)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)");
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (!ctx->Extensions.ARB_depth_texture && _mesa_is_depth_format(format)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)");
|
||||
return GL_TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue