case GL_ALPHA12:
case GL_ALPHA16:
case GL_COMPRESSED_ALPHA:
- return &_mesa_texformat_al88;
+ return &_mesa_texformat_a8;
case 1:
case GL_LUMINANCE:
case GL_LUMINANCE12:
case GL_LUMINANCE16:
case GL_COMPRESSED_LUMINANCE:
- return &_mesa_texformat_al88;
+ return &_mesa_texformat_l8;
case 2:
case GL_LUMINANCE_ALPHA:
case GL_INTENSITY12:
case GL_INTENSITY16:
case GL_COMPRESSED_INTENSITY:
- /* At the moment, glean & conform both fail using the i8 internal
- * format.
- */
- return &_mesa_texformat_al88;
-/* return &_mesa_texformat_i8; */
+ return &_mesa_texformat_i8;
case GL_YCBCR_MESA:
if (type == GL_UNSIGNED_SHORT_8_8_APPLE ||
#include "r200_tcl.h"
+#define R200_TXFORMAT_A8 R200_TXFORMAT_I8
+#define R200_TXFORMAT_L8 R200_TXFORMAT_I8
#define R200_TXFORMAT_AL88 R200_TXFORMAT_AI88
#define R200_TXFORMAT_YCBCR R200_TXFORMAT_YVYU422
#define R200_TXFORMAT_YCBCR_REV R200_TXFORMAT_VYUY422
_ALPHA(ARGB4444),
_ALPHA(ARGB1555),
_ALPHA(AL88),
- _INVALID(A8),
- _INVALID(L8),
- _COLOR(I8),
+ _ALPHA(A8),
+ _COLOR(L8),
+ _ALPHA(I8),
_INVALID(CI8),
_YUV(YCBCR),
_YUV(YCBCR_REV),
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
GLuint color_combine, alpha_combine;
- GLuint color_scale = rmesa->hw.pix[unit].cmd[PIX_PP_TXCBLEND2];
- GLuint alpha_scale = rmesa->hw.pix[unit].cmd[PIX_PP_TXABLEND2];
+ GLuint color_scale = rmesa->hw.pix[unit].cmd[PIX_PP_TXCBLEND2] &
+ ~(R200_TXC_SCALE_MASK);
+ GLuint alpha_scale = rmesa->hw.pix[unit].cmd[PIX_PP_TXABLEND2] &
+ ~(R200_TXA_DOT_ALPHA | R200_TXA_SCALE_MASK);
/* texUnit->_Current can be NULL if and only if the texture unit is
* not actually enabled.
* 1.3) does.
*/
RGBshift = 0;
- Ashift = 0;
/* FALLTHROUGH */
case GL_DOT3_RGB:
* normally.
*/
- RGBshift++;
- Ashift = RGBshift;
-
color_combine = (R200_TXC_ARG_C_ZERO |
R200_TXC_OP_DOT3 |
R200_TXC_BIAS_ARG_A |
return GL_FALSE;
}
- if ( (texUnit->_CurrentCombine->ModeRGB == GL_DOT3_RGB_EXT)
- || (texUnit->_CurrentCombine->ModeRGB == GL_DOT3_RGB) ) {
+ if ( (texUnit->_CurrentCombine->ModeRGB == GL_DOT3_RGBA_EXT)
+ || (texUnit->_CurrentCombine->ModeRGB == GL_DOT3_RGBA) ) {
alpha_scale |= R200_TXA_DOT_ALPHA;
+ Ashift = RGBshift;
}
/* Step 3:
* Apply the scale factor.
*/
- color_scale &= ~R200_TXC_SCALE_MASK;
- alpha_scale &= ~R200_TXA_SCALE_MASK;
color_scale |= (RGBshift << R200_TXC_SCALE_SHIFT);
alpha_scale |= (Ashift << R200_TXA_SCALE_SHIFT);