| 411 | } |
| 412 | |
| 413 | void GXSetArray(GXAttr attr, void* basePtr, u8 stride) |
| 414 | { |
| 415 | s32 idx; |
| 416 | s32 newAttr; |
| 417 | s32 attrReg; |
| 418 | |
| 419 | newAttr = attr; |
| 420 | if (newAttr == GX_VA_NBT) |
| 421 | { |
| 422 | newAttr = GX_VA_NRM; |
| 423 | } |
| 424 | |
| 425 | attrReg = newAttr - GX_VA_POS; |
| 426 | |
| 427 | GX_CP_LOAD_REG(0xA0 | attrReg, |
| 428 | // Address -> offset? |
| 429 | (u32)basePtr & ~0xC0000000); |
| 430 | |
| 431 | idx = attrReg - 12; |
| 432 | if (idx >= 0 && idx < 4) |
| 433 | { |
| 434 | __GXData->indexBase[idx] = (u32)basePtr & ~0xC0000000; |
| 435 | } |
| 436 | |
| 437 | GX_CP_LOAD_REG(0xB0 | attrReg, stride); |
| 438 | |
| 439 | idx = attrReg - 12; |
| 440 | if (idx >= 0 && idx < 4) |
| 441 | { |
| 442 | __GXData->indexStride[idx] = stride; |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | void GXInvalidateVtxCache(void) |
| 447 | { |