Mesa (master): swrast: Remove GL_COLOR_INDEX from assertions

Ian Romanick idr at kemper.freedesktop.org
Tue Sep 6 19:10:32 UTC 2011


Module: Mesa
Branch: master
Commit: ede7d9fff504db3a4790b0e55d247f85ef22d045
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ede7d9fff504db3a4790b0e55d247f85ef22d045

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Aug 29 13:30:46 2011 -0700

swrast: Remove GL_COLOR_INDEX from assertions

These sampling functions don't work on color-index textures, but there
is no such thing as a color-index texture anymore.

Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/swrast/s_texfilter.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index e17a7aa..ad31e37 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -1168,7 +1168,6 @@ sample_2d_linear_repeat(struct gl_context *ctx,
    ASSERT(tObj->Sampler.WrapS == GL_REPEAT);
    ASSERT(tObj->Sampler.WrapT == GL_REPEAT);
    ASSERT(img->Border == 0);
-   ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
    ASSERT(img->_IsPowerOfTwo);
 
    linear_repeat_texel_location(width,  texcoord[0], &i0, &i1, &wi);
@@ -1431,7 +1430,6 @@ sample_lambda_2d(struct gl_context *ctx,
    const GLboolean repeatNoBorderPOT = (tObj->Sampler.WrapS == GL_REPEAT)
       && (tObj->Sampler.WrapT == GL_REPEAT)
       && (tImg->Border == 0 && (tImg->Width == tImg->RowStride))
-      && (tImg->_BaseFormat != GL_COLOR_INDEX)
       && tImg->_IsPowerOfTwo;
 
    ASSERT(lambda != NULL);
@@ -2559,7 +2557,6 @@ sample_nearest_rect(struct gl_context *ctx,
    ASSERT(tObj->Sampler.WrapT == GL_CLAMP ||
           tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE ||
           tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER);
-   ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
 
    for (i = 0; i < n; i++) {
       GLint row, col;
@@ -2593,7 +2590,6 @@ sample_linear_rect(struct gl_context *ctx,
    ASSERT(tObj->Sampler.WrapT == GL_CLAMP ||
           tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE ||
           tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER);
-   ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
 
    for (i = 0; i < n; i++) {
       GLint i0, j0, i1, j1;




More information about the mesa-commit mailing list