Mesa (master): mesa/formats: Remove IndexBits

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Aug 5 18:08:22 UTC 2014


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Thu Jul 10 23:58:56 2014 -0700

mesa/formats: Remove IndexBits

Mesa hasn't supported color-indexed textures for some time.  This is 0 for
all texture formats, so we don't need to store it.

Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/format_info.py |    2 +-
 src/mesa/main/formats.c      |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py
index 9b63bfb..b8956a5 100644
--- a/src/mesa/main/format_info.py
+++ b/src/mesa/main/format_info.py
@@ -171,7 +171,7 @@ for fmat in formats:
 
    bits = [ get_channel_bits(fmat, name) for name in ['r', 'g', 'b', 'a']]
    print '      {0},'.format(', '.join(map(str, bits)))
-   bits = [ get_channel_bits(fmat, name) for name in ['l', 'i', 'I', 'z', 's']]
+   bits = [ get_channel_bits(fmat, name) for name in ['l', 'i', 'z', 's']]
    print '      {0},'.format(', '.join(map(str, bits)))
 
    print '      {0}, {1}, {2},'.format(fmat.block_width, fmat.block_height,
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index e237064..39cc5f1 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -59,7 +59,6 @@ struct gl_format_info
    GLubyte AlphaBits;
    GLubyte LuminanceBits;
    GLubyte IntensityBits;
-   GLubyte IndexBits;
    GLubyte DepthBits;
    GLubyte StencilBits;
 
@@ -145,7 +144,7 @@ _mesa_get_format_bits(mesa_format format, GLenum pname)
    case GL_TEXTURE_LUMINANCE_SIZE:
       return info->LuminanceBits;
    case GL_INDEX_BITS:
-      return info->IndexBits;
+      return 0;
    case GL_DEPTH_BITS:
    case GL_TEXTURE_DEPTH_SIZE_ARB:
    case GL_RENDERBUFFER_DEPTH_SIZE_EXT:




More information about the mesa-commit mailing list