aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-07-02 16:39:59 +0000
committerBrian Paul <[email protected]>2004-07-02 16:39:59 +0000
commit2371033bbaf6e7477bfa893654a0467a084f335b (patch)
treead5fa8d555f22612e22bc71028b3515313f183d3 /src/mesa/main/teximage.c
parent1675058a346a57d89a18147799579c0ad574bfd2 (diff)
document some assumptions made about compressed texture tile size
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index d11b6e46094..b1f526c175d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2833,6 +2833,9 @@ compressed_texture_error_check(GLcontext *ctx, GLint dimensions,
/**
* Error checking for glCompressedTexSubImage[123]D().
+ * \warning There are some bad assumptions here about the size of compressed
+ * texture tiles (multiple of 4) used to test the validity of the
+ * offset and size parameters.
* \return error code or GL_NO_ERROR.
*/
static GLenum
@@ -2890,6 +2893,9 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
if (level < 0 || level >= maxLevels)
return GL_INVALID_VALUE;
+ /* XXX these tests are specific to the compressed format.
+ * this code should be generalized in some way.
+ */
if ((xoffset & 3) != 0 || (yoffset & 3) != 0)
return GL_INVALID_VALUE;