From 1b5d36c4e10c795e6da29460cd94be2f1246e4c7 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sat, 6 Mar 2021 10:45:44 +1300 Subject: [PATCH] st/mesa: Update constants on alpha test change if it's lowered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nir_lower_alpha_test creates a uniform for the alpha reference value; this needs to be updated when changing alpha test state. Fixes: b1c4c4c7f53 ("mesa/gallium: automatically lower alpha-testing") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4390 Reviewed-by: Marek Olšák Part-of: (cherry picked from commit efd7711e0e140c75f3624997f91f46008a39c325) --- .pick_status.json | 2 +- src/mesa/state_tracker/st_context.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index aecad866fa0..764af40eb22 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1138,7 +1138,7 @@ "description": "st/mesa: Update constants on alpha test change if it's lowered", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "b1c4c4c7f53cde52a8f3b3ec17cd66b89bf04199" }, diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 709511b5991..2bc2bb10f3a 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -514,7 +514,7 @@ st_init_driver_flags(struct st_context *st) f->NewScissorTest = ST_NEW_SCISSOR | ST_NEW_RASTERIZER; if (st->lower_alpha_test) - f->NewAlphaTest = ST_NEW_FS_STATE; + f->NewAlphaTest = ST_NEW_FS_STATE | ST_NEW_FS_CONSTANTS; else f->NewAlphaTest = ST_NEW_DSA;