diff options
author | Marek Olšák <[email protected]> | 2017-06-10 01:07:59 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | b677e96078889140ad1549cb7b94b0a33c10f7ba (patch) | |
tree | e11326c728215c9609b80f2bdde5d4d15a27c4bb /src/mesa/main/enable.c | |
parent | 37b834923d31bb170ffbfac882476659060b78b2 (diff) |
mesa: use DriverFlags.NewAlphaTest to communicate alphatest changes to st/mesa
Now AlphaFunc avoids the blend state update in st/mesa and avoids
_mesa_update_state_locked.
The GL_ALPHA_TEST enable won't trigger blend state updates in st/mesa
after st/mesa stops relying on _NEW_COLOR.
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 5a37770d009..9dccf759ca1 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -293,7 +293,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) 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: |