summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qpu_emit.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-11-10 15:23:19 -0800
committerEric Anholt <[email protected]>2016-11-12 18:46:35 -0800
commit4f527f12604269f15704bbd14a4962766afdfb9a (patch)
tree4f41e1f564a7f2a7fc702239757e64c7b75db522 /src/gallium/drivers/vc4/vc4_qpu_emit.c
parent93cdae44defdcc0a758e2f5376226b9944e1c91e (diff)
vc4: Add a thread switch QIR instruction.
This will eventually be generated at the QIR level, so that vc4_qir_schedule.c can arrange the separation of tex_strb from tex_result correctly. It will also be important so that register allocation set the register classes appropriately for values that are live across the switch.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu_emit.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_emit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index eedee55a9f5..58fcbc93d97 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -500,6 +500,12 @@ vc4_generate_code_block(struct vc4_compile *c,
handle_r4_qpu_write(block, qinst, dst);
break;
+ case QOP_THRSW:
+ queue(block, qpu_NOP());
+ *last_inst(block) = qpu_set_sig(*last_inst(block),
+ QPU_SIG_THREAD_SWITCH);
+ break;
+
case QOP_BRANCH:
/* The branch target will be updated at QPU scheduling
* time.