st/nine: Do not mark both ff vs and ps updated
authorAxel Davy <davyaxel0@gmail.com>
Sat, 22 Sep 2018 09:09:11 +0000 (11:09 +0200)
committerAxel Davy <davyaxel0@gmail.com>
Tue, 25 Sep 2018 20:05:24 +0000 (22:05 +0200)
Previously if only ff vs or only ff ps was used,
the constants for both were marked as updated,
while only the constants of the used ff shader
were updated.

Now that NINE_STATE_FF_VS and
NINE_STATE_FF_PS do not intersect anymore,
we can correctly mark the correct set of constant
as updated.

Fixes: https://github.com/iXit/Mesa-3D/issues/319
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/nine_ff.c

index addea3dde1fce9c5ad6b9af64300e7885e38e448..261be276ad890eb98f1228c772c16a1767937292 100644 (file)
@@ -2066,6 +2066,8 @@ nine_ff_update(struct NineDevice9 *device)
 
         context->pipe_data.cb_vs_ff = cb;
         context->commit |= NINE_STATE_COMMIT_CONST_VS;
+
+        context->changed.group &= ~NINE_STATE_FF_VS;
     }
 
     if (!context->ps) {
@@ -2078,9 +2080,9 @@ nine_ff_update(struct NineDevice9 *device)
 
         context->pipe_data.cb_ps_ff = cb;
         context->commit |= NINE_STATE_COMMIT_CONST_PS;
-    }
 
-    context->changed.group &= ~NINE_STATE_FF;
+        context->changed.group &= ~NINE_STATE_FF_PS;
+    }
 }