aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-09-15 10:30:20 -0600
committerBrian Paul <[email protected]>2012-09-17 19:49:26 -0600
commite6eaa85a43616ba6f431276ab94a3b19dd524986 (patch)
tree5a8c908cb96f741092efc60e9a6a0e96665de1e7 /src/mesa/main/dd.h
parentce2ae3c3a2e4bef78047a28723f2d06264d6e4b6 (diff)
mesa: rework texture size error checking
There are two aspects to texture image size checking: 1. Are the width, height, depth legal values (not negative, not larger than the max size for the mipmap level, etc)? 2. Is the texture just too large to handle? For example, we might not be able to really allocate memory for a 3D texture of maxSize x maxSize x maxSize. Previously, we did (1) via the ctx->Driver.TestProxyTextureImage() hook but those tests are really device-independent. Now we do (2) via that hook since the max texture memory and texture shape are device-dependent. Also, (1) is now done outside the general texture parameter error checking functions because of the special interaction with proxy textures. The recently introduced PROXY_ERROR token is removed. The teximage() and copyteximage() functions are bit simpler now (less if-then nesting, etc.) Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/dd.h')
-rw-r--r--src/mesa/main/dd.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index e6a1e68cb25..0000a397a3b 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -251,14 +251,14 @@ struct dd_function_table {
struct gl_texture_object *texObj);
/**
- * Called by glTexImage[123]D when user specifies a proxy texture
- * target.
- *
- * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
+ * Called by glTexImage, glCompressedTexImage, glCopyTexImage
+ * and glTexStorage to check if the dimensions of the texture image
+ * are too large.
+ * \param target any GL_PROXY_TEXTURE_x target
+ * \return GL_TRUE if the image is OK, GL_FALSE if too large
*/
GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
- GLint level, GLint internalFormat,
- GLenum format, GLenum type,
+ GLint level, gl_format format,
GLint width, GLint height,
GLint depth, GLint border);
/*@}*/