From cb03191e82d666a222a378b25560761e4885bd23 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 14 Jun 2023 08:28:07 -0400 Subject: [PATCH] lavapipe: more fixes for sample shading this fixes the case where a draw without sample shading precedes a draw with sample shading without changes to the sample mask Fixes: cc9e9580531 ("lavapipe: fix DS3 min sample setting") Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index 9ee9be1..341a4ed 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -1060,6 +1060,7 @@ static void handle_graphics_pipeline(struct lvp_pipeline *pipeline, state->force_min_sample = pipeline->force_min_sample; state->sample_shading = ps->ms->sample_shading_enable; state->min_sample_shading = ps->ms->min_sample_shading; + state->min_samples_dirty = true; state->blend_dirty = true; if (!BITSET_TEST(ps->dynamic, MESA_VK_DYNAMIC_MS_RASTERIZATION_SAMPLES)) update_samples(state, ps->ms->rasterization_samples); @@ -1072,7 +1073,7 @@ static void handle_graphics_pipeline(struct lvp_pipeline *pipeline, if (!BITSET_TEST(ps->dynamic, MESA_VK_DYNAMIC_MS_SAMPLE_MASK)) { state->sample_mask_dirty = state->sample_mask != 0xffffffff; state->sample_mask = 0xffffffff; - state->min_samples_dirty = state->min_samples; + state->min_samples_dirty = !!state->min_samples; state->min_samples = 0; } state->blend_dirty |= state->blend_state.alpha_to_coverage || state->blend_state.alpha_to_one; -- 2.7.4