st/nine: Convert redundant check to assert in ff ps
authorAxel Davy <axel.davy@ens.fr>
Sun, 27 Nov 2016 12:14:21 +0000 (13:14 +0100)
committerAxel Davy <axel.davy@ens.fr>
Tue, 20 Dec 2016 22:44:21 +0000 (23:44 +0100)
We disable the alpha stage if the color stage is disabled.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_ff.c

index 294fbc89779ff6df0c7b9b3112accfdb30e4f6eb..f30a98886fac673afc37cc158fe8efa0803069f1 100644 (file)
@@ -1385,9 +1385,10 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key)
         struct ureg_dst dst;
         struct ureg_src arg[3];
 
-        if (key->ts[s].colorop == D3DTOP_DISABLE &&
-            key->ts[s].alphaop == D3DTOP_DISABLE)
+        if (key->ts[s].colorop == D3DTOP_DISABLE) {
+            assert (key->ts[s].alphaop == D3DTOP_DISABLE);
             continue;
+        }
         ps.stage.index = s;
 
         DBG("STAGE[%u]: colorop=%s alphaop=%s\n", s,