Module: Mesa Branch: staging/22.2 Commit: 5c4028ac36e17b5488add87e110ad62fc5c9c3fe URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c4028ac36e17b5488add87e110ad62fc5c9c3fe
Author: Axel Davy <[email protected]> Date: Fri Jul 29 21:15:01 2022 +0200 frontend/nine: Fix ATOC handling The previous code was incorrectly checking the previous value of alphatestenable. In addition, remove an optimization that cannot hit (as we filter out redundant state settings). cc: mesa-stable Fixes: 1272640d5 ("st/nine: Fix alpha to coverage states") Signed-off-by: Axel Davy <[email protected]> Acked-by: David Heidelberg <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18021> (cherry picked from commit 4f953ad51299a744aa74b7667debd8a8245685f5) --- .pick_status.json | 2 +- src/gallium/frontends/nine/nine_state.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index fff60bf0889..f6e6c50035b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -931,7 +931,7 @@ "description": "frontend/nine: Fix ATOC handling", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1272640d55243105bb192a5dd460dc70fc7a77a6" }, diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c index 9ebfdb24712..9f940bc6f59 100644 --- a/src/gallium/frontends/nine/nine_state.c +++ b/src/gallium/frontends/nine/nine_state.c @@ -1437,11 +1437,8 @@ CSMT_ITEM_NO_WAIT(nine_context_set_render_state, } } if (unlikely(State == D3DRS_ALPHATESTENABLE && (context->rs[NINED3DRS_ALPHACOVERAGE] & 2))) { - DWORD alphacoverage_prev = context->rs[NINED3DRS_ALPHACOVERAGE]; context->rs[NINED3DRS_ALPHACOVERAGE] &= 6; - context->rs[NINED3DRS_ALPHACOVERAGE] |= (context->rs[D3DRS_ALPHATESTENABLE] ? 1 : 0); - if (context->rs[NINED3DRS_ALPHACOVERAGE] != alphacoverage_prev) - context->changed.group |= NINE_STATE_BLEND; + context->rs[NINED3DRS_ALPHACOVERAGE] |= (Value ? 1 : 0); } context->rs[State] = nine_fix_render_state_value(State, Value);
