Mesa (staging/19.2): mesa: enable msaa in clear_with_quad if needed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 4 16:07:29 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 6d96ee8507f3defb419703e4db40c48c0c7dadae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d96ee8507f3defb419703e4db40c48c0c7dadae

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Tue Oct 29 19:45:48 2019 +0100

mesa: enable msaa in clear_with_quad if needed

If the DrawBuffer sample count is > 1 and msaa is enabled we must also
enable msaa when clearing it.

Fixes: ea5b7de138b ("radeonsi: make gl_SampleMaskIn = 0x1 when MSAA is disabled")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1991

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Tested-by: Witold Baryluk <witold.baryluk at gmail.com>
(cherry picked from commit 8a723282e3f7a312ab0ca3aa9157e5b76ec182af)

---

 src/mesa/state_tracker/st_cb_clear.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 593d15331fd..cef80c36f1b 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -325,6 +325,7 @@ clear_with_quad(struct gl_context *ctx, unsigned clear_buffers)
    cso_set_stream_outputs(cso, 0, NULL, NULL);
    cso_set_sample_mask(cso, ~0);
    cso_set_min_samples(cso, 1);
+   st->clear.raster.multisample = st->state.fb_num_samples > 1;
    cso_set_rasterizer(cso, &st->clear.raster);
 
    /* viewport state: viewport matching window dims */




More information about the mesa-commit mailing list