mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
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>
This commit is contained in:
parent
19c7b6f9d6
commit
7b7532b806
1 changed files with 15 additions and 0 deletions
15
src/freedreno/computerator/examples/branch.asm
Normal file
15
src/freedreno/computerator/examples/branch.asm
Normal file
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Reference in a new issue