CGxDeviceD3d::IBufLock
function · gx · host
- Address
0x59a4e0· 432 bytes, up to0x59a68f- Signature
void * __thiscall (CGxDeviceD3d *this, CGxBuf *buffer)- Meaning
- Locks a buffer's range of its pool, as a ring for stream pools, or returns scratch memory
- Confidence
- verified, proof one
- Finding
- gx/draw#stream-locks
Finding: Stream locks in gx: drawing
Direct3D locks a buffer of a usage-2 pool, the stream pools, as a ring. The buffer is placed at
the pool's write offset +0x1c rounded up to a multiple of the buffer's stride +0xc. When it
would end past the pool's size +0x10 it is placed at 0, every buffer of the pool is marked
invalid, and the lock takes D3DLOCK_DISCARD | D3DLOCK_NOSYSLOCK (0x2800); otherwise
D3DLOCK_NOOVERWRITE | D3DLOCK_NOSYSLOCK (0x1800). Other pools lock the buffer's own range with
D3DLOCK_NOSYSLOCK. A pool without a Direct3D buffer, or a failed lock, hands out system memory.
The derivation is in the doc.
Callers 2
Callees 6
Calls and jumps by a bare address, from tables/calls.tsv.