diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-07-03 19:27:12 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-03 14:59:21 -0400 |
commit | ea5b7de138bb7e9a4e7e4f0c39c4ceb16acae923 (patch) | |
tree | ac31d8455a0983f4089b6c734d6decb696641071 /src | |
parent | 7bb3d6acec6c3829a01c0302ea970bd158b9c7f3 (diff) |
radeonsi: make gl_SampleMaskIn = 0x1 when MSAA is disabled
gl_SampleMaskIn is 1 when R_028BE0_PA_SC_AA_CONFIG is 0, so this commit rework the conditions
controlling this register.
Before it was set if the sctx->framebuffer had a sample count > 1.
Now we still require this condition, but we also need either:
- GL_MULTISAMPLE to be enabled
- to be executing an operation that doesn't depends on GL state using u_blitter.
This fixes the arb_sample_shading/sample_mask piglit tests on radeonsi.
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index b9fc77f7918..bcf0b74670f 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3437,6 +3437,7 @@ static void si_emit_msaa_config(struct si_context *sctx) S_028804_INTERPOLATE_COMP_Z(1) | S_028804_STATIC_ANCHOR_ASSOCIATIONS(1); unsigned coverage_samples, color_samples, z_samples; + struct si_state_rasterizer *rs = sctx->queued.named.rasterizer; /* S: Coverage samples (up to 16x): * - Scan conversion samples (PA_SC_AA_CONFIG.MSAA_NUM_SAMPLES) @@ -3479,7 +3480,7 @@ static void si_emit_msaa_config(struct si_context *sctx) * EQAA 4s 4z 2f - might look the same as 4x MSAA with low-density geometry * EQAA 2s 2z 2f = 2x MSAA */ - if (sctx->framebuffer.nr_samples > 1) { + if (sctx->framebuffer.nr_samples > 1 && rs->multisample_enable) { coverage_samples = sctx->framebuffer.nr_samples; color_samples = sctx->framebuffer.nr_color_samples; |