vmesa = vmesa;
}
-static void viaBlendEquation(GLcontext *ctx, GLenum mode)
+static void viaBlendEquationSeparate(GLcontext *ctx, GLenum rgbMode, GLenum aMode)
{
#ifdef DEBUG
if (VIA_DEBUG) fprintf(stderr, "%s in\n", __FUNCTION__);
#endif
+
+ /* GL_EXT_blend_equation_separate not supported */
+ ASSERT(rgbMode == aMode);
+
/* Can only do GL_ADD equation in hardware */
- FALLBACK(VIA_CONTEXT(ctx), VIA_FALLBACK_BLEND_EQ, mode != GL_FUNC_ADD_EXT);
+ FALLBACK(VIA_CONTEXT(ctx), VIA_FALLBACK_BLEND_EQ, rgbMode != GL_FUNC_ADD_EXT);
/* BlendEquation sets ColorLogicOpEnabled in an unexpected
* manner.
if (texUnit0->_ReallyEnabled) {
struct gl_texture_object *texObj = texUnit0->_Current;
- struct gl_texture_image *texImage = texObj->Image[0];
+ struct gl_texture_image *texImage = texObj->Image[0][0];
GLint r, g, b, a;
#ifdef DEBUG
if (VIA_DEBUG) fprintf(stderr, "texUnit0->_ReallyEnabled\n");
if (texUnit1->_ReallyEnabled) {
struct gl_texture_object *texObj = texUnit1->_Current;
- struct gl_texture_image *texImage = texObj->Image[0];
+ struct gl_texture_image *texImage = texObj->Image[0][0];
GLint r, g, b, a;
if (texImage->Border) {
/* API callbacks
*/
ctx->Driver.AlphaFunc = viaAlphaFunc;
- ctx->Driver.BlendEquation = viaBlendEquation;
+ ctx->Driver.BlendEquationSeparate = viaBlendEquationSeparate;
//ctx->Driver.BlendFunc = viaBlendFunc;
ctx->Driver.BlendFuncSeparate = viaBlendFuncSeparate;
ctx->Driver.ClearColor = viaClearColor;
{
GLuint texFormat;
viaTextureObjectPtr t = (viaTextureObjectPtr)tObj->DriverData;
- const struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel];
+ const struct gl_texture_image *baseImage = tObj->Image[0][tObj->BaseLevel];
GLint firstLevel, lastLevel, numLevels;
GLint log2Width, log2Height, log2Pitch;
GLint (*texSize)[12][12];
t->lastLevel = firstLevel + 9;
}
- log2Width = tObj->Image[firstLevel]->WidthLog2;
- log2Height = tObj->Image[firstLevel]->HeightLog2;
- log2Pitch = logbase2(tObj->Image[firstLevel]->Width * baseImage->TexFormat->TexelBytes);
+ log2Width = tObj->Image[0][firstLevel]->WidthLog2;
+ log2Height = tObj->Image[0][firstLevel]->HeightLog2;
+ log2Pitch = logbase2(tObj->Image[0][firstLevel]->Width * baseImage->TexFormat->TexelBytes);
for (i = 0; i < numLevels; i++) {
- t->image[i].image = tObj->Image[i];
+ t->image[i].image = tObj->Image[0][i];
t->image[i].internalFormat = baseImage->Format;
}
{
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
const struct gl_texture_object *tObj = texUnit->_Current;
- const GLuint format = tObj->Image[tObj->BaseLevel]->Format;
+ const GLuint format = tObj->Image[0][tObj->BaseLevel]->Format;
GLuint color_combine, alpha_combine;
#ifdef DEBUG
if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__);
}
}
- if (tObj->Image[tObj->BaseLevel]->Border > 0) {
+ if (tObj->Image[0][tObj->BaseLevel]->Border > 0) {
FALLBACK(vmesa, VIA_FALLBACK_TEXTURE, GL_TRUE);
return;
}
/* Update texture environment if texture object image format or
* texture environment state has changed.
*/
- if (tObj->Image[tObj->BaseLevel]->Format != vmesa->TexEnvImageFmt[unit]) {
- vmesa->TexEnvImageFmt[unit] = tObj->Image[tObj->BaseLevel]->Format;
+ if (tObj->Image[0][tObj->BaseLevel]->Format != vmesa->TexEnvImageFmt[unit]) {
+ vmesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->Format;
viaUpdateTexEnv(ctx, unit);
}
}