diff options
author | Brian Paul <[email protected]> | 2011-06-25 06:17:01 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-06-25 06:17:01 -0600 |
commit | 42e7a13e7bc9def0bcdede2d3a34dad1718e105c (patch) | |
tree | dc0ef22251eeeb033f455150aa8447ced5cb0c8c /src/mesa/drivers | |
parent | 8ea5330200e314f9f7de763b1951656c92caa857 (diff) |
Revert "Fix 24bpp software rendering"
This reverts commit c0c0bb6cb140825f5bab3c40c0c9c0ec575fbc76.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 22 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast_priv.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast_span.c | 70 |
3 files changed, 4 insertions, 89 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 90b5ef0fc21..719b406ec05 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -233,17 +233,10 @@ choose_pixel_format(const struct gl_config *v) && v->blueMask == 0x0000ff) return PF_A8R8G8B8; else if (depth == 24 - && v->depthBits == 32 - && v->redMask == 0xff0000 - && v->greenMask == 0x00ff00 - && v->blueMask == 0x0000ff) - return PF_X8R8G8B8; - else if (depth == 24 - && v->depthBits == 24 - && v->redMask == 0xff0000 - && v->greenMask == 0x00ff00 - && v->blueMask == 0x0000ff) - return PF_R8G8B8; + && v->redMask == 0xff0000 + && v->greenMask == 0x00ff00 + && v->blueMask == 0x0000ff) + return PF_X8R8G8B8; else if (depth == 16 && v->redMask == 0xf800 && v->greenMask == 0x07e0 @@ -351,13 +344,6 @@ swrast_new_renderbuffer(const struct gl_config *visual, GLboolean front) xrb->Base.DataType = GL_UNSIGNED_BYTE; xrb->bpp = 32; break; - case PF_R8G8B8: - xrb->Base.Format = MESA_FORMAT_RGB888; - xrb->Base.InternalFormat = GL_RGB; - xrb->Base._BaseFormat = GL_RGB; - xrb->Base.DataType = GL_UNSIGNED_BYTE; - xrb->bpp = 24; - break; case PF_R5G6B5: xrb->Base.Format = MESA_FORMAT_RGB565; xrb->Base.InternalFormat = GL_RGB; diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h index 40f787f52df..bdb52ef26f1 100644 --- a/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -123,7 +123,6 @@ swrast_renderbuffer(struct gl_renderbuffer *rb) #define PF_R5G6B5 2 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */ #define PF_R3G3B2 3 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */ #define PF_X8R8G8B8 4 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */ -#define PF_R8G8B8 5 /**< 24bpp TrueColor: 8-R, 8-G, 8-B bits */ /* swrast_span.c */ diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c index 71aafbbe5d3..c7d0bfdac72 100644 --- a/src/mesa/drivers/dri/swrast/swrast_span.c +++ b/src/mesa/drivers/dri/swrast/swrast_span.c @@ -81,22 +81,6 @@ static const GLubyte kernel[16] = { DST[BCOMP] = *SRC & 0xff -/* 24-bit BGR */ -#define STORE_PIXEL_R8G8B8(DST, X, Y, VALUE) \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] -#define STORE_PIXEL_RGB_R8G8B8(DST, X, Y, VALUE) \ - DST[2] = VALUE[RCOMP]; \ - DST[1] = VALUE[GCOMP]; \ - DST[0] = VALUE[BCOMP] -#define FETCH_PIXEL_R8G8B8(DST, SRC) \ - DST[ACOMP] = 0xff; \ - DST[RCOMP] = (*SRC >> 16) & 0xff; \ - DST[GCOMP] = (*SRC >> 8) & 0xff; \ - DST[BCOMP] = *SRC & 0xff - - /* 16-bit BGR */ #define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \ do { \ @@ -173,24 +157,6 @@ static const GLubyte kernel[16] = { #include "swrast/s_spantemp.h" -/* 24-bit BGR */ -#define NAME(FUNC) FUNC##_R8G8B8 -#define RB_TYPE GLubyte -#define SPAN_VARS \ - struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (3*X); -#define INC_PIXEL_PTR(P) P+=3 -#define STORE_PIXEL(DST, X, Y, VALUE) \ - STORE_PIXEL_R8G8B8(DST, X, Y, VALUE) -#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ - STORE_PIXEL_RGB_R8G8B8(DST, X, Y, VALUE) -#define FETCH_PIXEL(DST, SRC) \ - FETCH_PIXEL_R8G8B8(DST, SRC) - -#include "swrast/s_spantemp.h" - - /* 16-bit BGR */ #define NAME(FUNC) FUNC##_R5G6B5 #define RB_TYPE GLubyte @@ -263,24 +229,6 @@ static const GLubyte kernel[16] = { #include "swrast_spantemp.h" -/* 24-bit BGR */ -#define NAME(FUNC) FUNC##_R8G8B8_front -#define RB_TYPE GLubyte -#define SPAN_VARS \ - struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)row; -#define INC_PIXEL_PTR(P) P+=3 -#define STORE_PIXEL(DST, X, Y, VALUE) \ - STORE_PIXEL_R8G8B8(DST, X, Y, VALUE) -#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ - STORE_PIXEL_RGB_R8G8B8(DST, X, Y, VALUE) -#define FETCH_PIXEL(DST, SRC) \ - FETCH_PIXEL_R8G8B8(DST, SRC) - -#include "swrast_spantemp.h" - - /* 16-bit BGR */ #define NAME(FUNC) FUNC##_R5G6B5_front #define RB_TYPE GLubyte @@ -342,15 +290,6 @@ swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb, xrb->Base.PutValues = put_values_X8R8G8B8; xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8; break; - case PF_R8G8B8: - xrb->Base.GetRow = get_row_R8G8B8; - xrb->Base.GetValues = get_values_R8G8B8; - xrb->Base.PutRow = put_row_R8G8B8; - xrb->Base.PutRowRGB = put_row_rgb_R8G8B8; - xrb->Base.PutMonoRow = put_mono_row_R8G8B8; - xrb->Base.PutValues = put_values_R8G8B8; - xrb->Base.PutMonoValues = put_mono_values_R8G8B8; - break; case PF_R5G6B5: xrb->Base.GetRow = get_row_R5G6B5; xrb->Base.GetValues = get_values_R5G6B5; @@ -407,15 +346,6 @@ swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb, xrb->Base.PutValues = put_values_X8R8G8B8_front; xrb->Base.PutMonoValues = put_mono_values_X8R8G8B8_front; break; - case PF_R8G8B8: - xrb->Base.GetRow = get_row_R8G8B8_front; - xrb->Base.GetValues = get_values_R8G8B8_front; - xrb->Base.PutRow = put_row_R8G8B8_front; - xrb->Base.PutRowRGB = put_row_rgb_R8G8B8_front; - xrb->Base.PutMonoRow = put_mono_row_R8G8B8_front; - xrb->Base.PutValues = put_values_R8G8B8_front; - xrb->Base.PutMonoValues = put_mono_values_R8G8B8_front; - break; case PF_R5G6B5: xrb->Base.GetRow = get_row_R5G6B5_front; xrb->Base.GetValues = get_values_R5G6B5_front; |