aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_triangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/swrast/s_triangle.c')
-rw-r--r--mesalib/src/mesa/swrast/s_triangle.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/mesalib/src/mesa/swrast/s_triangle.c b/mesalib/src/mesa/swrast/s_triangle.c
index 085021b58..00383fb84 100644
--- a/mesalib/src/mesa/swrast/s_triangle.c
+++ b/mesalib/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);
@@ -437,7 +437,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch(info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -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);
@@ -486,7 +486,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -572,10 +572,10 @@ 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_RGBA8888: \
+ case MESA_FORMAT_A8B8G8R8_UNORM: \
info.tbytesline = texImg->Width * 4; \
break; \
default: \
@@ -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);
@@ -709,7 +709,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch(info->envmode) {
case GL_MODULATE:
SPAN_NEAREST(NEAREST_RGBA;MODULATE,4);
@@ -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);
@@ -756,7 +756,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
return;
}
break;
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
switch (info->envmode) {
case GL_MODULATE:
SPAN_LINEAR(LINEAR_RGBA;MODULATE,4);
@@ -838,10 +838,10 @@ 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_RGBA8888: \
+ case MESA_FORMAT_A8B8G8R8_UNORM: \
info.tbytesline = texImg->Width * 4; \
break; \
default: \
@@ -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 &&
@@ -1050,7 +1050,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
const struct gl_texture_image *texImg;
const struct swrast_texture_image *swImg;
GLenum minFilter, magFilter, envMode;
- gl_format format;
+ mesa_format format;
texObj2D = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX];
if (ctx->Texture.Unit[0].Sampler)
samp = ctx->Texture.Unit[0].Sampler;
@@ -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_RGBA8888)
+ && (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
@@ -1107,7 +1107,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
#if CHAN_BITS != 8
USE(general_triangle);
#else
- if (format == MESA_FORMAT_RGBA8888 && !_mesa_little_endian()) {
+ if (format == MESA_FORMAT_A8B8G8R8_UNORM && !_mesa_little_endian()) {
/* We only handle RGBA8888 correctly on little endian
* in the optimized code above.
*/