Mesa (master): dri_util: Remove support for RGB332 framebuffers

Ian Romanick idr at kemper.freedesktop.org
Mon Oct 29 16:59:01 UTC 2012


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Jul 12 11:42:54 2012 -0700

dri_util: Remove support for RGB332 framebuffers

None of the remaining DRI drivers in Mesa use this.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/common/utils.c |   34 +++++++---------------------------
 1 files changed, 7 insertions(+), 27 deletions(-)

diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 6d8cb4e..1b33782 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -194,15 +194,12 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
 {
    static const uint8_t bits_table[4][4] = {
      /* R  G  B  A */
-      { 3, 3, 2, 0 }, /* Any GL_UNSIGNED_BYTE_3_3_2 */
       { 5, 6, 5, 0 }, /* Any GL_UNSIGNED_SHORT_5_6_5 */
       { 8, 8, 8, 0 }, /* Any RGB with any GL_UNSIGNED_INT_8_8_8_8 */
       { 8, 8, 8, 8 }  /* Any RGBA with any GL_UNSIGNED_INT_8_8_8_8 */
    };
 
    static const uint32_t masks_table_rgb[6][4] = {
-      { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 3_3_2       */
-      { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 2_3_3_REV   */
       { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5       */
       { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV   */
       { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 }, /* 8_8_8_8     */
@@ -210,8 +207,6 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
    };
 
    static const uint32_t masks_table_rgba[6][4] = {
-      { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 3_3_2       */
-      { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 2_3_3_REV   */
       { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5       */
       { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV   */
       { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF }, /* 8_8_8_8     */
@@ -219,8 +214,6 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
    };
 
    static const uint32_t masks_table_bgr[6][4] = {
-      { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 3_3_2       */
-      { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 2_3_3_REV   */
       { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5       */
       { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV   */
       { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 }, /* 8_8_8_8     */
@@ -228,8 +221,6 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
    };
 
    static const uint32_t masks_table_bgra[6][4] = {
-      { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 3_3_2       */
-      { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 2_3_3_REV   */
       { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5       */
       { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV   */
       { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF }, /* 8_8_8_8     */
@@ -237,8 +228,6 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
    };
 
    static const uint8_t bytes_per_pixel[6] = {
-      1, /* 3_3_2       */
-      1, /* 2_3_3_REV   */
       2, /* 5_6_5       */
       2, /* 5_6_5_REV   */
       4, /* 8_8_8_8     */
@@ -255,23 +244,17 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
    unsigned num_accum_bits = (enable_accum) ? 2 : 1;
 
    switch ( fb_type ) {
-      case GL_UNSIGNED_BYTE_3_3_2:
-	 index = 0;
-	 break;
-      case GL_UNSIGNED_BYTE_2_3_3_REV:
-	 index = 1;
-	 break;
       case GL_UNSIGNED_SHORT_5_6_5:
-	 index = 2;
+	 index = 0;
 	 break;
       case GL_UNSIGNED_SHORT_5_6_5_REV:
-	 index = 3;
+	 index = 1;
 	 break;
       case GL_UNSIGNED_INT_8_8_8_8:
-	 index = 4;
+	 index = 2;
 	 break;
       case GL_UNSIGNED_INT_8_8_8_8_REV:
-	 index = 5;
+	 index = 3;
 	 break;
       default:
 	 fprintf( stderr, "[%s:%u] Unknown framebuffer type 0x%04x.\n",
@@ -310,16 +293,13 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
    }
 
    switch ( bytes_per_pixel[ index ] ) {
-      case 1:
-	 bits = bits_table[0];
-	 break;
       case 2:
-	 bits = bits_table[1];
+	 bits = bits_table[0];
 	 break;
       default:
 	 bits = ((fb_format == GL_RGB) || (fb_format == GL_BGR))
-	    ? bits_table[2]
-	    : bits_table[3];
+	    ? bits_table[1]
+	    : bits_table[2];
 	 break;
    }
 




More information about the mesa-commit mailing list