benilla-re systems structs docs

CGxDevice::TextureBytes

function · gx · primitive

Address
0x594ce0 · 171 bytes, up to 0x594d8a
Signature
uint32_t __thiscall (CGxDevice *this, const void *record, uint32_t width, uint32_t height)
Meaning
Sums the block bytes of the kept mip levels of a texture record
Confidence
verified, proof one
Finding
gx/textures#device-texture-record

Finding: Device texture record in gx: textures

0x594a80 (CGxDevice::CreateTexture, reached by through the Direct3D forwarder 0x5a0810) allocates a 0x54-byte record with SMemAlloc (CGxDevice.cpp line 0x86b), constructs it from its nine arguments (0x5915a0, which builds the flags at +0x3c), returns it through the last argument, links it into the device's texture list (head at [dev+0x2838]), adds 1 to the count at [dev+0x84] and adds the record's byte size to [dev+0x88]. 0x594ce0(record, width, height) returns that size: the top kept level (width and height shifted right by the skip count [dev+0x31c]) as blocks of the format's edge ceil(w / e) * ceil(h / e) * bytes, plus each smaller level down to 1 by 1 when the flags' low three bits exceed 1.

The derivation is in the doc.

Callers 5

Callees 0

None by a direct call or jump.

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