MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / GXSetArray

Function GXSetArray

src/dolphin/src/gx/GXAttr.c:413–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413void 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
446void GXInvalidateVtxCache(void)
447{

Callers 1

__GXInitGXFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected