v3d: Make sure that a thrsw doesn't split a multop from its umul24.
authorEric Anholt <eric@anholt.net>
Wed, 12 Dec 2018 00:14:03 +0000 (16:14 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 15 Dec 2018 01:48:01 +0000 (17:48 -0800)
The thrsw will invalidate rtop, just like accumulators and flags.  Caught
by simulator assertions in CS imulextended/umulextended tests.

Fixes: 90269ba35333 ("broadcom/vc5: Use THRSW to enable multi-threaded shaders.")
src/broadcom/compiler/qpu_schedule.c

index 944059c9778902b0446e087c06216810aceea503..365aebdbd6d9a8151081d7248ad411c13dff19e6 100644 (file)
@@ -405,6 +405,7 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)
                 for (int i = 0; i < ARRAY_SIZE(state->last_r); i++)
                         add_write_dep(state, &state->last_r[i], n);
                 add_write_dep(state, &state->last_sf, n);
+                add_write_dep(state, &state->last_rtop, n);
 
                 /* Scoreboard-locking operations have to stay after the last
                  * thread switch.