Module: Mesa
Branch: main
Commit: 4f953ad51299a744aa74b7667debd8a8245685f5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f953ad51299a744aa74b7667debd8a8245685f5

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>

---

 src/gallium/frontends/nine/nine_state.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

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);

Reply via email to