benilla-re systems structs docs

GxPrimitiveCount

function · gx · primitive

Address
0x592c10 · 38 bytes, up to 0x592c35
Signature
uint32_t __thiscall (void *this, uint32_t topology, uint32_t n)
Meaning
Returns the primitive count of n vertices or indices for a topology: n / div - sub
Confidence
verified, proof one
Finding
gx/draw#draw-call

Finding: Draw call in gx: drawing

0x58a810(descs, count, indexed) loads the device and calls slot +0x78 with the same arguments; 0x58a830(descs, indexed) draws one record. Slot +0x78 is CGxDeviceOpenGl::PrimRender (0x59fc90) or CGxDeviceD3d::PrimRender (0x5a0f50). Each record is 16 bytes: +0 topology (0 points, 1 lines, 2 line strip, 3 triangles, 4 triangle strip, 5 triangle fan), +4 first vertex or start index, +8 u16 count, +0xa u16 minimum index, +0xc u16 maximum index, +0xe unused. Both refuse to draw and log invalid buf! unless every stream the attribute mask names, and for an indexed draw the index buffer at [dev+0x27ec], is a created and valid buffer (bytes +0x1c and +0x1d non-zero).

The derivation is in the doc.

Callers 3

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.