need to check for this condition before the later field has been computed.
Fixes logicop bug #8860.
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
- if (ctx->Color._LogicOpEnabled) {
+ if (RGBA_LOGICOP_ENABLED(ctx)) {
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND |
ENABLE_LOGIC_OP_MASK);
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND |
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- if (ctx->Color._LogicOpEnabled) {
+ if (RGBA_LOGICOP_ENABLED(ctx)) {
i915->state.Ctx[I915_CTXREG_LIS5] |= S5_LOGICOP_ENABLE;
i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE;
} else {
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
- if (ctx->Color._LogicOpEnabled) {
+ if (RGBA_LOGICOP_ENABLED(ctx)) {
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND |
ENABLE_LOGIC_OP_MASK);
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND |
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- if (ctx->Color._LogicOpEnabled) {
+ if (RGBA_LOGICOP_ENABLED(ctx)) {
i915->state.Ctx[I915_CTXREG_LIS5] |= S5_LOGICOP_ENABLE;
i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE;
}
if (dirty & I915_UPLOAD_CTX) {
if (INTEL_DEBUG & DEBUG_STATE)
fprintf(stderr, "I915_UPLOAD_CTX:\n");
+
emit(intel, state->Ctx, sizeof(state->Ctx));
}
static void updateBlendLogicOp(GLcontext *ctx)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
+ GLboolean logicOp = RGBA_LOGICOP_ENABLED(ctx);
MGA_STATECHANGE( mmesa, MGA_UPLOAD_CONTEXT );
mmesa->hw.blend_func_enable =
- (ctx->Color.BlendEnabled && !ctx->Color._LogicOpEnabled) ? ~0 : 0;
+ (ctx->Color.BlendEnabled && !logicOp) ? ~0 : 0;
FALLBACK( ctx, MGA_FALLBACK_BLEND,
- ctx->Color.BlendEnabled && !ctx->Color._LogicOpEnabled &&
+ ctx->Color.BlendEnabled && !logicOp &&
mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) );
}
mmesa->hw.blend_func = (src | dst);
FALLBACK( ctx, MGA_FALLBACK_BLEND,
- ctx->Color.BlendEnabled && !ctx->Color._LogicOpEnabled &&
+ ctx->Color.BlendEnabled && !RGBA_LOGICOP_ENALBED(ctx) &&
mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) );
}
? mmesa->hw.zmode : (DC_zmode_nozcmp | DC_atype_i);
mmesa->setup.dwgctl &= DC_bop_MASK;
- mmesa->setup.dwgctl |= (ctx->Color._LogicOpEnabled)
+ mmesa->setup.dwgctl |= RGBA_LOGICOP_ENABLED(ctx)
? mmesa->hw.rop : mgarop_NoBLK[ GL_COPY & 0x0f ];
mmesa->setup.alphactrl &= AC_src_MASK & AC_dst_MASK & AC_atmode_MASK
(R300_BLEND_GL_ZERO << R300_DST_BLEND_SHIFT);
int eqnA = R300_COMB_FCN_ADD_CLAMP;
- if (ctx->Color._LogicOpEnabled || !ctx->Color.BlendEnabled) {
+ if (RGBA_LOGICOP_ENABLED(ctx) || !ctx->Color.BlendEnabled) {
r300_set_blend_cntl(r300,
func, eqn, 0,
func, eqn);