AllocateTarget
function · ffxeffects · primitive
- Address
0x6cdcb0· 371 bytes, up to0x6cde22- Meaning
- Allocates a target texture of a wanted size, rounded and clamped, and stores its descriptor
- Confidence
- verified, proof one
- Finding
- ffxeffects/targets#render-target-allocation
Finding: Render target allocation in ffxeffects: render targets and the quad
0x6cdcb0 (ecx a descriptor, edx the wanted {w, h}, a flag on the stack) makes a target
texture. In mode 0 each dimension is rounded up to a power of 2; each is then clamped to
caps[0x60 + 4·mode] and to at least 8. When the allocated size differs from the descriptor's +4
and +8 it frees any old texture, creates a new one and clears it. It stores the wanted size at
+0xc and +0x10, the allocated at +4 and +8, and 1/allocW, 1/allocH as floats at +0x14
and +0x18; +0 is the handle, and the descriptor is 7 dwords (0x1c bytes).
The derivation is in the doc.
Callers 1
- ComputeTargetSizes ffxeffects
Callees 9
- 0x589d30 gx
- GxDeviceCaps gx
- SetClearColorDevice gx
- 0x58a940 gx
- ClearDevice gx
- CGxTexFlags::CGxTexFlags gx
- GxTexCreate gx
- GxTexDestroy gx
- GetTargetMode ffxeffects
Calls and jumps by a bare address, from tables/calls.tsv.