summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2014-06-12 17:52:41 +0100
committerNeil Roberts <[email protected]>2014-06-13 15:54:46 +0100
commitb8d15ca5e8e189921e1290ed9d56484006652a75 (patch)
treea4f0f94f579c75dcada5cb22732da3244c15d35a
parent2a0dffa0c91cc2277f82c2b87277f56e525f87ab (diff)
Remove _mesa_is_type_integer and _mesa_is_enum_format_or_type_integer
The comment for _mesa_is_type_integer is confusing because it says that it returns whether the type is an “integer (non-normalized)” format. I don't think it makes sense to say whether a type is normalized or not because it depends on what format it is used with. For example, GL_RGBA+GL_UNSIGNED_BYTE is normalized but GL_RGBA_INTEGER+GL_UNSIGNED_BYTE isn't. If the normalized comment is just a mistake then it still doesn't make much sense because it is missing the packed-pixel types such as GL_UNSIGNED_INT_5_6_5. If those were added then it effectively just returns type != GL_FLOAT. That function was only used in _mesa_is_enum_format_or_type_integer. This function effectively checks whether the format is non-normalized or the type is an integer. I can't think of any situation where that check would make sense. As far as I can tell neither of these functions have ever been used anywhere so we should just remove them to avoid confusion. These functions were added in 9ad8f431b2a47060bf05517246ab0fa8d249c800. Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/main/glformats.c30
-rw-r--r--src/mesa/main/glformats.h6
2 files changed, 0 insertions, 36 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 9bb341cc0e9..aee336e1222 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -458,36 +458,6 @@ _mesa_is_enum_format_integer(GLenum format)
}
-/**
- * Test if the given type is an integer (non-normalized) format.
- */
-GLboolean
-_mesa_is_type_integer(GLenum type)
-{
- switch (type) {
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
-}
-
-
-/**
- * Test if the given format or type is an integer (non-normalized) format.
- */
-extern GLboolean
-_mesa_is_enum_format_or_type_integer(GLenum format, GLenum type)
-{
- return _mesa_is_enum_format_integer(format) || _mesa_is_type_integer(type);
-}
-
-
GLboolean
_mesa_is_type_unsigned(GLenum type)
{
diff --git a/src/mesa/main/glformats.h b/src/mesa/main/glformats.h
index af108993168..ccbce2dabf9 100644
--- a/src/mesa/main/glformats.h
+++ b/src/mesa/main/glformats.h
@@ -54,9 +54,6 @@ extern GLint
_mesa_bytes_per_vertex_attrib(GLint comps, GLenum type);
extern GLboolean
-_mesa_is_type_integer(GLenum type);
-
-extern GLboolean
_mesa_is_type_unsigned(GLenum type);
extern GLboolean
@@ -69,9 +66,6 @@ extern GLboolean
_mesa_is_enum_format_signed_int(GLenum format);
extern GLboolean
-_mesa_is_enum_format_or_type_integer(GLenum format, GLenum type);
-
-extern GLboolean
_mesa_is_color_format(GLenum format);
extern GLboolean