summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/utils.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-12 11:48:53 -0700
committerIan Romanick <[email protected]>2012-10-29 09:55:38 -0700
commit43d6fe156b2bf9754aaa65776e001c927275d765 (patch)
tree2f1ecddbd04d96677f73e4480c8f97cdc0252190 /src/mesa/drivers/dri/common/utils.c
parentbda208a4d45fddf3e1a42fb7997098d63d341388 (diff)
dri_util: Elminiate the bytes_per_pixel table
With fewer formats to support, it's kind of useless. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common/utils.c')
-rw-r--r--src/mesa/drivers/dri/common/utils.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 1b337824f50..5117ff70a0f 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -227,13 +227,6 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, /* 8_8_8_8_REV */
};
- static const uint8_t bytes_per_pixel[6] = {
- 2, /* 5_6_5 */
- 2, /* 5_6_5_REV */
- 4, /* 8_8_8_8 */
- 4 /* 8_8_8_8_REV */
- };
-
const uint8_t * bits;
const uint32_t * masks;
int index;
@@ -292,8 +285,9 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
return NULL;
}
- switch ( bytes_per_pixel[ index ] ) {
- case 2:
+ switch ( index ) {
+ case 0:
+ case 1:
bits = bits_table[0];
break;
default: