#include "main/glheader.h"
#include "main/macros.h"
#include "main/mtypes.h"
-#include "main/simple_list.h"
#include "main/enums.h"
-#include "main/mm.h"
#include "intel_screen.h"
#include "intel_tex.h"
}
-static INLINE GLuint
+static inline GLuint
GetTexelOp(GLint unit)
{
switch (unit) {
GLuint texel_op, GLuint * state, const GLfloat * factor)
{
const GLuint numColorArgs = combine->_NumArgsRGB;
- const GLuint numAlphaArgs = combine->_NumArgsA;
+ GLuint numAlphaArgs = combine->_NumArgsA;
GLuint blendop;
GLuint ablendop;
};
if (INTEL_DEBUG & DEBUG_TEXTURE)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ fprintf(stderr, "%s\n", __func__);
/* The EXT version of the DOT3 extension does not support the
break;
case GL_DOT3_RGBA_EXT:
case GL_DOT3_RGBA:
- blendop = TEXBLENDOP_DOT3;
+ blendop = TEXBLENDOP_DOT4;
break;
default:
return pass_through(state, blendUnit);
if (combine->ModeRGB == GL_DOT3_RGBA_EXT ||
combine->ModeRGB == GL_DOT3_RGBA) {
ablendop = TEXBLENDOP_DOT4;
+ numAlphaArgs = 2;
args_A[0] = TEXBLENDARG_FACTOR; /* the global factor */
args_A[1] = TEXBLENDARG_FACTOR;
args_A[2] = TEXBLENDARG_FACTOR;
emit_texblend(struct i830_context *i830, GLuint unit, GLuint blendUnit,
bool last_stage)
{
- struct gl_texture_unit *texUnit = &i830->intel.ctx.Texture.Unit[unit];
+ struct gl_fixedfunc_texture_unit *texUnit =
+ &i830->intel.ctx.Texture.FixedFuncUnit[unit];
GLuint tmp[I830_TEXBLEND_SIZE], tmp_sz;
if (0)
- fprintf(stderr, "%s unit %d\n", __FUNCTION__, unit);
+ fprintf(stderr, "%s unit %d\n", __func__, unit);
/* Update i830->state.TexBlend
*/
I830_ACTIVESTATE(i830, I830_UPLOAD_TEXBLEND_ALL, false);
if (ctx->Texture._MaxEnabledTexImageUnit != -1) {
- for (unit = 0; unit < ctx->Texture._MaxEnabledTexImageUnit; unit++)
- if (ctx->Texture.Unit[unit]._ReallyEnabled)
+ for (unit = 0; unit <= ctx->Texture._MaxEnabledTexImageUnit; unit++)
+ if (ctx->Texture.Unit[unit]._Current)
emit_texblend(i830, unit, blendunit++,
unit == ctx->Texture._MaxEnabledTexImageUnit);
} else {