summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-09-15 10:30:20 -0600
committerBrian Paul <brianp@vmware.com>2012-09-17 19:49:26 -0600
commite6eaa85a43616ba6f431276ab94a3b19dd524986 (patch)
tree5a8c908cb96f741092efc60e9a6a0e96665de1e7 /src/mesa/main/teximage.h
parentce2ae3c3a2e4bef78047a28723f2d06264d6e4b6 (diff)
downloadexternal_mesa3d-e6eaa85a43616ba6f431276ab94a3b19dd524986.zip
external_mesa3d-e6eaa85a43616ba6f431276ab94a3b19dd524986.tar.gz
external_mesa3d-e6eaa85a43616ba6f431276ab94a3b19dd524986.tar.bz2
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 <jfonseca@vmware.com>
Diffstat (limited to 'src/mesa/main/teximage.h')
-rw-r--r--src/mesa/main/teximage.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 340297f..c7c32d8 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -128,8 +128,8 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target);
extern GLboolean
_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
- GLint internalFormat, GLenum format, GLenum type,
- GLint width, GLint height, GLint depth, GLint border);
+ gl_format format,
+ GLint width, GLint height, GLint depth, GLint border);
extern GLuint