mesa: Fix assertion failure in X8_Z24/Z24_X8 texfetch.
authorEric Anholt <eric@anholt.net>
Mon, 11 Jul 2011 23:49:44 +0000 (16:49 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 12 Jul 2011 21:41:01 +0000 (14:41 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/texfetch_tmp.h

index 3b1eedf39bfffbe57b086d34f816d6f5cb0a8148..d170adf2e00c142cba9aa48423f427f20cb365b4 100644 (file)
@@ -2287,7 +2287,8 @@ 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 == MESA_FORMAT_Z24_S8);
+   ASSERT(texImage->TexFormat == MESA_FORMAT_Z24_S8 ||
+         texImage->TexFormat == MESA_FORMAT_Z24_X8);
    ASSERT(texel[0] >= 0.0F);
    ASSERT(texel[0] <= 1.0F);
 }
@@ -2314,7 +2315,8 @@ static void FETCH(f_s8_z24)( 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) & 0x00ffffff) * scale;
-   ASSERT(texImage->TexFormat == MESA_FORMAT_S8_Z24);
+   ASSERT(texImage->TexFormat == MESA_FORMAT_S8_Z24 ||
+         texImage->TexFormat == MESA_FORMAT_X8_Z24);
    ASSERT(texel[0] >= 0.0F);
    ASSERT(texel[0] <= 1.0F);
 }