a few new assertions
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 29 Mar 2006 04:47:34 +0000 (04:47 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 29 Mar 2006 04:47:34 +0000 (04:47 +0000)
src/mesa/main/texformat_tmp.h

index f8445275d87f819c3b12b5ac34a7b4f3fbba4978..a6e0e02ee8d69bc9ec6297580b3ff39dcccf70ca 100644 (file)
@@ -1224,6 +1224,9 @@ static void FETCH(f_z24_s8)( const struct gl_texture_image *texImage,
    const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
    const GLfloat scale = 1.0F / (GLfloat) 0xffffff;
    texel[0] = ((*src) >> 8) * scale;
+   ASSERT(texImage->TexFormat->MesaFormat == MESA_FORMAT_Z24_S8);
+   ASSERT(texel[0] >= 0.0F);
+   ASSERT(texel[0] <= 1.0F);
 }
 
 #if DIM == 3