benilla-re systems structs docs

s_d3dBufLockScope

global · gx

Address
0x809ff0 · 12 bytes, up to 0x809ffb
Type
const int32_t[3]
Meaning
Holds the Direct3D buffer lock's exception scope: -1, the filter 0x59a5f6 and the handler 0x59a5fc
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.