From 7b7532b80618685c5637225efef12196b725976a Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 9 Mar 2021 11:27:50 +0100 Subject: [PATCH] freedreno/computerator: Add branching example Mainly to be able to test label resolution without having to replace a shader. Part-of: --- src/freedreno/computerator/examples/branch.asm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/freedreno/computerator/examples/branch.asm diff --git a/src/freedreno/computerator/examples/branch.asm b/src/freedreno/computerator/examples/branch.asm new file mode 100644 index 00000000000..ab5c288a33a --- /dev/null +++ b/src/freedreno/computerator/examples/branch.asm @@ -0,0 +1,15 @@ +@localsize 16, 1, 1 +@buf 16 ; g[0] +@invocationid(r0.x) ; r0.xyz +@branchstack 1 +cmps.u.gt p0.x, r0.x, 0 +mov.u32u32 r1.x, 0x87654321 +(rpt5)nop +br !p0.x, #endif +mov.u32u32 r1.x, 0x12345678 +endif: +(jp)(rpt5)nop +stib.b.untyped.1d.u32.1.imm r1.x, r0.x, 0 +end +nop +