1bf215546Sopenharmony_ciio.write("HELLO WORLD\n")
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_cir = rnn.init("a630")
4bf215546Sopenharmony_ci
5bf215546Sopenharmony_cifunction start_cmdstream(name)
6bf215546Sopenharmony_ci  io.write("START: " .. name .. "\n")
7bf215546Sopenharmony_ciend
8bf215546Sopenharmony_ci
9bf215546Sopenharmony_cifunction draw(primtype, nindx)
10bf215546Sopenharmony_ci  io.write("DRAW: " .. primtype .. ", " .. nindx .. "\n")
11bf215546Sopenharmony_ci  -- io.write("GRAS_CL_VPORT_XOFFSET: " .. r.GRAS_CL_VPORT_XOFFSET .. "\n")
12bf215546Sopenharmony_ci  io.write("RB_MRT[0].CONTROL.ROP_CODE: " .. r.RB_MRT[0].CONTROL.ROP_CODE .. "\n")
13bf215546Sopenharmony_ci  io.write("SP_VS_OUT[0].A_COMPMASK: " .. r.SP_VS_OUT[0].A_COMPMASK .. "\n")
14bf215546Sopenharmony_ci  --io.write("RB_DEPTH_CONTROL.Z_TEST_ENABLE: " .. tostring(r.RB_DEPTH_CONTROL.Z_TEST_ENABLE) .. "\n")
15bf215546Sopenharmony_ci  io.write("0x2280: written=" .. regs.written(0x2280) .. ", lastval=" .. regs.lastval(0x2280) .. ", val=" .. regs.val(0x2280) .. "\n")
16bf215546Sopenharmony_ciend
17bf215546Sopenharmony_ci
18bf215546Sopenharmony_cifunction A6XX_TEX_CONST(pkt, size)
19bf215546Sopenharmony_ci  io.write("\n-------- " .. size .. "\n")
20bf215546Sopenharmony_ci  io.write("-------- w=" .. pkt[1].WIDTH .. ", h=" .. pkt[1].HEIGHT .. "\n")
21bf215546Sopenharmony_ci  io.write("\n");
22bf215546Sopenharmony_ciend
23bf215546Sopenharmony_ci
24bf215546Sopenharmony_cifunction end_cmdstream()
25bf215546Sopenharmony_ci  io.write("END\n")
26bf215546Sopenharmony_ciend
27bf215546Sopenharmony_ci
28bf215546Sopenharmony_cifunction finish()
29bf215546Sopenharmony_ci  io.write("FINISH\n")
30bf215546Sopenharmony_ciend
31bf215546Sopenharmony_ci
32