mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
mesa: Use ColorLogicOpEnabled instead of _LogicOpEnabled
Since GL_EXT_blend_logic_op is removed, _LogicOpEnabled and ColorLogicOpEnabled always have the same value. 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
113e8167de
commit
2836aab203
10 changed files with 7 additions and 25 deletions
|
|
@ -143,7 +143,7 @@ static void upload_cc_unit(struct brw_context *brw)
|
|||
}
|
||||
|
||||
/* _NEW_COLOR */
|
||||
if (ctx->Color._LogicOpEnabled && ctx->Color.LogicOp != GL_COPY) {
|
||||
if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) {
|
||||
cc->cc2.logicop_enable = 1;
|
||||
cc->cc5.logicop_func = intel_translate_logic_op(ctx->Color.LogicOp);
|
||||
} else if (ctx->Color.BlendEnabled) {
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
|
|||
|
||||
if (intel->gen < 6) {
|
||||
/* _NEW_COLOR */
|
||||
if (!ctx->Color._LogicOpEnabled &&
|
||||
if (!ctx->Color.ColorLogicOpEnabled &&
|
||||
(ctx->Color.BlendEnabled & (1 << unit)))
|
||||
surf[0] |= BRW_SURFACE_BLEND_ENABLED;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ prepare_blend_state(struct brw_context *brw)
|
|||
|
||||
for (b = 0; b < nr_draw_buffers; b++) {
|
||||
/* _NEW_COLOR */
|
||||
if (ctx->Color._LogicOpEnabled) {
|
||||
if (ctx->Color.ColorLogicOpEnabled) {
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[b];
|
||||
/* _NEW_BUFFERS */
|
||||
/* Floating point RTs should have no effect from LogicOp,
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ do_blit_readpixels(struct gl_context * ctx,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (ctx->_ImageTransferState || ctx->Color._LogicOpEnabled) {
|
||||
if (ctx->_ImageTransferState || ctx->Color.ColorLogicOpEnabled) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -807,7 +807,6 @@ void _mesa_init_color( struct gl_context * ctx )
|
|||
ASSIGN_4V( ctx->Color.BlendColorUnclamped, 0.0, 0.0, 0.0, 0.0 );
|
||||
ctx->Color.IndexLogicOpEnabled = GL_FALSE;
|
||||
ctx->Color.ColorLogicOpEnabled = GL_FALSE;
|
||||
ctx->Color._LogicOpEnabled = GL_FALSE;
|
||||
ctx->Color.LogicOp = GL_COPY;
|
||||
ctx->Color.DitherFlag = GL_TRUE;
|
||||
|
||||
|
|
|
|||
|
|
@ -789,7 +789,6 @@ struct gl_colorbuffer_attrib
|
|||
GLenum LogicOp; /**< Logic operator */
|
||||
GLboolean IndexLogicOpEnabled; /**< Color index logic op enabled flag */
|
||||
GLboolean ColorLogicOpEnabled; /**< RGBA logic op enabled flag */
|
||||
GLboolean _LogicOpEnabled; /**< RGBA logic op + EXT_blend_logic_op enabled flag */
|
||||
/*@}*/
|
||||
|
||||
GLboolean DitherFlag; /**< Dither enable flag */
|
||||
|
|
|
|||
|
|
@ -406,19 +406,6 @@ update_multisample(struct gl_context *ctx)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update derived color/blend/logicop state.
|
||||
*/
|
||||
static void
|
||||
update_color(struct gl_context *ctx)
|
||||
{
|
||||
/* This is needed to support 1.1's RGB logic ops AND
|
||||
* 1.0's blending logicops.
|
||||
*/
|
||||
ctx->Color._LogicOpEnabled = _mesa_rgba_logicop_enabled(ctx);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the ctx->Color._ClampFragmentColor field
|
||||
*/
|
||||
|
|
@ -634,9 +621,6 @@ _mesa_update_state_locked( struct gl_context *ctx )
|
|||
if (new_state & (_NEW_MULTISAMPLE | _NEW_BUFFERS))
|
||||
update_multisample( ctx );
|
||||
|
||||
if (new_state & _NEW_COLOR)
|
||||
update_color( ctx );
|
||||
|
||||
if (new_state & (_NEW_COLOR | _NEW_BUFFERS))
|
||||
update_clamp_read_color(ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -1001,7 +1001,7 @@ _swrast_blend_span(struct gl_context *ctx, struct gl_renderbuffer *rb, SWspan *s
|
|||
ASSERT(span->end <= MAX_WIDTH);
|
||||
ASSERT(span->arrayMask & SPAN_RGBA);
|
||||
ASSERT(rb->DataType == span->array->ChanType);
|
||||
ASSERT(!ctx->Color._LogicOpEnabled);
|
||||
ASSERT(!ctx->Color.ColorLogicOpEnabled);
|
||||
|
||||
rbPixels = _swrast_get_dest_rgba(ctx, rb, span);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ _swrast_update_rasterflags( struct gl_context *ctx )
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (ctx->Color._LogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
|
||||
if (ctx->Color.ColorLogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
|
||||
if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT;
|
||||
if ( ctx->Viewport.X < 0
|
||||
|| ctx->Viewport.X + ctx->Viewport.Width > (GLint) ctx->DrawBuffer->Width
|
||||
|
|
|
|||
|
|
@ -1248,7 +1248,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
|
|||
ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB ||
|
||||
rb->_BaseFormat == GL_ALPHA);
|
||||
|
||||
if (ctx->Color._LogicOpEnabled) {
|
||||
if (ctx->Color.ColorLogicOpEnabled) {
|
||||
_swrast_logicop_rgba_span(ctx, rb, span);
|
||||
}
|
||||
else if ((ctx->Color.BlendEnabled >> buf) & 1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue