diff options
author | Marek Olšák <[email protected]> | 2017-06-10 02:15:34 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | 0b03d82f9c8041043be0928f557a16ec0fcd1c7d (patch) | |
tree | 22ee2a6f8d928f28bdf635bb1e58a137c9c1a355 /src/mesa | |
parent | 9c499e6759b26c5e9c5a16e306624adee4bca8d6 (diff) |
st/mesa: check correctly if multisampling is enabled
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_blend.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_msaa.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index 74289979c11..43b16f8905d 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -39,6 +39,7 @@ #include "pipe/p_defines.h" #include "cso_cache/cso_context.h" +#include "framebuffer.h" #include "main/macros.h" /** @@ -265,8 +266,7 @@ st_update_blend( struct st_context *st ) blend->dither = ctx->Color.DitherFlag; - if (ctx->Multisample.Enabled && - ctx->DrawBuffer->Visual.sampleBuffers > 0 && + if (_mesa_is_multisample_enabled(ctx) && !(ctx->DrawBuffer->_IntegerBuffers & 0x1)) { /* Unlike in gallium/d3d10 these operations are only performed * if both msaa is enabled and we have a multisample buffer. diff --git a/src/mesa/state_tracker/st_atom_msaa.c b/src/mesa/state_tracker/st_atom_msaa.c index dd065177ecc..0bdb9b23e4b 100644 --- a/src/mesa/state_tracker/st_atom_msaa.c +++ b/src/mesa/state_tracker/st_atom_msaa.c @@ -33,6 +33,7 @@ #include "st_program.h" #include "cso_cache/cso_context.h" +#include "main/framebuffer.h" /* Update the sample mask for MSAA. @@ -42,7 +43,7 @@ void st_update_sample_mask( struct st_context *st ) unsigned sample_mask = 0xffffffff; unsigned sample_count = st->state.fb_num_samples; - if (st->ctx->Multisample.Enabled && sample_count > 1) { + if (_mesa_is_multisample_enabled(st->ctx) && sample_count > 1) { /* unlike in gallium/d3d10 the mask is only active if msaa is enabled */ if (st->ctx->Multisample.SampleCoverage) { unsigned nr_bits; |