summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-07 07:42:33 -0700
committerBrian Paul <[email protected]>2012-02-07 07:42:33 -0700
commit627b435dfe17698a1c69e9a259838fc6f2e6bd4e (patch)
tree07d6223879f8985139a87a9c271c34848d8c305f /src/mesa/main/image.h
parent699e3b98214b52579e186594c21b972ea4cb4037 (diff)
mesa: new _mesa_error_check_format_and_type() function
This replaces the _mesa_is_legal_format_and_type() function. According to the spec, some invalid format/type combinations to glDrawPixels, ReadPixels and glTexImage should generate GL_INVALID_ENUM but others should generate GL_INVALID_OPERATION. With the old function we didn't make that distinction and generated GL_INVALID_ENUM errors instead of GL_INVALID_OPERATION. The new function returns one of those errors or GL_NO_ERROR. This will also let us remove some redundant format/type checks in follow-on commit. v2: add more checks for ARB_texture_rgb10_a2ui at the top of _mesa_error_check_format_and_type() per Ian. Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/image.h')
-rw-r--r--src/mesa/main/image.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h
index e4961ed3df0..f1ed883794f 100644
--- a/src/mesa/main/image.h
+++ b/src/mesa/main/image.h
@@ -53,9 +53,9 @@ _mesa_components_in_format( GLenum format );
extern GLint
_mesa_bytes_per_pixel( GLenum format, GLenum type );
-extern GLboolean
-_mesa_is_legal_format_and_type(const struct gl_context *ctx,
- GLenum format, GLenum type);
+extern GLenum
+_mesa_error_check_format_and_type(const struct gl_context *ctx,
+ GLenum format, GLenum type);
extern GLboolean
_mesa_is_color_format(GLenum format);