Module: Mesa
Branch: master
Commit: 7b7532b80618685c5637225efef12196b725976a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b7532b80618685c5637225efef12196b725976a

Author: Connor Abbott <[email protected]>
Date:   Tue Mar  9 11:27:50 2021 +0100

freedreno/computerator: Add branching example

Mainly to be able to test label resolution without having to replace a
shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9463>

---

 src/freedreno/computerator/examples/branch.asm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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
+

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to