summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-11-15 14:37:47 +0100
committerNicolai Hähnle <[email protected]>2016-11-18 09:48:43 +0100
commit70454f5b55d72c86d9a73bb149f20f66ae43ded7 (patch)
tree66c2bfec47e9fbcc004896017863c044e58d924b /src/gallium
parentceac3397fb79f48b76c9cd9f186dbc3efa0f5ea3 (diff)
radeonsi: allow sample mask export for single-sample framebuffers
This fixes GL45-CTS.sample_variables.mask.*.samples_1.*. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index f8dfcf298bd..c64bb5b0460 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -867,11 +867,12 @@ static void si_bind_rs_state(struct pipe_context *ctx, void *state)
if (!state)
return;
- if (sctx->framebuffer.nr_samples > 1 &&
- (!old_rs || old_rs->multisample_enable != rs->multisample_enable)) {
+ if (!old_rs || old_rs->multisample_enable != rs->multisample_enable) {
si_mark_atom_dirty(sctx, &sctx->db_render_state);
- if (sctx->b.family >= CHIP_POLARIS10)
+ /* Update the small primitive filter workaround if necessary. */
+ if (sctx->b.family >= CHIP_POLARIS10 &&
+ sctx->framebuffer.nr_samples > 1)
si_mark_atom_dirty(sctx, &sctx->msaa_sample_locs.atom);
}
@@ -1153,7 +1154,7 @@ static void si_emit_db_render_state(struct si_context *sctx, struct r600_atom *s
}
/* Disable the gl_SampleMask fragment shader output if MSAA is disabled. */
- if (sctx->framebuffer.nr_samples <= 1 || (rs && !rs->multisample_enable))
+ if (!rs || !rs->multisample_enable)
db_shader_control &= C_02880C_MASK_EXPORT_ENABLE;
if (sctx->b.family == CHIP_STONEY &&