23 #define GX_CLIP_DISABLE 1 24 #define GX_CLIP_ENABLE 0 27 #define GX_FIFO_MINSIZE (64*1024) 28 #define GX_FIFO_HIWATERMARK (16*1024) 29 #define GX_FIFO_OBJSIZE 128 31 #define GX_PERSPECTIVE 0 32 #define GX_ORTHOGRAPHIC 1 35 #define GX_MT_XF_FLUSH 1 36 #define GX_MT_DL_SAVE_CTX 2 38 #define GX_XF_FLUSH_NONE 0 39 #define GX_XF_FLUSH_SAFE 1 50 #define GX_COLORZERO 6 51 #define GX_ALPHA_BUMP 7 52 #define GX_ALPHA_BUMPN 8 53 #define GX_COLORNULL 0xff 74 #define GX_MAXVTXFMT 8 113 #define GX_NRM_NBT3 2 115 #define GX_CLR_RGBA 1 123 #define GX_VA_PTNMTXIDX 0 124 #define GX_VA_TEX0MTXIDX 1 125 #define GX_VA_TEX1MTXIDX 2 126 #define GX_VA_TEX2MTXIDX 3 127 #define GX_VA_TEX3MTXIDX 4 128 #define GX_VA_TEX4MTXIDX 5 129 #define GX_VA_TEX5MTXIDX 6 130 #define GX_VA_TEX6MTXIDX 7 131 #define GX_VA_TEX7MTXIDX 8 134 #define GX_VA_CLR0 11 135 #define GX_VA_CLR1 12 136 #define GX_VA_TEX0 13 137 #define GX_VA_TEX1 14 138 #define GX_VA_TEX2 15 139 #define GX_VA_TEX3 16 140 #define GX_VA_TEX4 17 141 #define GX_VA_TEX5 18 142 #define GX_VA_TEX6 19 143 #define GX_VA_TEX7 20 144 #define GX_POSMTXARRAY 21 145 #define GX_NRMMTXARRAY 22 146 #define GX_TEXMTXARRAY 23 147 #define GX_LIGHTARRAY 24 149 #define GX_VA_MAXATTR 26 150 #define GX_VA_NULL 0xff 159 #define GX_POINTS 0xB8 160 #define GX_LINES 0xA8 161 #define GX_LINESTRIP 0xB0 162 #define GX_TRIANGLES 0x90 163 #define GX_TRIANGLESTRIP 0x98 165 #define GX_TRIANGLEFAN 0xA0 168 #define GX_QUADS 0x80 178 #define GX_LIGHT0 0x001 179 #define GX_LIGHT1 0x002 180 #define GX_LIGHT2 0x004 181 #define GX_LIGHT3 0x008 182 #define GX_LIGHT4 0x010 183 #define GX_LIGHT5 0x020 184 #define GX_LIGHT6 0x040 185 #define GX_LIGHT7 0x080 186 #define GX_MAXLIGHT 0x100 187 #define GX_LIGHTNULL 0x000 194 #define GX_DF_SIGNED 1 195 #define GX_DF_CLAMP 2 225 #define GX_TEXMTX0 30 226 #define GX_TEXMTX1 33 227 #define GX_TEXMTX2 36 228 #define GX_TEXMTX3 39 229 #define GX_TEXMTX4 42 230 #define GX_TEXMTX5 45 231 #define GX_TEXMTX6 48 232 #define GX_TEXMTX7 51 233 #define GX_TEXMTX8 54 234 #define GX_TEXMTX9 57 235 #define GX_IDENTITY 60 241 #define GX_DTTMTX0 64 242 #define GX_DTTMTX1 67 243 #define GX_DTTMTX2 70 244 #define GX_DTTMTX3 73 245 #define GX_DTTMTX4 76 246 #define GX_DTTMTX5 79 247 #define GX_DTTMTX6 82 248 #define GX_DTTMTX7 85 249 #define GX_DTTMTX8 88 250 #define GX_DTTMTX9 91 251 #define GX_DTTMTX10 94 252 #define GX_DTTMTX11 97 253 #define GX_DTTMTX12 100 254 #define GX_DTTMTX13 103 255 #define GX_DTTMTX14 106 256 #define GX_DTTMTX15 109 257 #define GX_DTTMTX16 112 258 #define GX_DTTMTX17 115 259 #define GX_DTTMTX18 118 260 #define GX_DTTMTX19 121 261 #define GX_DTTIDENTITY 125 271 #define GX_TEXCOORD0 0x0 272 #define GX_TEXCOORD1 0x1 273 #define GX_TEXCOORD2 0x2 274 #define GX_TEXCOORD3 0x3 275 #define GX_TEXCOORD4 0x4 276 #define GX_TEXCOORD5 0x5 277 #define GX_TEXCOORD6 0x6 278 #define GX_TEXCOORD7 0x7 279 #define GX_MAXCOORD 0x8 280 #define GX_TEXCOORDNULL 0xff 284 #define _GX_TF_ZTF 0x10 285 #define _GX_TF_CTF 0x20 293 #define GX_TF_IA4 0x2 294 #define GX_TF_IA8 0x3 295 #define GX_TF_RGB565 0x4 296 #define GX_TF_RGB5A3 0x5 297 #define GX_TF_RGBA8 0x6 298 #define GX_TF_CI4 0x8 299 #define GX_TF_CI8 0x9 300 #define GX_TF_CI14 0xa 301 #define GX_TF_CMPR 0xE 303 #define GX_TL_IA8 0x00 304 #define GX_TL_RGB565 0x01 305 #define GX_TL_RGB5A3 0x02 307 #define GX_CTF_R4 (0x0|_GX_TF_CTF) 308 #define GX_CTF_RA4 (0x2|_GX_TF_CTF) 309 #define GX_CTF_RA8 (0x3|_GX_TF_CTF) 310 #define GX_CTF_YUVA8 (0x6|_GX_TF_CTF) 311 #define GX_CTF_A8 (0x7|_GX_TF_CTF) 312 #define GX_CTF_R8 (0x8|_GX_TF_CTF) 313 #define GX_CTF_G8 (0x9|_GX_TF_CTF) 314 #define GX_CTF_B8 (0xA|_GX_TF_CTF) 315 #define GX_CTF_RG8 (0xB|_GX_TF_CTF) 316 #define GX_CTF_GB8 (0xC|_GX_TF_CTF) 322 #define GX_TF_Z8 (0x1|_GX_TF_ZTF) 323 #define GX_TF_Z16 (0x3|_GX_TF_ZTF) 324 #define GX_TF_Z24X8 (0x6|_GX_TF_ZTF) 328 #define GX_CTF_Z4 (0x0|_GX_TF_ZTF|_GX_TF_CTF) 329 #define GX_CTF_Z8M (0x9|_GX_TF_ZTF|_GX_TF_CTF) 330 #define GX_CTF_Z8L (0xA|_GX_TF_ZTF|_GX_TF_CTF) 331 #define GX_CTF_Z16L (0xC|_GX_TF_ZTF|_GX_TF_CTF) 333 #define GX_TF_A8 GX_CTF_A8 338 #define GX_TLUT_16 1 // number of 16 entry blocks. 341 #define GX_TLUT_128 8 342 #define GX_TLUT_256 16 343 #define GX_TLUT_512 32 344 #define GX_TLUT_1K 64 345 #define GX_TLUT_2K 128 346 #define GX_TLUT_4K 256 347 #define GX_TLUT_8K 512 348 #define GX_TLUT_16K 1024 354 #define GX_ZT_DISABLE 0 356 #define GX_ZT_REPLACE 2 357 #define GX_MAX_ZTEXOP 3 365 #define GX_TG_MTX3x4 0 366 #define GX_TG_MTX2x4 1 368 #define GX_TG_BUMP0 2 369 #define GX_TG_BUMP1 3 370 #define GX_TG_BUMP2 4 371 #define GX_TG_BUMP3 5 372 #define GX_TG_BUMP4 6 373 #define GX_TG_BUMP5 7 374 #define GX_TG_BUMP6 8 375 #define GX_TG_BUMP7 9 376 #define GX_TG_SRTG 10 385 #define GX_TG_BINRM 2 386 #define GX_TG_TANGENT 3 393 #define GX_TG_TEX6 10 394 #define GX_TG_TEX7 11 395 #define GX_TG_TEXCOORD0 12 396 #define GX_TG_TEXCOORD1 13 397 #define GX_TG_TEXCOORD2 14 398 #define GX_TG_TEXCOORD3 15 399 #define GX_TG_TEXCOORD4 16 400 #define GX_TG_TEXCOORD5 17 401 #define GX_TG_TEXCOORD6 18 402 #define GX_TG_COLOR0 19 403 #define GX_TG_COLOR1 20 423 #define GX_MAXTEXWRAPMODE 3 429 #define GX_BM_BLEND 1 430 #define GX_BM_LOGIC 2 431 #define GX_BM_SUBTRACT 3 432 #define GX_MAX_BLENDMODE 4 441 #define GX_BL_SRCCLR 2 442 #define GX_BL_INVSRCCLR 3 443 #define GX_BL_SRCALPHA 4 444 #define GX_BL_INVSRCALPHA 5 445 #define GX_BL_DSTALPHA 6 446 #define GX_BL_INVDSTALPHA 7 447 #define GX_BL_DSTCLR GX_BL_SRCCLR 448 #define GX_BL_INVDSTCLR GX_BL_INVSRCCLR 455 #define GX_LO_CLEAR 0 457 #define GX_LO_REVAND 2 459 #define GX_LO_INVAND 4 464 #define GX_LO_EQUIV 9 466 #define GX_LO_REVOR 11 467 #define GX_LO_INVCOPY 12 468 #define GX_LO_INVOR 13 469 #define GX_LO_NAND 14 478 #define GX_TO_SIXTEENTH 1 479 #define GX_TO_EIGHTH 2 480 #define GX_TO_FOURTH 3 483 #define GX_MAX_TEXOFFSET 6 496 #define GX_MODULATE 0 509 #define GX_CC_CPREV 0 510 #define GX_CC_APREV 1 519 #define GX_CC_RASC 10 520 #define GX_CC_RASA 11 522 #define GX_CC_HALF 13 523 #define GX_CC_KONST 14 524 #define GX_CC_ZERO 15 533 #define GX_CA_APREV 0 539 #define GX_CA_KONST 6 553 #define GX_TEVSTAGE0 0 554 #define GX_TEVSTAGE1 1 555 #define GX_TEVSTAGE2 2 556 #define GX_TEVSTAGE3 3 557 #define GX_TEVSTAGE4 4 558 #define GX_TEVSTAGE5 5 559 #define GX_TEVSTAGE6 6 560 #define GX_TEVSTAGE7 7 561 #define GX_TEVSTAGE8 8 562 #define GX_TEVSTAGE9 9 563 #define GX_TEVSTAGE10 10 564 #define GX_TEVSTAGE11 11 565 #define GX_TEVSTAGE12 12 566 #define GX_TEVSTAGE13 13 567 #define GX_TEVSTAGE14 14 568 #define GX_TEVSTAGE15 15 569 #define GX_MAX_TEVSTAGE 16 580 #define GX_TEV_COMP_R8_GT 8 581 #define GX_TEV_COMP_R8_EQ 9 582 #define GX_TEV_COMP_GR16_GT 10 583 #define GX_TEV_COMP_GR16_EQ 11 584 #define GX_TEV_COMP_BGR24_GT 12 585 #define GX_TEV_COMP_BGR24_EQ 13 586 #define GX_TEV_COMP_RGB8_GT 14 587 #define GX_TEV_COMP_RGB8_EQ 15 588 #define GX_TEV_COMP_A8_GT GX_TEV_COMP_RGB8_GT // for alpha channel 589 #define GX_TEV_COMP_A8_EQ GX_TEV_COMP_RGB8_EQ // for alpha channel 599 #define GX_TB_ADDHALF 1 600 #define GX_TB_SUBHALF 2 601 #define GX_MAX_TEVBIAS 3 611 #define GX_TC_LINEAR 0 615 #define GX_MAX_TEVCLAMPMODE 4 624 #define GX_CS_SCALE_1 0 625 #define GX_CS_SCALE_2 1 626 #define GX_CS_SCALE_4 2 627 #define GX_CS_DIVIDE_2 3 628 #define GX_MAX_TEVSCALE 4 641 #define GX_MAX_TEVREG 4 649 #define GX_CULL_NONE 0 650 #define GX_CULL_FRONT 1 651 #define GX_CULL_BACK 2 652 #define GX_CULL_ALL 3 673 #define GX_MAX_TEXMAP 8 674 #define GX_TEXMAP_NULL 0xff 675 #define GX_TEXMAP_DISABLE 0x100 684 #define GX_AOP_XNOR 3 685 #define GX_MAX_ALPHAOP 4 695 #define GX_KCOLOR_MAX 4 701 #define GX_TEV_KCSEL_1 0x00 702 #define GX_TEV_KCSEL_7_8 0x01 703 #define GX_TEV_KCSEL_3_4 0x02 704 #define GX_TEV_KCSEL_5_8 0x03 705 #define GX_TEV_KCSEL_1_2 0x04 706 #define GX_TEV_KCSEL_3_8 0x05 707 #define GX_TEV_KCSEL_1_4 0x06 708 #define GX_TEV_KCSEL_1_8 0x07 709 #define GX_TEV_KCSEL_K0 0x0C 710 #define GX_TEV_KCSEL_K1 0x0D 711 #define GX_TEV_KCSEL_K2 0x0E 712 #define GX_TEV_KCSEL_K3 0x0F 713 #define GX_TEV_KCSEL_K0_R 0x10 714 #define GX_TEV_KCSEL_K1_R 0x11 715 #define GX_TEV_KCSEL_K2_R 0x12 716 #define GX_TEV_KCSEL_K3_R 0x13 717 #define GX_TEV_KCSEL_K0_G 0x14 718 #define GX_TEV_KCSEL_K1_G 0x15 719 #define GX_TEV_KCSEL_K2_G 0x16 720 #define GX_TEV_KCSEL_K3_G 0x17 721 #define GX_TEV_KCSEL_K0_B 0x18 722 #define GX_TEV_KCSEL_K1_B 0x19 723 #define GX_TEV_KCSEL_K2_B 0x1A 724 #define GX_TEV_KCSEL_K3_B 0x1B 725 #define GX_TEV_KCSEL_K0_A 0x1C 726 #define GX_TEV_KCSEL_K1_A 0x1D 727 #define GX_TEV_KCSEL_K2_A 0x1E 728 #define GX_TEV_KCSEL_K3_A 0x1F 734 #define GX_TEV_KASEL_1 0x00 735 #define GX_TEV_KASEL_7_8 0x01 736 #define GX_TEV_KASEL_3_4 0x02 737 #define GX_TEV_KASEL_5_8 0x03 738 #define GX_TEV_KASEL_1_2 0x04 739 #define GX_TEV_KASEL_3_8 0x05 740 #define GX_TEV_KASEL_1_4 0x06 741 #define GX_TEV_KASEL_1_8 0x07 742 #define GX_TEV_KASEL_K0_R 0x10 743 #define GX_TEV_KASEL_K1_R 0x11 744 #define GX_TEV_KASEL_K2_R 0x12 745 #define GX_TEV_KASEL_K3_R 0x13 746 #define GX_TEV_KASEL_K0_G 0x14 747 #define GX_TEV_KASEL_K1_G 0x15 748 #define GX_TEV_KASEL_K2_G 0x16 749 #define GX_TEV_KASEL_K3_G 0x17 750 #define GX_TEV_KASEL_K0_B 0x18 751 #define GX_TEV_KASEL_K1_B 0x19 752 #define GX_TEV_KASEL_K2_B 0x1A 753 #define GX_TEV_KASEL_K3_B 0x1B 754 #define GX_TEV_KASEL_K0_A 0x1C 755 #define GX_TEV_KASEL_K1_A 0x1D 756 #define GX_TEV_KASEL_K2_A 0x1E 757 #define GX_TEV_KASEL_K3_A 0x1F 765 #define GX_TEV_SWAP0 0 766 #define GX_TEV_SWAP1 1 767 #define GX_TEV_SWAP2 2 768 #define GX_TEV_SWAP3 3 769 #define GX_MAX_TEVSWAP 4 776 #define GX_CH_GREEN 1 778 #define GX_CH_ALPHA 3 783 #define GX_INDTEXSTAGE0 0 784 #define GX_INDTEXSTAGE1 1 785 #define GX_INDTEXSTAGE2 2 786 #define GX_INDTEXSTAGE3 3 787 #define GX_MAX_INDTEXSTAGE 4 799 #define GX_MAX_ITFORMAT 4 808 #define GX_ITB_NONE 0 816 #define GX_MAX_ITBIAS 8 847 #define GX_MAX_ITWRAP 7 856 #define GX_ITBA_OFF 0 860 #define GX_MAX_ITBALPHA 4 878 #define GX_MAX_ITSCALE 9 884 #define GX_FOG_NONE 0 886 #define GX_FOG_PERSP_LIN 2 887 #define GX_FOG_PERSP_EXP 4 888 #define GX_FOG_PERSP_EXP2 5 889 #define GX_FOG_PERSP_REVEXP 6 890 #define GX_FOG_PERSP_REVEXP2 7 892 #define GX_FOG_ORTHO_LIN 10 893 #define GX_FOG_ORTHO_EXP 12 894 #define GX_FOG_ORTHO_EXP2 13 895 #define GX_FOG_ORTHO_REVEXP 14 896 #define GX_FOG_ORTHO_REVEXP2 15 898 #define GX_FOG_LIN GX_FOG_PERSP_LIN 899 #define GX_FOG_EXP GX_FOG_PERSP_EXP 900 #define GX_FOG_EXP2 GX_FOG_PERSP_EXP2 901 #define GX_FOG_REVEXP GX_FOG_PERSP_REVEXP 902 #define GX_FOG_REVEXP2 GX_FOG_PERSP_REVEXP2 907 #define GX_PF_RGB8_Z24 0 908 #define GX_PF_RGBA6_Z24 1 909 #define GX_PF_RGB565_Z16 2 914 #define GX_PF_YUV420 7 919 #define GX_ZC_LINEAR 0 929 #define GX_CLAMP_NONE 0 930 #define GX_CLAMP_TOP 1 931 #define GX_CLAMP_BOTTOM 2 951 #define GX_COPY_PROGRESSIVE 0 952 #define GX_COPY_INTLC_EVEN 2 953 #define GX_COPY_INTLC_ODD 3 961 #define GX_READ_NONE 2 968 #define GX_TEXCACHE_32K 0 969 #define GX_TEXCACHE_128K 1 970 #define GX_TEXCACHE_512K 2 971 #define GX_TEXCACHE_NONE 3 979 #define GX_DA_GENTLE 1 980 #define GX_DA_MEDIUM 2 981 #define GX_DA_STEEP 3 991 #define GX_SP_SHARP 4 992 #define GX_SP_RING1 5 993 #define GX_SP_RING2 6 1001 #define GX_NEAR_MIP_NEAR 2 1002 #define GX_LIN_MIP_NEAR 3 1003 #define GX_NEAR_MIP_LIN 4 1004 #define GX_LIN_MIP_LIN 5 1010 #define GX_ANISO_1 0 1011 #define GX_ANISO_2 1 1012 #define GX_ANISO_4 2 1013 #define GX_MAX_ANISOTROPY 3 1021 #define GX_VC_CLR0 2 1022 #define GX_VC_CLR1 3 1023 #define GX_VC_TEX0 4 1024 #define GX_VC_TEX1 5 1025 #define GX_VC_TEX2 6 1026 #define GX_VC_TEX3 7 1027 #define GX_VC_TEX4 8 1028 #define GX_VC_TEX5 9 1029 #define GX_VC_TEX6 10 1030 #define GX_VC_TEX7 11 1031 #define GX_VC_ALL 15 1049 #define GX_PERF0_VERTICES 0 1050 #define GX_PERF0_CLIP_VTX 1 1051 #define GX_PERF0_CLIP_CLKS 2 1052 #define GX_PERF0_XF_WAIT_IN 3 1055 #define GX_PERF0_XF_WAIT_OUT 4 1057 #define GX_PERF0_XF_XFRM_CLKS 5 1058 #define GX_PERF0_XF_LIT_CLKS 6 1059 #define GX_PERF0_XF_BOT_CLKS 7 1060 #define GX_PERF0_XF_REGLD_CLKS 8 1061 #define GX_PERF0_XF_REGRD_CLKS 9 1062 #define GX_PERF0_CLIP_RATIO 10 1063 #define GX_PERF0_TRIANGLES 11 1064 #define GX_PERF0_TRIANGLES_CULLED 12 1065 #define GX_PERF0_TRIANGLES_PASSED 13 1066 #define GX_PERF0_TRIANGLES_SCISSORED 14 1067 #define GX_PERF0_TRIANGLES_0TEX 15 1068 #define GX_PERF0_TRIANGLES_1TEX 16 1069 #define GX_PERF0_TRIANGLES_2TEX 17 1070 #define GX_PERF0_TRIANGLES_3TEX 18 1071 #define GX_PERF0_TRIANGLES_4TEX 19 1072 #define GX_PERF0_TRIANGLES_5TEX 20 1073 #define GX_PERF0_TRIANGLES_6TEX 21 1074 #define GX_PERF0_TRIANGLES_7TEX 22 1075 #define GX_PERF0_TRIANGLES_8TEX 23 1076 #define GX_PERF0_TRIANGLES_0CLR 24 1077 #define GX_PERF0_TRIANGLES_1CLR 25 1078 #define GX_PERF0_TRIANGLES_2CLR 26 1079 #define GX_PERF0_QUAD_0CVG 27 1080 #define GX_PERF0_QUAD_NON0CVG 28 1081 #define GX_PERF0_QUAD_1CVG 29 1082 #define GX_PERF0_QUAD_2CVG 30 1083 #define GX_PERF0_QUAD_3CVG 31 1084 #define GX_PERF0_QUAD_4CVG 32 1085 #define GX_PERF0_AVG_QUAD_CNT 33 1086 #define GX_PERF0_CLOCKS 34 1087 #define GX_PERF0_NONE 35 1101 #define GX_PERF1_TEXELS 0 1102 #define GX_PERF1_TX_IDLE 1 1103 #define GX_PERF1_TX_REGS 2 1104 #define GX_PERF1_TX_MEMSTALL 3 1105 #define GX_PERF1_TC_CHECK1_2 4 1106 #define GX_PERF1_TC_CHECK3_4 5 1107 #define GX_PERF1_TC_CHECK5_6 6 1108 #define GX_PERF1_TC_CHECK7_8 7 1109 #define GX_PERF1_TC_MISS 8 1110 #define GX_PERF1_VC_ELEMQ_FULL 9 1111 #define GX_PERF1_VC_MISSQ_FULL 10 1112 #define GX_PERF1_VC_MEMREQ_FULL 11 1113 #define GX_PERF1_VC_STATUS7 12 1114 #define GX_PERF1_VC_MISSREP_FULL 13 1115 #define GX_PERF1_VC_STREAMBUF_LOW 14 1116 #define GX_PERF1_VC_ALL_STALLS 15 1117 #define GX_PERF1_VERTICES 16 1118 #define GX_PERF1_FIFO_REQ 17 1119 #define GX_PERF1_CALL_REQ 18 1120 #define GX_PERF1_VC_MISS_REQ 19 1121 #define GX_PERF1_CP_ALL_REQ 20 1123 #define GX_PERF1_CLOCKS 21 1124 #define GX_PERF1_NONE 22 1144 #define GX_TLUT10 10 1145 #define GX_TLUT11 11 1146 #define GX_TLUT12 12 1147 #define GX_TLUT13 13 1148 #define GX_TLUT14 14 1149 #define GX_TLUT15 15 1150 #define GX_BIGTLUT0 16 1151 #define GX_BIGTLUT1 17 1152 #define GX_BIGTLUT2 18 1153 #define GX_BIGTLUT3 19 1156 #define GX_MAX_VTXDESC GX_VA_MAXATTR 1157 #define GX_MAX_VTXDESC_LISTSIZE (GX_VA_MAXATTR+1) 1159 #define GX_MAX_VTXATTRFMT GX_VA_MAXATTR 1160 #define GX_MAX_VTXATTRFMT_LISTSIZE (GX_VA_MAXATTR+1) 1162 #define GX_MAX_Z24 0x00ffffff 1269 typedef struct _vtx {
2117 static inline void GX_End()
5153 #define GX_InitLightPosv(lo,vec) \ 5154 (GX_InitLightPos((lo), *(f32*)(vec), *((f32*)(vec)+1), *((f32*)(vec)+2))) 5176 #define GX_InitLightDirv(lo,vec) \ 5177 (GX_InitLightDir((lo), *(f32*)(vec), *((f32*)(vec)+1), *((f32*)(vec)+2))) 5203 #define GX_InitSpecularDirv(lo,vec) \ 5204 (GX_InitSpecularDir((lo), *(f32*)(vec), *((f32*)(vec)+1), *((f32*)(vec)+2))) 5227 #define GX_InitSpecularDirHAv(lo,vec0,vec1) \ 5228 (GX_InitSpecularDirHA((lo), \ 5229 *(f32*)(vec0), *((f32*)(vec0)+1), *((f32*)(vec0)+2), \ 5230 *(f32*)(vec1), *((f32*)(vec1)+1), *((f32*)(vec1)+2))) 5247 #define GX_InitLightShininess(lobj, shininess) \ 5248 (GX_InitLightAttn(lobj, 0.0F, 0.0F, 1.0F, \ 5249 (shininess)/2.0F, 0.0F, \ 5250 1.0F-(shininess)/2.0F )) static void GX_Normal3s8(s8 nx, s8 ny, s8 nz)
Definition: gx.h:2220
static void GX_TexCoord1u16(u16 s)
Definition: gx.h:2314
void GX_SetColorUpdate(u8 enable)
Enables or disables color-buffer updates when rendering into the Embedded Frame Buffer (EFB).
Definition: gx.c:4277
void * GX_GetTexObjUserData(GXTexObj *obj)
Used to get a pointer to user data from the GXTexObj structure.
Definition: gx.c:3328
void GX_InitFogAdjTable(GXFogAdjTbl *table, u16 width, f32 projmtx[4][4])
Generates the standard range adjustment table and puts the results into table.
Definition: gx.c:4221
vu32 rd_ptr
Definition: gx_regdef.h:5097
u16 GX_GetDrawSync()
Returns the value of the token register, which is written using the GX_SetDrawSync() function.
Definition: gx.c:1640
void GX_RestoreWriteGatherPipe()
Restores the write-gather pipe.
Definition: gx.c:1533
struct _gx_color GXColor
Structure used to pass colors to some GX functions.
void GX_InitTexObjCI(GXTexObj *obj, void *img_ptr, u16 wd, u16 ht, u8 fmt, u8 wrap_s, u8 wrap_t, u8 mipmap, u32 tlut_name)
Used to initialize or change a texture object when the texture is color index format.
Definition: gx.c:3211
u8 r
Definition: gx.h:1193
void GX_InitTlutObj(GXTlutObj *obj, void *lut, u8 fmt, u16 entries)
Initializes a Texture Look-Up Table (TLUT) object.
Definition: gx.c:3334
volatile float vf32
Definition: gctypes.h:46
const GLvoid * ptr
Definition: nx_glsym.h:242
void GX_InitTexCacheRegion(GXTexRegion *region, u8 is32bmipmap, u32 tmem_even, u8 size_even, u32 tmem_odd, u8 size_odd)
Initializes a texture memory (TMEM) region object for cache.
Definition: gx.c:3059
static void GX_Normal1x8(u8 index)
Definition: gx.h:2227
vu8 U8
Definition: gx.h:1180
void GX_SetZTexture(u8 op, u8 fmt, u32 bias)
Controls Z texture operations.
Definition: gx.c:2753
static void GX_Position3f32(f32 x, f32 y, f32 z)
Definition: gx.h:2131
f32 x
Definition: gx.h:1280
void GX_InitFifoBase(GXFifoObj *fifo, void *base, u32 size)
Describes the area of main memory that will be used for this fifo.
Definition: gx.c:1226
static void GX_Normal3s16(s16 nx, s16 ny, s16 nz)
Definition: gx.h:2213
int32_t s32
32bit signed integer
Definition: gctypes.h:24
static void GX_End()
Used to end the drawing of a graphics primitive. This does nothing in libogc.
Definition: gx.h:2127
GLenum mode
Definition: glext.h:6857
GLuint GLfloat * val
Definition: glext.h:7847
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:54
u32 GX_GetTexObjFmt(GXTexObj *obj)
Returns the texture format described by texture object obj.
Definition: gx.c:2932
void GX_SetTevIndRepeat(u8 tevstage)
Set a given TEV stage to use the same texture coordinates as were computed in the previous stage.
Definition: gx.c:4082
void GX_SetTevColorS10(u8 tev_regid, GXColorS10 color)
Used to set one of the constant color registers in the TEV unit.
Definition: gx.c:3703
void GX_PeekARGB(u16 x, u16 y, GXColor *color)
Allows the CPU to read a color value directly from the Embedded Frame Buffer (EFB) at position x,...
Definition: gx.c:4406
volatile u8 vu8
8bit unsigned volatile integer
Definition: gctypes.h:27
void GX_SetTevIndirect(u8 tevstage, u8 indtexid, u8 format, u8 bias, u8 mtxid, u8 wrap_s, u8 wrap_t, u8 addprev, u8 utclod, u8 a)
Controls how the results from an indirect lookup will be used to modify a given regular TEV stage loo...
Definition: gx.c:4003
void GX_LoadTexObj(GXTexObj *obj, u8 mapid)
Loads the state describing a texture into one of eight hardware register sets.
Definition: gx.c:3346
struct _gx_litobj GXLightObj
Object containing information on a light.
u8 GX_GetFifoWrap(GXFifoObj *fifo)
Returns a non-zero value if the write pointer has passed the TOP of the FIFO.
Definition: gx.c:1473
static void GX_Normal1x16(u16 index)
Definition: gx.h:2232
static void GX_Normal3f32(f32 nx, f32 ny, f32 nz)
Definition: gx.h:2206
static void GX_TexCoord1f32(f32 s)
Definition: gx.h:2309
void GX_InitXfRasMetric()
Initialize the transformation unit (XF) rasterizer unit (RAS) to take performance measurements.
Definition: gx.c:4983
void GX_SetFogRangeAdj(u8 enable, u16 center, GXFogAdjTbl *table)
Enables or disables horizontal fog-range adjustment.
Definition: gx.c:4248
void GX_PokeZ(u16 x, u16 y, u32 z)
Allows the CPU to write a z value directly to the Embedded Frame Buffer (EFB) at position x,...
Definition: gx.c:4419
GXFifoObj * GX_Init(void *base, u32 size)
Initializes the graphics processor to its initial state.
Definition: gx.c:1053
void GX_InvVtxCache()
Invalidates the vertex cache.
Definition: gx.c:2919
void GX_InitTexObjData(GXTexObj *obj, void *img_ptr)
Allows one to modify the image data pointer for an existing texture object.
Definition: gx.c:3246
u32 tmem_odd
Definition: gx_regdef.h:5093
void GX_PokeDither(u8 dither)
Enables dithering when writing the Embedded Frame Buffer (EFB) using GX_Poke*() functions.
Definition: gx.c:4371
u32 GX_SetDispCopyYScale(f32 yscale)
Sets the vertical scale factor for the EFB to XFB copy operation.
Definition: gx.c:1960
float f32
Definition: gctypes.h:43
void GX_SetFogColor(GXColor color)
Sets the fog color.
Definition: gx.c:4272
void GX_SetIndTexCoordScale(u8 indtexid, u8 scale_s, u8 scale_t)
Allows the sharing of a texcoord between an indirect stage and a regular TEV stage.
Definition: gx.c:4087
void GX_InitLightPos(GXLightObj *lit_obj, f32 x, f32 y, f32 z)
Sets the position of the light in the light object.
Definition: gx.c:4472
static void GX_TexCoord1x16(u16 index)
Definition: gx.h:2339
GLdouble GLdouble GLdouble r
Definition: glext.h:6406
vu32 U32
Definition: gx.h:1184
u8 g
Definition: gx.h:1194
Structure describing how a single vertex attribute will be referenced.
Definition: gx.h:1291
f32 Mtx44[4][4]
4x4 matrix.
Definition: gu.h:137
void GX_SetCullMode(u8 mode)
Enables or disables culling of geometry based on its orientation to the viewer.
Definition: gx.c:3842
GLdouble GLdouble t
Definition: glext.h:6398
void GX_InitLightAttnK(GXLightObj *lit_obj, f32 k0, f32 k1, f32 k2)
Sets coefficients used in the lighting distance attenuation calculation in a given light object.
Definition: gx.c:4653
void GX_InitSpecularDir(GXLightObj *lit_obj, f32 nx, f32 ny, f32 nz)
Sets the direction of a specular light in the light object.
Definition: gx.c:4679
u32 lwp_t
typedef for the thread context handle
Definition: lwp.h:62
void GX_InitTexObjLODBias(GXTexObj *obj, f32 lodbias)
Sets the LOD bias for a given texture.
Definition: gx.c:3294
volatile void * GX_RedirectWriteGatherPipe(void *ptr)
Temporarily points the CPU's write-gather pipe at a new location.
Definition: gx.c:1507
void GX_SetVtxAttrFmt(u8 vtxfmt, u32 vtxattr, u32 comptype, u32 compsize, u32 frac)
Sets the attribute format (vtxattr) for a single attribute in the Vertex Attribute Table (VAT).
Definition: gx.c:2598
volatile s8 vs8
8bit signed volatile integer
Definition: gctypes.h:32
void GX_GetCPUFifo(GXFifoObj *fifo)
Copies the information from the currently attached CPU FIFO into fifo.
Definition: gx.c:1334
void GX_SetDispCopyGamma(u8 gamma)
Sets the gamma correction applied to pixels during EFB to XFB copy operation.
Definition: gx.c:1887
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:6296
int8_t s8
8bit signed integer
Definition: gctypes.h:22
void GX_SetPixelFmt(u8 pix_fmt, u8 z_fmt)
Sets the format of pixels in the Embedded Frame Buffer (EFB).
Definition: gx.c:4295
GLsizeiptr size
Definition: glext.h:6559
void GX_SetVCacheMetric(u32 attr)
Sets the metric the Vertex Cache performance counter will measure.
Definition: gx.c:5017
void GX_SetTevKColorS10(u8 sel, GXColorS10 col)
Used to set one of the constant color registers in the Texture Environment (TEV) unit.
Definition: gx.c:3733
void GX_LoadProjectionMtx(Mtx44 mt, u8 type)
Sets the projection matrix.
Definition: gx.c:1774
void GX_InitTexObjMaxAniso(GXTexObj *obj, u8 maxaniso)
Sets the maximum anisotropic filter to use for a texture.
Definition: gx.c:3316
static void GX_Position3u16(u16 x, u16 y, u16 z)
Definition: gx.h:2138
void GX_InitTexObj(GXTexObj *obj, void *img_ptr, u16 wd, u16 ht, u8 fmt, u8 wrap_s, u8 wrap_t, u8 mipmap)
Used to initialize or change a texture object for non-color index textures.
Definition: gx.c:3136
static void GX_Position3s8(s8 x, s8 y, s8 z)
Definition: gx.h:2159
void GX_SetTevOp(u8 tevstage, u8 mode)
Simplified function to set various TEV parameters for this tevstage based on a predefined combiner mo...
Definition: gx.c:3748
void GX_InitLightAttn(GXLightObj *lit_obj, f32 a0, f32 a1, f32 a2, f32 k0, f32 k1, f32 k2)
Sts coefficients used in the lighting attenuation calculation in a given light object.
Definition: gx.c:4632
void GX_InitTexObjFilterMode(GXTexObj *obj, u8 minfilt, u8 magfilt)
Sets the filter mode for a texture.
Definition: gx.c:3265
void GX_InitFifoLimits(GXFifoObj *fifo, u32 hiwatermark, u32 lowatermark)
Sets the high and low water mark for the fifo.
Definition: gx.c:1241
GLboolean enable
Definition: glext.h:12027
u32 GX_GetOverflowCount()
Definition: gx.c:1478
void GX_SetTevSwapMode(u8 tevstage, u8 ras_sel, u8 tex_sel)
Selects a set of swap modes for the rasterized color and texture color for a given TEV stage.
Definition: gx.c:3981
GLdouble s
Definition: glext.h:6390
f32 k1
Definition: gx_regdef.h:5098
static void GX_Position2u16(u16 x, u16 y)
Definition: gx.h:2172
static void GX_Color1u32(u32 clr)
Definition: gx.h:2259
GLdouble GLdouble z
Definition: glext.h:6514
void GX_CopyDisp(void *dest, u8 clear)
Copies the embedded framebuffer (EFB) to the external framebuffer(XFB) in main memory.
Definition: gx.c:1986
void GX_SetMisc(u32 token, u32 value)
Sets miscellanous settings in the GP.
Definition: gx.c:1724
GLint GLint bottom
Definition: glext.h:8393
void GX_InvalidateTexAll()
Invalidates the current caches of the Texture Memory (TMEM).
Definition: gx.c:3518
void GX_CopyTex(void *dest, u8 clear)
Copies the embedded framebuffer (EFB) to the texture image buffer dest in main memory.
Definition: gx.c:2028
Definition: gx_struct.h:58
WGPipe *const wgPipe
Definition: gx.c:74
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
void GX_LoadPosMtxIdx(u16 mtxidx, u32 pnidx)
Loads a 3x4 modelview matrix at index mtxidx from the array in main memory.
Definition: gx.c:2854
vs8 S8
Definition: gx.h:1181
void GX_SetCoPlanar(u8 enable)
Enables or disables coplanar triangle processing.
Definition: gx.c:3850
void GX_InitTexObjMaxLOD(GXTexObj *obj, f32 maxlod)
Sets the maximum LOD for a given texture.
Definition: gx.c:3284
void GX_PokeARGB(u16 x, u16 y, GXColor color)
Allows the CPU to write color directly to the Embedded Frame Buffer (EFB) at position x,...
Definition: gx.c:4397
void GX_PokeBlendMode(u8 type, u8 src_fact, u8 dst_fact, u8 op)
Determines how the source image, is blended with the current Embedded Frame Buffer (EFB).
Definition: gx.c:4376
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:11766
void GX_InitLightDistAttn(GXLightObj *lit_obj, f32 ref_dist, f32 ref_brite, u8 dist_fn)
Sets coefficients for distance attenuation in a light object.
Definition: gx.c:4595
void GX_SetTevOrder(u8 tevstage, u8 texcoord, u32 texmap, u8 color)
Specifies the texture and rasterized color that will be available as inputs to this TEV tevstage.
Definition: gx.c:3901
void GX_PokeAlphaRead(u8 mode)
Determines what value of alpha will be read from the Embedded Frame Buffer (EFB).
Definition: gx.c:4351
u32 tmem_even
Definition: gx_regdef.h:5092
void GX_DrawDone()
Sends a DrawDone command to the GP and stalls until its subsequent execution.
Definition: gx.c:1665
void GX_SetViewportJitter(f32 xOrig, f32 yOrig, f32 wd, f32 ht, f32 nearZ, f32 farZ, u32 field)
Sets the viewport and adjusts the viewport's line offset for interlaced field rendering.
Definition: gx.c:1743
void GX_ReadGPMetric(u32 *cnt0, u32 *cnt1)
Returns the count of the previously set performance metrics.
Definition: gx.c:5031
void GX_InitTexObjBiasClamp(GXTexObj *obj, u8 biasclamp)
Enables bias clamping for texture LOD.
Definition: gx.c:3304
Object describing a graphics FIFO.
Definition: gx.h:1319
static void GX_TexCoord2u8(u8 s, u8 t)
Definition: gx.h:2297
u32 GX_ResetOverflowCount()
Definition: gx.c:1483
void GX_AdjustForOverscan(GXRModeObj *rmin, GXRModeObj *rmout, u16 hor, u16 ver)
Takes a given render mode and returns a version that is reduced in size to account for overscan.
Definition: gx.c:5050
GXBreakPtCallback GX_SetBreakPtCallback(GXBreakPtCallback cb)
Registers cb as a function to be invoked when a break point is encountered.
Definition: gx.c:1703
void GX_SetClipMode(u8 mode)
Enables or disables clipping of geometry.
Definition: gx.c:3865
GXDrawSyncCallback GX_SetDrawSyncCallback(GXDrawSyncCallback cb)
Installs a callback that is invoked whenever a DrawSync token is encountered by the graphics pipeline...
Definition: gx.c:1692
void GX_ReadVCacheMetric(u32 *check, u32 *miss, u32 *stall)
Returns Vertex Cache performance counters.
Definition: gx.c:5010
void GX_SetZMode(u8 enable, u8 func, u8 update_enable)
Sets the Z-buffer compare mode.
Definition: gx.c:2924
GLdouble GLdouble right
Definition: glext.h:11766
const GLubyte * c
Definition: glext.h:9812
static void GX_Position1x8(u8 index)
Definition: gx.h:2196
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
void GX_SetPointSize(u8 width, u8 fmt)
Sets the size of point primitives.
Definition: gx.c:3681
int dummy
Definition: lstrlib.c:1125
volatile s32 vs32
32bit signed volatile integer
Definition: gctypes.h:34
GLuint GLuint num
Definition: glext.h:10525
static void GX_Color1x8(u8 index)
Definition: gx.h:2269
void GX_SetVtxDesc(u8 attr, u8 type)
Sets the type of a single attribute (attr) in the current vertex descriptor.
Definition: gx.c:2345
struct _gx_colors10 GXColorS10
Structure used to pass signed 10-bit colors to some GX functions.
void GX_SetVtxDescv(GXVtxDesc *attr_list)
Sets the type of multiple attributes.
Definition: gx.c:2351
static void GX_Position2u8(u8 x, u8 y)
Definition: gx.h:2184
void GX_SetTevIndBumpXYZ(u8 tevstage, u8 indstage, u8 mtx_sel)
Sets up an environment-mapped bump-mapped indirect lookup.
Definition: gx.c:4077
void GX_InitTexObjTlut(GXTexObj *obj, u32 tlut_name)
Allows one to modify the TLUT that is associated with an existing texture object.
Definition: gx.c:3252
vs32 S32
Definition: gx.h:1185
void GX_ClearVtxDesc()
Clears all vertex attributes of the current vertex descriptor to GX_NONE.
Definition: gx.c:3666
static void GX_TexCoord2u16(u16 s, u16 t)
Definition: gx.h:2285
void GX_LoadLightObj(GXLightObj *lit_obj, u8 lit_id)
Loads a light object into a set of hardware registers associated with a Light ID.
Definition: gx.c:4487
void * GX_GetFifoBase(GXFifoObj *fifo)
Get the base address for a given fifo.
Definition: gx.c:1458
void GX_Begin(u8 primitve, u8 vtxfmt, u16 vtxcnt)
Begins drawing of a graphics primitive.
Definition: gx.c:2618
void GX_GetGPStatus(u8 *overhi, u8 *underlow, u8 *readIdle, u8 *cmdIdle, u8 *brkpt)
Reads the current status of the GP.
Definition: gx.c:5021
u32 GX_EndDispList()
Ends a display list and resumes writing graphics commands to the CPU FIFO.
Definition: gx.c:2134
Fog range adjustment parameter table.
Definition: gx.h:1330
GLfloat ny
Definition: glext.h:9803
void GX_SetTexCopySrc(u16 left, u16 top, u16 wd, u16 ht)
Sets the source parameters for the Embedded Frame Buffer (EFB) to texture image copy.
Definition: gx.c:2073
GLenum type
Definition: glext.h:6233
void GX_SetDstAlpha(u8 enable, u8 a)
Sets a constant alpha value for writing to the Embedded Frame Buffer (EFB).
Definition: gx.c:4321
void GX_SetAlphaUpdate(u8 enable)
Enables or disables alpha-buffer updates of the Embedded Frame Buffer (EFB).
Definition: gx.c:4283
Structure describing the attribute format for one attribute.
Definition: gx.h:1302
u32 GX_GetFifoCount(GXFifoObj *fifo)
Returns number of cache lines in the FIFO.
Definition: gx.c:1468
uint16_t u16
16bit unsigned integer
Definition: gctypes.h:18
void GX_SetIndTexMatrix(u8 indtexmtx, f32 offset_mtx[2][3], s8 scale_exp)
Sets one of the three static indirect matrices and the associated scale factor.
Definition: gx.c:4020
void GX_LoadTexMtxIdx(u16 mtxidx, u32 texidx, u8 type)
Loads a texture matrix at index mtxidx from the array in main memory.
Definition: gx.c:2896
void GX_LoadNrmMtxImm(Mtx mt, u32 pnidx)
Used to load a normal transform matrix into matrix memory at location pnidx from the 4x3 matrix mt.
Definition: gx.c:2860
void GX_GetGPFifo(GXFifoObj *fifo)
Copies the information from the currently attached GP FIFO info fifo.
Definition: gx.c:1436
f32 Mtx[3][4]
Standard 3x4 matrix.
Definition: gu.h:115
void GX_SetDrawDone()
Sends a DrawDone command to the GP.
Definition: gx.c:1645
void GX_SetZCompLoc(u8 before_tex)
Sets whether Z buffering happens before or after texturing.
Definition: gx.c:4289
void GX_ClearVCacheMetric()
Clears the Vertex Cache performance counter.
Definition: gx.c:5005
GXTexRegionCallback GX_SetTexRegionCallback(GXTexRegionCallback cb)
Sets the callback function called by GX_LoadTexObj() to obtain an available texture region.
Definition: gx.c:3622
void GX_SetTexCoordScaleManually(u8 texcoord, u8 enable, u16 ss, u16 ts)
Overrides the automatic texture coordinate scaling (based upon the associated map size) and lets one ...
Definition: gx.c:3579
static void GX_Position3u8(u8 x, u8 y, u8 z)
Definition: gx.h:2152
GLuint coord
Definition: glext.h:10418
void GX_SetScissorBoxOffset(s32 xoffset, s32 yoffset)
Repositions the scissorbox rectangle within the Embedded Frame Buffer (EFB) memory space.
Definition: gx.c:3887
void GX_SetTevAlphaOp(u8 tevstage, u8 tevop, u8 tevbias, u8 tevscale, u8 clamp, u8 tevregid)
Sets the tevop, tevbias, tevscale and clamp-mode operation for the alpha combiner for this tevstage o...
Definition: gx.c:3824
void GX_InitTexPreloadRegion(GXTexRegion *region, u32 tmem_even, u32 size_even, u32 tmem_odd, u32 size_odd)
Initializes a Texture Memory (TMEM) region object for preloading.
Definition: gx.c:3106
void GX_SetNumTexGens(u32 nr)
Sets the number of texture coordinates that are generated and available for use in the Texture Enviro...
Definition: gx.c:2913
GLenum func
Definition: glext.h:6668
void GX_TexModeSync()
Inserts a synchronization command into the graphics FIFO. When the Graphics Processor sees this comma...
Definition: gx.c:1719
void GX_ReadBoundingBox(u16 *top, u16 *bottom, u16 *left, u16 *right)
Returns the bounding box of pixel coordinates that are drawn in the Embedded Framebuffer (EFB).
Definition: gx.c:5091
static void GX_Position2s8(s8 x, s8 y)
Definition: gx.h:2190
void GX_SetChanMatColor(s32 channel, GXColor color)
Sets the material color register for color channel chan.
Definition: gx.c:2223
void GX_PixModeSync()
Causes the GPU to wait for the pipe to flush.
Definition: gx.c:1714
void GX_ReadXfRasMetric(u32 *xfwaitin, u32 *xfwaitout, u32 *rasbusy, u32 *clks)
Read performance metric values from the XF and RAS units.
Definition: gx.c:4989
void GX_SetChanAmbColor(s32 channel, GXColor color)
Sets the ambient color register for color channel chan.
Definition: gx.c:2187
void GX_SetCurrentMtx(u32 mtx)
Selects a specific matrix to use for transformations.
Definition: gx.c:2907
void GX_EnableBreakPt(void *break_pt)
Sets a breakpoint that causes the GP to halt when encountered.
Definition: gx.c:1581
void GX_LoadPosMtxImm(Mtx mt, u32 pnidx)
Used to load a 3x4 modelview matrix mt into matrix memory at location pnidx.
Definition: gx.c:2848
void GX_SetAlphaCompare(u8 comp0, u8 ref0, u8 aop, u8 comp1, u8 ref1)
Sets the parameters for the alpha compare function which uses the alpha output from the last active T...
Definition: gx.c:3952
void GX_GetVtxDescv(GXVtxDesc *attr_list)
Gets the type of multiple attributes.
Definition: gx.c:2365
f32 a0
Definition: gx_regdef.h:5094
GLfloat bias
Definition: glext.h:8812
void GX_SetChanCtrl(s32 channel, u8 enable, u8 ambsrc, u8 matsrc, u8 litmask, u8 diff_fn, u8 attn_fn)
Sets the lighting controls for a particular color channel.
Definition: gx.c:2169
u32 GX_ReadClksPerVtx()
Definition: gx.c:4997
void GX_SetTevKColorSel(u8 tevstage, u8 sel)
Selects a "konstant" color input to be used in a given TEV stage.
Definition: gx.c:3959
f32 k2
Definition: gx_regdef.h:5099
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
void GX_SetDispCopyDst(u16 wd, u16 ht)
Sets the witdth and height of the display buffer in pixels.
Definition: gx.c:1972
u8 GX_GetTexObjWrapS(GXTexObj *obj)
Returns the texture wrap s mode described by texture object obj.
Definition: gx.c:2946
u16 size_even
Definition: gx_regdef.h:5094
vf32 F32
Definition: gx.h:1186
static void GX_Position2f32(f32 x, f32 y)
Definition: gx.h:2166
u16 GX_GetTexObjHeight(GXTexObj *obj)
Returns the texture height described by texture object obj.
Definition: gx.c:2956
void GX_SetTexCopyDst(u16 wd, u16 ht, u32 fmt, u8 mipmap)
This function sets the width and height of the destination texture buffer in texels.
Definition: gx.c:2081
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
void GX_LoadTexObjPreloaded(GXTexObj *obj, GXTexRegion *region, u8 mapid)
Loads the state describing a preloaded texture into one of eight hardware register sets.
Definition: gx.c:3356
void GX_InitTexObjLOD(GXTexObj *obj, u8 minfilt, u8 magfilt, f32 minlod, f32 maxlod, f32 lodbias, u8 biasclamp, u8 edgelod, u8 maxaniso)
Sets texture Level Of Detail (LOD) controls explicitly for a texture object.
Definition: gx.c:3220
void GX_ClearBoundingBox()
Clears the bounding box values before a new image is drawn.
Definition: gx.c:2102
GLenum clamp
Definition: glext.h:6856
void GX_SetTevColor(u8 tev_regid, GXColor color)
Used to set one of the primary color registers in the TEV unit.
Definition: gx.c:3688
static void GX_Color3f32(f32 r, f32 g, f32 b)
Definition: gx.h:2252
static void check(LexState *ls, int c)
Definition: lparser.c:106
f32 a2
Definition: gx_regdef.h:5096
u8 b
Definition: gx.h:1195
void GX_InitTexObjEdgeLOD(GXTexObj *obj, u8 edgelod)
Changes LOD computing mode.
Definition: gx.c:3310
static void GX_MatrixIndex1x8(u8 index)
Definition: gx.h:2344
static void GX_Position3s16(s16 x, s16 y, s16 z)
Definition: gx.h:2145
void GX_DisableBreakPt()
Allows reads from the FIFO currently attached to the Graphics Processor (GP) to resume.
Definition: gx.c:1595
void GX_PokeAlphaMode(u8 func, u8 threshold)
Sets a threshold which is compared to the alpha of pixels written to the Embedded Frame Buffer (EFB) ...
Definition: gx.c:4346
GXTexRegion *(* GXTexRegionCallback)(GXTexObj *obj, u8 mapid)
function pointer typedef for the texture region callback
Definition: gx.h:1354
GXTlutRegionCallback GX_SetTlutRegionCallback(GXTlutRegionCallback cb)
Sets the callback function called by GX_LoadTlut() to find the region into which to load the TLUT.
Definition: gx.c:3635
u32 rgba
Definition: gx.h:1282
GLint GLint xoffset
Definition: glext.h:6294
void GX_EnableTexOffsets(u8 coord, u8 line_enable, u8 point_enable)
Enables a special texture offset feature for points and lines.
Definition: gx.c:3857
void GX_SetDispCopySrc(u16 left, u16 top, u16 wd, u16 ht)
Sets the source parameters for the EFB to XFB copy operation.
Definition: gx.c:1978
u16 s
Definition: gx.h:1281
void GX_LoadNrmMtxIdx3x3(u16 mtxidx, u32 pnidx)
Loads a 3x3 normal matrix into matrix memory at location pnidx from a 3x3 matrix located at index mtx...
Definition: gx.c:2872
void GX_Flush()
Flushes all commands to the GP.
Definition: gx.c:1564
void * GX_GetTexObjData(GXTexObj *obj)
Used to get a pointer to texture data from the GXTexObj structure.
Definition: gx.c:2941
void GX_CallDispList(void *list, u32 nbytes)
Causes the GP to execute graphics commands from the display list instead of from the GP FIFO.
Definition: gx.c:2156
void GX_SetTevKAlphaSel(u8 tevstage, u8 sel)
Selects a "konstant" alpha input to be used in a given TEV stage.
Definition: gx.c:3970
u8 a
Definition: gx.h:1196
void GX_PeekZ(u16 x, u16 y, u32 *z)
Allows the CPU to read a z value directly from the Embedded Frame Buffer (EFB) at position x,...
Definition: gx.c:4429
int16_t s16
16bit signed integer
Definition: gctypes.h:23
void GX_SetCPUFifo(GXFifoObj *fifo)
Attaches a FIFO to the CPU.
Definition: gx.c:1274
GLuint index
Definition: glext.h:6671
vs16 S16
Definition: gx.h:1183
void GX_SetLineWidth(u8 width, u8 fmt)
Sets the width of line primitives.
Definition: gx.c:3674
f32 a1
Definition: gx_regdef.h:5095
void GX_SetArray(u32 attr, void *ptr, u8 stride)
Sets the array base pointer and stride for a single attribute.
Definition: gx.c:2259
void GX_AbortFrame()
Aborts the current frame.
void GX_LoadTlut(GXTlutObj *obj, u32 tlut_name)
Copies a Texture Look-Up Table (TLUT) from main memory to Texture Memory (TMEM).
Definition: gx.c:3561
u8 GX_GetTexObjWrapT(GXTexObj *obj)
Returns the texture wrap t mode described by texture object obj.
Definition: gx.c:2951
void GX_GetFifoPtrs(GXFifoObj *fifo, void **rd_ptr, void **wt_ptr)
Returns the current value of the Graphics FIFO read and write pointers.
Definition: gx.c:1267
void GX_SetDrawSync(u16 token)
This function sends a token into the command stream.
Definition: gx.c:1630
u16 t
Definition: gx.h:1281
void GX_SetTexCoordBias(u8 texcoord, u8 s_enable, u8 t_enable)
Sets the texture coordinate bias of a particular texture.
Definition: gx.c:3608
void GX_SetTevColorOp(u8 tevstage, u8 tevop, u8 tevbias, u8 tevscale, u8 clamp, u8 tevregid)
Sets the tevop, tevbias, tevscale and clamp-mode operation for the color combiner for this tevstage o...
Definition: gx.c:3806
void GX_LoadLightObjIdx(u32 litobjidx, u8 litid)
Instructs the GP to fetch the light object at ltobjindx from an array.
Definition: gx.c:4543
lwp_t GX_SetCurrentGXThread()
Sets the current GX thread to the calling thread.
Definition: gx.c:1495
static void GX_TexCoord2f32(f32 s, f32 t)
Definition: gx.h:2279
#define GX_FIFO_OBJSIZE
Definition: gx.h:29
vu32 wt_ptr
Definition: gx_regdef.h:5098
void GX_InitLightSpot(GXLightObj *lit_obj, f32 cut_off, u8 spotfn)
Sets coefficients for angular (spotlight) attenuation in light object.
Definition: gx.c:4708
u32 col
Definition: gx_regdef.h:5093
void GX_InitTlutRegion(GXTlutRegion *region, u32 tmem_addr, u8 tlut_sz)
Initializes a Texture Look-Up Table (TLUT) region object.
Definition: gx.c:3124
void GX_BeginDispList(void *list, u32 size)
Begins a display list and disables writes to the FIFO currently attached to the CPU.
Definition: gx.c:2108
void GX_SetNumIndStages(u8 nstages)
Used to set how many indirect lookups will take place.
Definition: gx.c:4014
GLboolean GLboolean g
Definition: glext.h:6844
void GX_SetTevIndTile(u8 tevstage, u8 indtexid, u16 tilesize_x, u16 tilesize_y, u16 tilespacing_x, u16 tilespacing_y, u8 indtexfmt, u8 indtexmtx, u8 bias_sel, u8 alpha_sel)
Used to implement tiled texturing using indirect textures.
Definition: gx.c:4113
GLuint color
Definition: glext.h:6883
struct _gx_tlutreg GXTlutRegion
Object containing information on a TLUT cache region.
void GX_InitTexObjMinLOD(GXTexObj *obj, f32 minlod)
Sets the minimum LOD for a given texture.
Definition: gx.c:3274
void GX_SetTevColorIn(u8 tevstage, u8 a, u8 b, u8 c, u8 d)
Sets the color input sources for one tevstage of the Texture Environment (TEV) color combiner.
Definition: gx.c:3784
void GX_SetIndTexOrder(u8 indtexstage, u8 texcoord, u8 texmap)
Used to specify the texcoord and texmap to used with a given indirect lookup.
Definition: gx.c:4448
void GX_InitSpecularDirHA(GXLightObj *lit_obj, f32 nx, f32 ny, f32 nz, f32 hx, f32 hy, f32 hz)
Sets the direction and half-angle vector of a specular light in the light object.
Definition: gx.c:4662
void GX_PokeDstAlpha(u8 enable, u8 a)
Sets a constant alpha value for writing to the Embedded Frame Buffer (EFB).
Definition: gx.c:4356
void GX_SetTevDirect(u8 tevstage)
Used to turn off all indirect texture processing for the specified regular TEV stage.
Definition: gx.c:4009
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
void GX_SetDispCopyFrame2Field(u8 mode)
Determines which lines are read from the Embedded Frame Buffer (EFB) when using GX_CopyDisp().
Definition: gx.c:1955
void GX_SetFog(u8 type, f32 startz, f32 endz, f32 nearz, f32 farz, GXColor col)
Enables fog.
Definition: gx.c:4149
void GX_SetDither(u8 dither)
Enables or disables dithering.
Definition: gx.c:4315
void GX_SetViewport(f32 xOrig, f32 yOrig, f32 wd, f32 ht, f32 nearZ, f32 farZ)
Sets the viewport rectangle in screen coordinates.
Definition: gx.c:1769
GLint GLint GLsizei width
Definition: glext.h:6293
f32 y
Definition: gx.h:1280
u32 GX_GetTexBufferSize(u16 wd, u16 ht, u32 fmt, u8 mipmap, u8 maxlod)
Returns the amount of memory in bytes needed to store a texture of the given size and fmt.
Definition: gx.c:2979
GLfloat GLfloat GLfloat GLfloat nx
Definition: glext.h:9805
void GX_SetTevKColor(u8 sel, GXColor col)
Sets one of the "konstant" color registers in the TEV unit.
Definition: gx.c:3718
void GX_InitFifoPtrs(GXFifoObj *fifo, void *rd_ptr, void *wt_ptr)
Sets the fifo read and write pointers.
Definition: gx.c:1249
struct _gx_texobj GXTexObj
Object containing information about a texture.
void GX_InitTexObjWrapMode(GXTexObj *obj, u8 wrap_s, u8 wrap_t)
Allows one to modify the texture coordinate wrap modes for an existing texture object.
Definition: gx.c:3257
static void GX_Color4u8(u8 r, u8 g, u8 b, u8 a)
Definition: gx.h:2237
void(* GXBreakPtCallback)(void)
function pointer typedef for the GP breakpoint-token callback
Definition: gx.h:1337
void GX_SetVtxAttrFmtv(u8 vtxfmt, GXVtxAttrFmt *attr_list)
Sets multiple attribute formats within a single vertex format.
Definition: gx.c:2605
f32 z
Definition: gx.h:1280
volatile u32 vu32
32bit unsigned volatile integer
Definition: gctypes.h:29
void(* GXDrawDoneCallback)(void)
function pointer typedef for the GP drawdone-token callback
Definition: gx.h:1342
void GX_PreloadEntireTexture(GXTexObj *obj, GXTexRegion *region)
Loads a given texture from DRAM into the texture memory.
Definition: gx.c:3394
void GX_PokeAlphaUpdate(u8 update_enable)
Enables or disables alpha-buffer updates for GX_Poke*() functions.
Definition: gx.c:4361
void GX_SetGPFifo(GXFifoObj *fifo)
Attaches fifo to the GP.
Definition: gx.c:1357
static void GX_TexCoord1s8(s8 s)
Definition: gx.h:2329
f32 k0
Definition: gx_regdef.h:5097
static void GX_Color1u16(u16 clr)
Definition: gx.h:2264
GLsizei const GLfloat * value
Definition: glext.h:6709
u32 GX_GetFifoSize(GXFifoObj *fifo)
Get the size of a given fifo.
Definition: gx.c:1463
void GX_SetCopyFilter(u8 aa, u8 sample_pattern[12][2], u8 vf, u8 vfilter[7])
Sets the subpixel sample patterns and vertical filter coefficients used to filter subpixels into pixe...
Definition: gx.c:1892
u16 size_odd
Definition: gx_regdef.h:5095
void GX_SetScissor(u32 xOrigin, u32 yOrigin, u32 wd, u32 ht)
Sets the scissor rectangle.
Definition: gx.c:3870
struct _gx_tlutobj GXTlutObj
Object containing information on a TLUT.
void GX_LoadTexMtxImm(Mtx mt, u32 texidx, u8 type)
Loads a texture matrix mt into the matrix memory at location texidx.
Definition: gx.c:2878
GLsizei stride
Definition: glext.h:6488
static void GX_Position2s16(s16 x, s16 y)
Definition: gx.h:2178
GLfloat GLfloat nz
Definition: glext.h:9803
void GX_InitLightColor(GXLightObj *lit_obj, GXColor col)
Sets the color of the light in the light object.
Definition: gx.c:4481
static void GX_TexCoord2s16(s16 s, s16 t)
Definition: gx.h:2291
void GX_SetFieldMask(u8 even_mask, u8 odd_mask)
selectively enables and disables interlacing of the frame buffer image.
Definition: gx.c:4328
vu16 U16
Definition: gx.h:1182
static void field(LexState *ls, struct ConsControl *cc)
Definition: lparser.c:702
static void GX_Color1x16(u16 index)
Definition: gx.h:2274
volatile s16 vs16
16bit signed volatile integer
Definition: gctypes.h:33
void GX_WaitDrawDone()
Stalls until DrawDone is encountered by the GP.
Definition: gx.c:1656
void GX_SetFieldMode(u8 field_mode, u8 half_aspect_ratio)
Controls various rasterization and texturing parameters that relate to field-mode and double-strike r...
Definition: gx.c:4336
static void GX_Color3u8(u8 r, u8 g, u8 b)
Definition: gx.h:2245
GLint left
Definition: glext.h:8393
void GX_ClearGPMetric()
Clears the two virtual GP performance counters to zero.
Definition: gx.c:4978
static void GX_TexCoord1u8(u8 s)
Definition: gx.h:2324
void GX_SetTevAlphaIn(u8 tevstage, u8 a, u8 b, u8 c, u8 d)
Sets the alpha input sources for one tevstage of the Texture Environment (TEV) alpha combiner.
Definition: gx.c:3795
void GX_SetCopyClear(GXColor color, u32 zvalue)
Sets color and Z value to clear the EFB to during copy operations.
Definition: gx.c:1867
void GX_SetTexCoordGen2(u16 texcoord, u32 tgen_typ, u32 tgen_src, u32 mtxsrc, u32 normalize, u32 postmtx)
An extension of GX_SetTexCoordGen(). It allows one to specify additional texgen options.
Definition: gx.c:2634
void(* GXDrawSyncCallback)(u16 token)
function pointer typedef for the drawsync-token callback
Definition: gx.h:1348
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
void GX_PokeZMode(u8 comp_enable, u8 func, u8 update_enable)
Sets the Z-buffer compare mode when writing the Embedded Frame Buffer (EFB).
Definition: gx.c:4439
void GX_InitLightDir(GXLightObj *lit_obj, f32 nx, f32 ny, f32 nz)
Sets the direction of a light in the light object.
Definition: gx.c:4586
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
void GX_GetTexObjAll(GXTexObj *obj, void **image_ptr, u16 *width, u16 *height, u8 *format, u8 *wrap_s, u8 *wrap_t, u8 *mipmap)
Returns the parameters described by a texture object. Texture objects are used to describe all the pa...
Definition: gx.c:2967
lwp_t GX_GetCurrentGXThread()
Returns the current GX thread.
Definition: gx.c:1490
void GX_SetTevSwapModeTable(u8 swapid, u8 r, u8 g, u8 b, u8 a)
Sets up the TEV color swap table.
Definition: gx.c:3989
void GX_SetGPMetric(u32 perf0, u32 perf1)
Sets two performance metrics to measure in the GP.
Definition: gx.c:4765
void GX_SetTevIndBumpST(u8 tevstage, u8 indstage, u8 mtx_sel)
Sets up an environment-mapped bump-mapped indirect lookup.
Definition: gx.c:4049
u16 GX_GetTexObjWidth(GXTexObj *obj)
Returns the texture width described by texture object obj.
Definition: gx.c:2961
u32 GX_GetTexObjMipMap(GXTexObj *obj)
Returns the texture mipmap enable described by texture object obj.
Definition: gx.c:2937
GLint GLint GLint yoffset
Definition: glext.h:6294
void GX_SetBlendMode(u8 type, u8 src_fact, u8 dst_fact, u8 op)
Determines how the source image, generated by the graphics processor, is blended with the Embedded Fr...
Definition: gx.c:3648
void GX_InitTexObjUserData(GXTexObj *obj, void *userdata)
Used to set a pointer to user data in the GXTexObj structure.
Definition: gx.c:3322
static void GX_Position1x16(u16 index)
Definition: gx.h:2201
void GX_PokeColorUpdate(u8 update_enable)
Enables or disables color-buffer updates when writing the Embedded Frame Buffer (EFB) using the GX_Po...
Definition: gx.c:4366
static void GX_TexCoord2s8(s8 s, s8 t)
Definition: gx.h:2303
f32 GX_GetYScaleFactor(u16 efbHeight, u16 xfbHeight)
Calculates an appropriate Y scale factor value for GX_SetDispCopyYScale() based on the height of the ...
Definition: gx.c:5067
GXTlutRegion *(* GXTlutRegionCallback)(u32 tlut_name)
function pointer typedef for the TLUT region callback
Definition: gx.h:1360
void GX_SetNumTevStages(u8 num)
Enables a consecutive number of TEV stages.
Definition: gx.c:3946
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
volatile u16 vu16
16bit unsigned volatile integer
Definition: gctypes.h:28
static void GX_TexCoord1s16(s16 s)
Definition: gx.h:2319
void GX_InvalidateTexRegion(GXTexRegion *region)
Invalidates the texture cache in Texture Memory (TMEM) described by region.
Definition: gx.c:3526
void GX_SetNumChans(u8 num)
Sets the number of color channels that are output to the TEV stages.
Definition: gx.c:3895
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
void GX_SetTexCoordGen(u16 texcoord, u32 tgen_typ, u32 tgen_src, u32 mtxsrc)
Specifies how texture coordinates are generated.
Definition: gx.c:2629
GLsizei GLsizei GLuint * obj
Definition: glext.h:6682
void GX_SetCopyClamp(u8 clamp)
Sets the vertical clamping mode to use during the EFB to XFB or texture copy.
Definition: gx.c:1881
struct _gx_texreg GXTexRegion
Object containing information on a texture cache region.
GXDrawDoneCallback GX_SetDrawDoneCallback(GXDrawDoneCallback cb)
Installs a callback that is invoked whenever a DrawDone command is encountered by the GP.
Definition: gx.c:1681
static void GX_TexCoord1x8(u8 index)
Definition: gx.h:2334
void GX_InitLightAttnA(GXLightObj *lit_obj, f32 a0, f32 a1, f32 a2)
Sets coefficients used in the lighting angle attenuation calculation in a given light object.
Definition: gx.c:4644