diff options
author | Brian Paul <[email protected]> | 2016-09-15 15:13:07 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-09-16 08:44:12 -0600 |
commit | a01872f80880c1b928817d84834b7259d073b367 (patch) | |
tree | ed9974ecf87e3c439a6f82db49568110ef0ec552 /src/mesa/state_tracker/st_context.c | |
parent | e1ea36ae719619e69dadaf7efa7c7a40f891be91 (diff) |
st/mesa: only enable MSAA coverage options when we have a MSAA buffer
Regardless of whether GL_MULTISAMPLE is enabled (it's enabled by default)
we should not set the alpha_to_coverage or alpha_to_one flags if the
current drawing buffer does not do MSAA.
This fixes the new piglit gl-1.3-alpha_to_coverage_nop test.
ETQW is a game that enables GL_SAMPLE_ALPHA_TO_COVERAGE without MSAA.
Shrubs along the side of roads were invisible because fragments with
alpha < 0.5 were being discarded (zero coverage).
v2: remove ctx->DrawBuffer != NULL check.
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index ddc11a43d21..81b3387626c 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -166,7 +166,8 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state) struct st_context *st = st_context(ctx); if (new_state & _NEW_BUFFERS) { - st->dirty |= ST_NEW_DSA | + st->dirty |= ST_NEW_BLEND | + ST_NEW_DSA | ST_NEW_FB_STATE | ST_NEW_SAMPLE_MASK | ST_NEW_SAMPLE_SHADING | |