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