Skip to content

MaxNiftyNine/ComputeU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING... MADE WITH CODEX (tested on real hardware but not super thoroughly)

wiiu-cs-asm

Wii U compute shader assembler and GFD writer.

This project was created to support testing around devkitPro/wut#437. It emits .gsh files that contain GX2ComputeShader blocks.

Requirements

  • Python 3.10+

Example

./wiiu-cs-asm.py examples/minimal_compute.ltas -o minimal_compute.gsh

Assembly Directives

Implemented directives:

  • .workgroup X Y Z where X * Y * Z == 64
  • .num_gprs N
  • .stack_size N
  • .reg INDEX VALUE
  • .regs V0 ... V11
  • .raw32 WORD...
  • .cf_alu LABEL [count=N] [kc0_bank=N] [kc0_addr=N] [kc1_bank=N] [kc1_addr=N]
  • .cf_nop [end]
  • .cf_export[_done] type=PIXEL|POSITION|PARAMETER base=N gpr=N sel=xyzw [end]
  • .cf_export[_done]_buf type=PIXEL|POSITION|PARAMETER base=N gpr=N size=N mask=0xf [end]
  • .cf_mem_streamN base=N gpr=N size=N mask=0xf [end]
  • .cf_mem_export encoding=r700|eg base=N gpr=N size=N mask=0xf [end]
  • .cf_mem_rat rat=N data_gpr=N index_gpr=N mask=0x1 [end]
  • .alu_op OP DEST SRC0 [SRC1] [flags...]
  • .literal WORD...

Registers use r0.x style syntax. Constant-file operands are c0.x through c255.w. Inline constants include 0, 0.5, 1, and 1i.

License

do whatever the hell you want

About

Vibe Coded POC Wii U compute shader assembler and GFD writer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors