GxTexCreate
function · gx · host
- Address
0x58ab10· 289 bytes, up to0x58ac30- Signature
void * __fastcall (uint32_t type, uint32_t w, uint32_t h, uint32_t arg4, uint32_t format, uint32_t dataFormat, uint32_t flags, void *owner, void *callback, void **out)- Meaning
- Checks a texture request against the device caps and creates it through slot +0xb4, or fails with error 0x57
- Confidence
- verified, proof one
- Finding
- gx/texturesize#texture-create-checks
- Test
gx::texture_create_gate_difftest
Finding: Texture create checks in gx: texture sizes and formats
GxTexCreate(type, w, h, arg4, format, dataFormat, flags, owner, callback, &out) (0x58ab10) sets out to 0 and either calls the device's slot +0xb4 or sets Storm error 0x57 and returns 0. For type 0 it refuses when the device does not report the type (caps + 0x50 is not 1), a side is below 8 or above caps + 0x60, a side is not a power of two, format or dataFormat is above 9 (signed), bit 6 of the flags is set while caps + 0x28 is 0 or format is 5 to 7, the filter mode is 5 while caps + 0xa8 is 0, or the callback is null.
The derivation is in the doc.
Callers 5
- GxTexCreateFromDesc gx
- CWorld::Initialize terrain
- AcquireLayerTexture terrain
- AcquireChunkTexture terrain
- AllocateTarget ffxeffects
Callees 2
- GxDeviceCaps gx
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.