benilla-re systems structs docs

TextureLimitSize

function · gx · primitive

Address
0x448b60 · 111 bytes, up to 0x448bce
Signature
void __fastcall (uint32_t *width, uint32_t *height, uint32_t *dropped)
Meaning
Halves width and height until neither exceeds the device maximum, counting the halvings in dropped
Confidence
verified, proof one
Finding
gx/texturesize#device-size-limit
Test
gx::texture_limit_size_difftest

Finding: Device size limit in gx: texture sizes and formats

0x448b60(&width, &height, &dropped) halves the width and the height together while either exceeds the device limit, adds one to dropped for each halving and keeps each side at 1 or more. The limit is caps + 0x60: the larger of 256 and the device's largest texture side, MaxTextureWidth on Direct3D and GL_MAX_TEXTURE_SIZE on OpenGL. A limit of 0 sets Storm error 0x57 and changes nothing. A size within the limit drops nothing.

The derivation is in the doc.

Callers 3

Callees 2

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