case GL_NOTEQUAL:
case GL_GEQUAL:
case GL_ALWAYS:
- FLUSH_VERTICES(ctx, _NEW_COLOR);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewAlphaTest ? 0 : _NEW_COLOR);
+ ctx->NewDriverState |= ctx->DriverFlags.NewAlphaTest;
ctx->Color.AlphaFunc = func;
ctx->Color.AlphaRefUnclamped = ref;
ctx->Color.AlphaRef = CLAMP(ref, 0.0F, 1.0F);
goto invalid_enum_error;
if (ctx->Color.AlphaEnabled == state)
return;
+ /* AlphaEnabled is used by the fixed-func fragment program */
FLUSH_VERTICES(ctx, _NEW_COLOR);
+ ctx->NewDriverState |= ctx->DriverFlags.NewAlphaTest;
ctx->Color.AlphaEnabled = state;
break;
case GL_AUTO_NORMAL:
/** gl_context::Scissor::ScissorArray */
uint64_t NewScissorRect;
+ /** gl_context::Color::Alpha* */
+ uint64_t NewAlphaTest;
+
/** gl_context::Depth */
uint64_t NewDepth;
st->dirty |= ST_NEW_CLIP_STATE;
if (new_state & _NEW_COLOR)
- st->dirty |= ST_NEW_BLEND |
- ST_NEW_DSA;
+ st->dirty |= ST_NEW_BLEND;
if (new_state & _NEW_PIXEL)
st->dirty |= ST_NEW_PIXEL_TRANSFER;
f->NewFramebufferSRGB = ST_NEW_FB_STATE;
f->NewScissorRect = ST_NEW_SCISSOR;
f->NewScissorTest = ST_NEW_SCISSOR | ST_NEW_RASTERIZER;
+ f->NewAlphaTest = ST_NEW_DSA;
f->NewDepth = ST_NEW_DSA;
f->NewStencil = ST_NEW_DSA;
}