summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorMark Mueller <[email protected]>2014-01-20 19:08:54 -0800
committerMark Mueller <[email protected]>2014-01-27 14:30:50 -0800
commit50a01d2acafb2a937e62b24258e2e777c0cd1489 (patch)
treed1dfcc6ca5a577dac6a9ab7d2235434ecdb7d3ce /src/mesa/swrast
parentef145ba4ded6aafb28e3bda02fb348e6b8bff12a (diff)
mesa: Change many Type A MESA_FORMATs to meet naming standard
Update comments. Conversion of the following Type A formats: s/MESA_FORMAT_RGB888\b/MESA_FORMAT_BGR_UNORM8/g s/MESA_FORMAT_BGR888\b/MESA_FORMAT_RGB_UNORM8/g s/MESA_FORMAT_A8\b/MESA_FORMAT_A_UNORM8/g s/MESA_FORMAT_A16\b/MESA_FORMAT_A_UNORM16/g s/MESA_FORMAT_L8\b/MESA_FORMAT_L_UNORM8/g s/MESA_FORMAT_L16\b/MESA_FORMAT_L_UNORM16/g s/MESA_FORMAT_I8\b/MESA_FORMAT_I_UNORM8/g s/MESA_FORMAT_I16\b/MESA_FORMAT_I_UNORM16/g s/MESA_FORMAT_R8\b/MESA_FORMAT_R_UNORM8/g s/MESA_FORMAT_R16\b/MESA_FORMAT_R_UNORM16/g s/MESA_FORMAT_Z16\b/MESA_FORMAT_Z_UNORM16/g s/MESA_FORMAT_Z32\b/MESA_FORMAT_Z_UNORM32/g s/MESA_FORMAT_S8\b/MESA_FORMAT_S_UINT8/g s/MESA_FORMAT_SRGB8\b/MESA_FORMAT_BGR_SRGB8/g s/MESA_FORMAT_RGBA_16\b/MESA_FORMAT_RGBA_UNORM16/g s/MESA_FORMAT_SL8\b/MESA_FORMAT_L_SRGB8/g s/MESA_FORMAT_Z32_FLOAT\b/MESA_FORMAT_Z_FLOAT32/g s/MESA_FORMAT_XBGR16161616_UNORM\b/MESA_FORMAT_RGBX_UNORM16/g s/MESA_FORMAT_XBGR16161616_SNORM\b/MESA_FORMAT_RGBX_SNORM16/g s/MESA_FORMAT_XBGR16161616_FLOAT\b/MESA_FORMAT_RGBX_FLOAT16/g s/MESA_FORMAT_XBGR16161616_UINT\b/MESA_FORMAT_RGBX_UINT16/g s/MESA_FORMAT_XBGR16161616_SINT\b/MESA_FORMAT_RGBX_SINT16/g s/MESA_FORMAT_XBGR32323232_FLOAT\b/MESA_FORMAT_RGBX_FLOAT32/g s/MESA_FORMAT_XBGR32323232_UINT\b/MESA_FORMAT_RGBX_UINT32/g s/MESA_FORMAT_XBGR32323232_SINT\b/MESA_FORMAT_RGBX_SINT32/g s/MESA_FORMAT_XBGR8888_UINT\b/MESA_FORMAT_RGBX_UINT8/g s/MESA_FORMAT_XBGR8888_SINT\b/MESA_FORMAT_RGBX_SINT8/g
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_blit.c2
-rw-r--r--src/mesa/swrast/s_depth.c16
-rw-r--r--src/mesa/swrast/s_renderbuffer.c8
-rw-r--r--src/mesa/swrast/s_stencil.c4
-rw-r--r--src/mesa/swrast/s_texfetch.c54
-rw-r--r--src/mesa/swrast/s_texfetch_tmp.h28
-rw-r--r--src/mesa/swrast/s_texfilter.c8
-rw-r--r--src/mesa/swrast/s_triangle.c24
8 files changed, 72 insertions, 72 deletions
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index dc9c87cce77..aadcd959109 100644
--- a/src/mesa/swrast/s_blit.c
+++ b/src/mesa/swrast/s_blit.c
@@ -166,7 +166,7 @@ blit_nearest(struct gl_context *ctx,
* using the core helpers for pack/unpack, we avoid needing to handle
* masking for things like DEPTH copies of Z24S8.
*/
- if (readRb->Format == MESA_FORMAT_Z32_FLOAT ||
+ if (readRb->Format == MESA_FORMAT_Z_FLOAT32 ||
readRb->Format == MESA_FORMAT_Z32_FLOAT_X24S8) {
mode = UNPACK_Z_FLOAT;
} else {
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 7f3c76de40a..b00b949abb2 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -217,7 +217,7 @@ get_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_Z32) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM32) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -252,7 +252,7 @@ put_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_Z32) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM32) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (mask[i] && x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -300,12 +300,12 @@ _swrast_depth_test_span(struct gl_context *ctx, SWspan *span)
else
zStart = _swrast_pixel_address(rb, span->x, span->y);
- if (rb->Format == MESA_FORMAT_Z16 && !(span->arrayMask & SPAN_XY)) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM16 && !(span->arrayMask & SPAN_XY)) {
/* directly read/write row of 16-bit Z values */
zBufferVals = zStart;
ztest16 = GL_TRUE;
}
- else if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) {
+ else if (rb->Format == MESA_FORMAT_Z_UNORM32 && !(span->arrayMask & SPAN_XY)) {
/* directly read/write row of 32-bit Z values */
zBufferVals = zStart;
}
@@ -439,7 +439,7 @@ _swrast_depth_bounds_test( struct gl_context *ctx, SWspan *span )
else
zStart = _swrast_pixel_address(rb, span->x, span->y);
- if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) {
+ if (rb->Format == MESA_FORMAT_Z_UNORM32 && !(span->arrayMask & SPAN_XY)) {
/* directly access 32-bit values in the depth buffer */
zBufferVals = (const GLuint *) zStart;
}
@@ -567,7 +567,7 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z_UNORM16:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLushort clearVal = 0;
@@ -587,8 +587,8 @@ _swrast_clear_depth_buffer(struct gl_context *ctx)
}
}
break;
- case MESA_FORMAT_Z32:
- case MESA_FORMAT_Z32_FLOAT:
+ case MESA_FORMAT_Z_UNORM32:
+ case MESA_FORMAT_Z_FLOAT32:
{
GLfloat clear = (GLfloat) ctx->Depth.Clear;
GLuint clearVal = 0;
diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c
index 28c1eb07be9..8638ea4a9d2 100644
--- a/src/mesa/swrast/s_renderbuffer.c
+++ b/src/mesa/swrast/s_renderbuffer.c
@@ -69,7 +69,7 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- rb->Format = MESA_FORMAT_RGB888;
+ rb->Format = MESA_FORMAT_BGR_UNORM8;
break;
case GL_RGBA:
case GL_RGBA2:
@@ -95,17 +95,17 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
case GL_STENCIL_INDEX4_EXT:
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
- rb->Format = MESA_FORMAT_S8;
+ rb->Format = MESA_FORMAT_S_UINT8;
break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
- rb->Format = MESA_FORMAT_Z16;
+ rb->Format = MESA_FORMAT_Z_UNORM16;
break;
case GL_DEPTH_COMPONENT24:
rb->Format = MESA_FORMAT_X8_Z24;
break;
case GL_DEPTH_COMPONENT32:
- rb->Format = MESA_FORMAT_Z32;
+ rb->Format = MESA_FORMAT_Z_UNORM32;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 27f11583138..8b30469ad32 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -300,7 +300,7 @@ get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
const GLubyte *map = _swrast_pixel_address(rb, 0, 0);
GLuint i;
- if (rb->Format == MESA_FORMAT_S8) {
+ if (rb->Format == MESA_FORMAT_S_UINT8) {
const GLint rowStride = srb->RowStride;
for (i = 0; i < count; i++) {
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
@@ -587,7 +587,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
}
switch (rb->Format) {
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S_UINT8:
{
GLubyte clear = ctx->Stencil.Clear & writeMask & 0xff;
GLubyte mask = (~writeMask) & 0xff;
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index 7a5ff447c34..c481f6bdcab 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -197,13 +197,13 @@ texfetch_funcs[] =
fetch_texel_3d_f_xrgb8888_rev
},
{
- MESA_FORMAT_RGB888,
+ MESA_FORMAT_BGR_UNORM8,
fetch_texel_1d_f_rgb888,
fetch_texel_2d_f_rgb888,
fetch_texel_3d_f_rgb888
},
{
- MESA_FORMAT_BGR888,
+ MESA_FORMAT_RGB_UNORM8,
fetch_texel_1d_f_bgr888,
fetch_texel_2d_f_bgr888,
fetch_texel_3d_f_bgr888
@@ -287,37 +287,37 @@ texfetch_funcs[] =
fetch_texel_3d_f_rgb332
},
{
- MESA_FORMAT_A8,
+ MESA_FORMAT_A_UNORM8,
fetch_texel_1d_f_a8,
fetch_texel_2d_f_a8,
fetch_texel_3d_f_a8
},
{
- MESA_FORMAT_A16,
+ MESA_FORMAT_A_UNORM16,
fetch_texel_1d_f_a16,
fetch_texel_2d_f_a16,
fetch_texel_3d_f_a16
},
{
- MESA_FORMAT_L8,
+ MESA_FORMAT_L_UNORM8,
fetch_texel_1d_f_l8,
fetch_texel_2d_f_l8,
fetch_texel_3d_f_l8
},
{
- MESA_FORMAT_L16,
+ MESA_FORMAT_L_UNORM16,
fetch_texel_1d_f_l16,
fetch_texel_2d_f_l16,
fetch_texel_3d_f_l16
},
{
- MESA_FORMAT_I8,
+ MESA_FORMAT_I_UNORM8,
fetch_texel_1d_f_i8,
fetch_texel_2d_f_i8,
fetch_texel_3d_f_i8
},
{
- MESA_FORMAT_I16,
+ MESA_FORMAT_I_UNORM16,
fetch_texel_1d_f_i16,
fetch_texel_2d_f_i16,
fetch_texel_3d_f_i16
@@ -335,7 +335,7 @@ texfetch_funcs[] =
fetch_texel_3d_f_ycbcr_rev
},
{
- MESA_FORMAT_R8,
+ MESA_FORMAT_R_UNORM8,
fetch_texel_1d_f_r8,
fetch_texel_2d_f_r8,
fetch_texel_3d_f_r8
@@ -353,7 +353,7 @@ texfetch_funcs[] =
fetch_texel_3d_f_rg88
},
{
- MESA_FORMAT_R16,
+ MESA_FORMAT_R_UNORM16,
fetch_texel_1d_f_r16,
fetch_texel_2d_f_r16,
fetch_texel_3d_f_r16
@@ -389,7 +389,7 @@ texfetch_funcs[] =
fetch_texel_3d_f_s8_z24
},
{
- MESA_FORMAT_Z16,
+ MESA_FORMAT_Z_UNORM16,
fetch_texel_1d_f_z16,
fetch_texel_2d_f_z16,
fetch_texel_3d_f_z16
@@ -407,19 +407,19 @@ texfetch_funcs[] =
fetch_texel_3d_f_z24_s8
},
{
- MESA_FORMAT_Z32,
+ MESA_FORMAT_Z_UNORM32,
fetch_texel_1d_f_z32,
fetch_texel_2d_f_z32,
fetch_texel_3d_f_z32
},
{
- MESA_FORMAT_S8,
+ MESA_FORMAT_S_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_SRGB8,
+ MESA_FORMAT_BGR_SRGB8,
fetch_texel_1d_srgb8,
fetch_texel_2d_srgb8,
fetch_texel_3d_srgb8
@@ -437,7 +437,7 @@ texfetch_funcs[] =
fetch_texel_3d_sargb8
},
{
- MESA_FORMAT_SL8,
+ MESA_FORMAT_L_SRGB8,
fetch_texel_1d_sl8,
fetch_texel_2d_sl8,
fetch_texel_3d_sl8
@@ -993,7 +993,7 @@ texfetch_funcs[] =
fetch_texel_3d_signed_rgba_16
},
{
- MESA_FORMAT_RGBA_16,
+ MESA_FORMAT_RGBA_UNORM16,
fetch_texel_1d_rgba_16,
fetch_texel_2d_rgba_16,
fetch_texel_3d_rgba_16
@@ -1173,7 +1173,7 @@ texfetch_funcs[] =
fetch_texel_3d_r11_g11_b10f
},
{
- MESA_FORMAT_Z32_FLOAT,
+ MESA_FORMAT_Z_FLOAT32,
fetch_texel_1d_f_r_f32, /* Reuse the R32F functions. */
fetch_texel_2d_f_r_f32,
fetch_texel_3d_f_r_f32
@@ -1221,13 +1221,13 @@ texfetch_funcs[] =
NULL
},
{
- MESA_FORMAT_XBGR8888_UINT,
+ MESA_FORMAT_RGBX_UINT8,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR8888_SINT,
+ MESA_FORMAT_RGBX_SINT8,
NULL,
NULL,
NULL
@@ -1239,49 +1239,49 @@ texfetch_funcs[] =
NULL
},
{
- MESA_FORMAT_XBGR16161616_UNORM,
+ MESA_FORMAT_RGBX_UNORM16,
fetch_texel_1d_xbgr16161616_unorm,
fetch_texel_2d_xbgr16161616_unorm,
fetch_texel_3d_xbgr16161616_unorm
},
{
- MESA_FORMAT_XBGR16161616_SNORM,
+ MESA_FORMAT_RGBX_SNORM16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR16161616_FLOAT,
+ MESA_FORMAT_RGBX_FLOAT16,
fetch_texel_1d_xbgr16161616_float,
fetch_texel_2d_xbgr16161616_float,
fetch_texel_3d_xbgr16161616_float
},
{
- MESA_FORMAT_XBGR16161616_UINT,
+ MESA_FORMAT_RGBX_UINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR16161616_SINT,
+ MESA_FORMAT_RGBX_SINT16,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR32323232_FLOAT,
+ MESA_FORMAT_RGBX_FLOAT32,
fetch_texel_1d_xbgr32323232_float,
fetch_texel_2d_xbgr32323232_float,
fetch_texel_3d_xbgr32323232_float
},
{
- MESA_FORMAT_XBGR32323232_UINT,
+ MESA_FORMAT_RGBX_UINT32,
NULL,
NULL,
NULL
},
{
- MESA_FORMAT_XBGR32323232_SINT,
+ MESA_FORMAT_RGBX_SINT32,
NULL,
NULL,
NULL
diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h
index c5171ecd1ee..30fe1b8df09 100644
--- a/src/mesa/swrast/s_texfetch_tmp.h
+++ b/src/mesa/swrast/s_texfetch_tmp.h
@@ -69,7 +69,7 @@
#endif
-/* MESA_FORMAT_Z32 ***********************************************************/
+/* MESA_FORMAT_Z_UNORM32 ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 32-bit depth texture,
* returning 1 GLfloat.
@@ -83,7 +83,7 @@ static void FETCH(f_z32)( const struct swrast_texture_image *texImage,
}
-/* MESA_FORMAT_Z16 ***********************************************************/
+/* MESA_FORMAT_Z_UNORM16 ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 16-bit depth texture,
* returning 1 GLfloat.
@@ -518,7 +518,7 @@ static void FETCH(f_xrgb8888_rev)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGB888 ********************************************************/
+/* MESA_FORMAT_BGR_UNORM8 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb888 texture, return 4 GLchans */
static void FETCH(f_rgb888)( const struct swrast_texture_image *texImage,
@@ -534,7 +534,7 @@ static void FETCH(f_rgb888)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_BGR888 ********************************************************/
+/* MESA_FORMAT_RGB_UNORM8 ********************************************************/
/* Fetch texel from 1D, 2D or 3D bgr888 texture, return 4 GLchans */
static void FETCH(f_bgr888)( const struct swrast_texture_image *texImage,
@@ -750,7 +750,7 @@ static void FETCH(f_al88)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R8 ************************************************************/
+/* MESA_FORMAT_R_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
static void FETCH(f_r8)(const struct swrast_texture_image *texImage,
@@ -766,7 +766,7 @@ static void FETCH(f_r8)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_R16 ***********************************************************/
+/* MESA_FORMAT_R_UNORM16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D r16 texture, return 4 GLchans */
static void FETCH(f_r16)(const struct swrast_texture_image *texImage,
@@ -879,7 +879,7 @@ static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_A8 ************************************************************/
+/* MESA_FORMAT_A_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
static void FETCH(f_a8)( const struct swrast_texture_image *texImage,
@@ -895,7 +895,7 @@ static void FETCH(f_a8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_A16 ************************************************************/
+/* MESA_FORMAT_A_UNORM16 ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
static void FETCH(f_a16)( const struct swrast_texture_image *texImage,
@@ -911,7 +911,7 @@ static void FETCH(f_a16)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_L8 ************************************************************/
+/* MESA_FORMAT_L_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D l8 texture, return 4 GLchans */
static void FETCH(f_l8)( const struct swrast_texture_image *texImage,
@@ -927,7 +927,7 @@ static void FETCH(f_l8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_L16 ***********************************************************/
+/* MESA_FORMAT_L_UNORM16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D l16 texture, return 4 GLchans */
static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
@@ -943,7 +943,7 @@ static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_I8 ************************************************************/
+/* MESA_FORMAT_I_UNORM8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D i8 texture, return 4 GLchans */
static void FETCH(f_i8)( const struct swrast_texture_image *texImage,
@@ -959,7 +959,7 @@ static void FETCH(f_i8)( const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_I16 ***********************************************************/
+/* MESA_FORMAT_I_UNORM16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D i16 texture, return 4 GLchans */
static void FETCH(f_i16)( const struct swrast_texture_image *texImage,
@@ -976,7 +976,7 @@ static void FETCH(f_i16)( const struct swrast_texture_image *texImage,
/* Fetch texel from 1D, 2D or 3D srgb8 texture, return 4 GLfloats */
-/* Note: component order is same as for MESA_FORMAT_RGB888 */
+/* Note: component order is same as for MESA_FORMAT_BGR_UNORM8 */
static void FETCH(srgb8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
@@ -1415,7 +1415,7 @@ FETCH(signed_rgba_16)(const struct swrast_texture_image *texImage,
-/* MESA_FORMAT_RGBA_16 ***********************************************/
+/* MESA_FORMAT_RGBA_UNORM16 ***********************************************/
static void
FETCH(rgba_16)(const struct swrast_texture_image *texImage,
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 6e87fc910e4..c3fd900b443 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -1428,7 +1428,7 @@ opt_sample_rgb_2d(struct gl_context *ctx,
ASSERT(samp->WrapS==GL_REPEAT);
ASSERT(samp->WrapT==GL_REPEAT);
ASSERT(img->Border==0);
- ASSERT(img->TexFormat == MESA_FORMAT_RGB888);
+ ASSERT(img->TexFormat == MESA_FORMAT_BGR_UNORM8);
ASSERT(swImg->_IsPowerOfTwo);
(void) swImg;
@@ -1521,7 +1521,7 @@ sample_lambda_2d(struct gl_context *ctx,
case GL_NEAREST:
if (repeatNoBorderPOT) {
switch (tImg->TexFormat) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
@@ -1578,7 +1578,7 @@ sample_lambda_2d(struct gl_context *ctx,
case GL_NEAREST:
if (repeatNoBorderPOT) {
switch (tImg->TexFormat) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
opt_sample_rgb_2d(ctx, samp, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;
@@ -3760,7 +3760,7 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx,
sampler->WrapT == GL_REPEAT &&
swImg->_IsPowerOfTwo &&
img->Border == 0) {
- if (img->TexFormat == MESA_FORMAT_RGB888)
+ if (img->TexFormat == MESA_FORMAT_BGR_UNORM8)
func = &opt_sample_rgb_2d;
else if (img->TexFormat == MESA_FORMAT_A8B8G8R8_UNORM)
func = &opt_sample_rgba_2d;
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index b694bbe6188..00383fb84f8 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -136,7 +136,7 @@ _swrast_culltriangle( struct gl_context *ctx,
const GLubyte *texture = (const GLubyte *) swImg->ImageSlices[0]; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
- ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
+ ASSERT(texImg->TexFormat == MESA_FORMAT_BGR_UNORM8); \
if (!rb || !texture) { \
return; \
}
@@ -194,7 +194,7 @@ _swrast_culltriangle( struct gl_context *ctx,
const GLubyte *texture = (const GLubyte *) swImg->ImageSlices[0]; \
const GLint smask = texImg->Width - 1; \
const GLint tmask = texImg->Height - 1; \
- ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \
+ ASSERT(texImg->TexFormat == MESA_FORMAT_BGR_UNORM8); \
if (!rb || !texture) { \
return; \
}
@@ -417,7 +417,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
switch (info->filter) {
case GL_NEAREST:
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGB;MODULATE,3);
@@ -466,7 +466,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
span->intTex[0] -= FIXED_HALF;
span->intTex[1] -= FIXED_HALF;
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGB;MODULATE,3);
@@ -572,7 +572,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
} \
\
switch (info.format) { \
- case MESA_FORMAT_RGB888: \
+ case MESA_FORMAT_BGR_UNORM8: \
info.tbytesline = texImg->Width * 3; \
break; \
case MESA_FORMAT_A8B8G8R8_UNORM: \
@@ -689,7 +689,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
switch (info->filter) {
case GL_NEAREST:
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGB;MODULATE,3);
@@ -736,7 +736,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
case GL_LINEAR:
switch (info->format) {
- case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR_UNORM8:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGB;MODULATE,3);
@@ -838,7 +838,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
} \
\
switch (info.format) { \
- case MESA_FORMAT_RGB888: \
+ case MESA_FORMAT_BGR_UNORM8: \
info.tbytesline = texImg->Width * 3; \
break; \
case MESA_FORMAT_A8B8G8R8_UNORM: \
@@ -887,7 +887,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
ASSERT(ctx->Depth.Test); \
ASSERT(!ctx->Depth.Mask); \
ASSERT(ctx->Depth.Func == GL_LESS); \
- assert(rb->Format == MESA_FORMAT_Z16); \
+ assert(rb->Format == MESA_FORMAT_Z_UNORM16); \
if (!q) { \
return; \
}
@@ -1025,7 +1025,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
ctx->Depth.Func == GL_LESS &&
!ctx->Stencil._Enabled &&
depthRb &&
- depthRb->Format == MESA_FORMAT_Z16) {
+ depthRb->Format == MESA_FORMAT_Z_UNORM16) {
if (ctx->Color.ColorMask[0][0] == 0 &&
ctx->Color.ColorMask[0][1] == 0 &&
ctx->Color.ColorMask[0][2] == 0 &&
@@ -1080,7 +1080,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& texImg->Border == 0
&& (_mesa_format_row_stride(format, texImg->Width) ==
swImg->RowStride)
- && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_A8B8G8R8_UNORM)
+ && (format == MESA_FORMAT_BGR_UNORM8 || format == MESA_FORMAT_A8B8G8R8_UNORM)
&& minFilter == magFilter
&& ctx->Light.Model.ColorControl == GL_SINGLE_COLOR
&& !swrast->_FogEnabled
@@ -1088,7 +1088,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& ctx->Texture.Unit[0].EnvMode != GL_COMBINE4_NV) {
if (ctx->Hint.PerspectiveCorrection==GL_FASTEST) {
if (minFilter == GL_NEAREST
- && format == MESA_FORMAT_RGB888
+ && format == MESA_FORMAT_BGR_UNORM8
&& (envMode == GL_REPLACE || envMode == GL_DECAL)
&& ((swrast->_RasterMask == (DEPTH_BIT | TEXTURE_BIT)
&& ctx->Depth.Func == GL_LESS