benilla-re systems structs docs

s_d3dReadbackFormatCases

global · gx

Address
0x59a118 · 20 bytes, up to 0x59a12b
Type
void *[5]
Meaning
Holds the case addresses of the back buffer format switch in 0x599e90 for formats 0x15 to 0x19
Confidence
verified, proof one
Finding
gx/capture#device-readback

Finding: Device readback in gx: screen capture

0x592130 (slot +0x40, both backends) sets [dev+0x2864] to 1. The present of either backend latches it, and CGxDevice::DoCapture (0x592140) takes the device rectangle (0x5922e0), sets width and height to the truncated +0xc and +8 floats at [dev+0x2868] and [dev+0x286c], and calls slot +0x48 with the rectangle {0, 0, h, w} and the buffer record at +0x2870. The record holds 32-bit BGRA, w * h * 4 bytes, top row first. 0x5921a0 (slot +0x44) returns width, height and the buffer; 0x5921e0 frees it. Direct3D reads back before Present (0x5a19f8); OpenGL after the swap (0x59ba55).

The derivation is in the doc.