OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 11 Jan 2019 16:43:42 +0000 (16:43 +0000)
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.")
(cherry picked from commit 3f9bcf9136af794d44fa4b0802c0d4df6b170175)

src/broadcom/compiler/qpu_schedule.c

index 4f3b621..5448319 100644 (file)
@@ -392,6 +392,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.