mesa: Replace _mesa_rgba_logicop_enabled(ctx) with ctx->Color.ColorLogicOpEnabled
Since GL_EXT_blend_logic_op is removed, _mesa_rgba_logicop_enabled(ctx) just returns ctx->Color.ColorLogicOpEnabled. That seems kind of silly. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Marek Olšák <maraeo@gmail.com>
This commit is contained in:
parent
2836aab203
commit
2e1cc883b3
|
@ -235,7 +235,7 @@ i830EvalLogicOpBlendState(struct gl_context * ctx)
|
|||
|
||||
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
|
||||
|
||||
if (_mesa_rgba_logicop_enabled(ctx)) {
|
||||
if (ctx->Color.ColorLogicOpEnabled) {
|
||||
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND |
|
||||
ENABLE_LOGIC_OP_MASK);
|
||||
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND |
|
||||
|
|
|
@ -210,7 +210,7 @@ i915EvalLogicOpBlendState(struct gl_context * ctx)
|
|||
dw0 = i915->state.Ctx[I915_CTXREG_LIS5];
|
||||
dw1 = i915->state.Ctx[I915_CTXREG_LIS6];
|
||||
|
||||
if (_mesa_rgba_logicop_enabled(ctx)) {
|
||||
if (ctx->Color.ColorLogicOpEnabled) {
|
||||
dw0 |= S5_LOGICOP_ENABLE;
|
||||
dw1 &= ~S6_CBUF_BLEND_ENABLE;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,7 @@ static void r300SetBlendState(struct gl_context * ctx)
|
|||
(R300_BLEND_GL_ZERO << R300_DST_BLEND_SHIFT);
|
||||
int eqnA = R300_COMB_FCN_ADD_CLAMP;
|
||||
|
||||
if (_mesa_rgba_logicop_enabled(ctx) || !ctx->Color.BlendEnabled) {
|
||||
if (ctx->Color.ColorLogicOpEnabled || !ctx->Color.BlendEnabled) {
|
||||
r300SetBlendCntl(r300, func, eqn, 0, func, eqn);
|
||||
return;
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ static void r300SetLogicOpState(struct gl_context *ctx)
|
|||
{
|
||||
r300ContextPtr r300 = R300_CONTEXT(ctx);
|
||||
R300_STATECHANGE(r300, rop);
|
||||
if (_mesa_rgba_logicop_enabled(ctx)) {
|
||||
if (ctx->Color.ColorLogicOpEnabled) {
|
||||
r300->hw.rop.cmd[1] = R300_RB3D_ROPCNTL_ROP_ENABLE |
|
||||
translate_logicop(ctx->Color.LogicOp);
|
||||
} else {
|
||||
|
@ -349,7 +349,7 @@ static void r300SetLogicOpState(struct gl_context *ctx)
|
|||
*/
|
||||
static void r300LogicOpcode(struct gl_context *ctx, GLenum logicop)
|
||||
{
|
||||
if (_mesa_rgba_logicop_enabled(ctx))
|
||||
if (ctx->Color.ColorLogicOpEnabled)
|
||||
r300SetLogicOpState(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ static void evergreenSetBlendState(struct gl_context * ctx) //diff : CB_COLOR_CO
|
|||
|
||||
EVERGREEN_STATECHANGE(context, cb);
|
||||
|
||||
if (_mesa_rgba_logicop_enabled(ctx) || !ctx->Color.BlendEnabled) {
|
||||
if (ctx->Color.ColorLogicOpEnabled || !ctx->Color.BlendEnabled) {
|
||||
SETfield(blend_reg,
|
||||
BLEND_ONE, COLOR_SRCBLEND_shift, COLOR_SRCBLEND_mask);
|
||||
SETfield(blend_reg,
|
||||
|
@ -521,7 +521,7 @@ static void evergreenSetLogicOpState(struct gl_context *ctx) //diff : CB_COLOR_C
|
|||
|
||||
EVERGREEN_STATECHANGE(context, cb);
|
||||
|
||||
if (_mesa_rgba_logicop_enabled(ctx))
|
||||
if (ctx->Color.ColorLogicOpEnabled)
|
||||
SETfield(evergreen->CB_COLOR_CONTROL.u32All,
|
||||
evergreen_translate_logicop(ctx->Color.LogicOp),
|
||||
EG_CB_COLOR_CONTROL__ROP3_shift,
|
||||
|
@ -1149,7 +1149,7 @@ static void evergreenShadeModel(struct gl_context * ctx, GLenum mode) //same
|
|||
|
||||
static void evergreenLogicOpcode(struct gl_context *ctx, GLenum logicop) //diff
|
||||
{
|
||||
if (_mesa_rgba_logicop_enabled(ctx))
|
||||
if (ctx->Color.ColorLogicOpEnabled)
|
||||
evergreenSetLogicOpState(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ static void r700SetBlendState(struct gl_context * ctx)
|
|||
|
||||
R600_STATECHANGE(context, blnd);
|
||||
|
||||
if (_mesa_rgba_logicop_enabled(ctx) || !ctx->Color.BlendEnabled) {
|
||||
if (ctx->Color.ColorLogicOpEnabled || !ctx->Color.BlendEnabled) {
|
||||
SETfield(blend_reg,
|
||||
BLEND_ONE, COLOR_SRCBLEND_shift, COLOR_SRCBLEND_mask);
|
||||
SETfield(blend_reg,
|
||||
|
@ -645,7 +645,7 @@ static void r700SetLogicOpState(struct gl_context *ctx)
|
|||
|
||||
R600_STATECHANGE(context, blnd);
|
||||
|
||||
if (_mesa_rgba_logicop_enabled(ctx))
|
||||
if (ctx->Color.ColorLogicOpEnabled)
|
||||
SETfield(r700->CB_COLOR_CONTROL.u32All,
|
||||
translate_logicop(ctx->Color.LogicOp), ROP3_shift, ROP3_mask);
|
||||
else
|
||||
|
@ -658,7 +658,7 @@ static void r700SetLogicOpState(struct gl_context *ctx)
|
|||
*/
|
||||
static void r700LogicOpcode(struct gl_context *ctx, GLenum logicop)
|
||||
{
|
||||
if (_mesa_rgba_logicop_enabled(ctx))
|
||||
if (ctx->Color.ColorLogicOpEnabled)
|
||||
r700SetLogicOpState(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,16 +72,4 @@ _mesa_need_secondary_color(const struct gl_context *ctx)
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is RGBA LogicOp enabled?
|
||||
*/
|
||||
static INLINE GLboolean
|
||||
_mesa_rgba_logicop_enabled(const struct gl_context *ctx)
|
||||
{
|
||||
return ctx->Color.ColorLogicOpEnabled;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue