benilla-re systems structs docs

s_glQueryTargets

global · gx

Address
0x809ac4 · 4 bytes, up to 0x809ac7
Type
uint32_t[1]
Meaning
Holds the OpenGL query target by query type: GL_SAMPLES_PASSED_ARB (0x8914) for type 0
Confidence
verified, proof one
Finding
gx/slots#query-slots

Finding: Query slots in gx: the device's virtual slots

The queries are occlusion queries; the sun glare (0x7e5238) counts its samples with them. OpenGL's result for query type 0 is the passed sample count divided by the format's sample count +0x220; Direct3D's is the count itself.

slotnamebaseOpenGlDirect3Ddoes
+0xc4CreateQuery0x594fd00x58f0600x59ade0allocates a 16-byte query of a type, links it at +0x2858 and makes the API query
+0xc8DestroyQuery0x5950700x58f0900x59ae10deletes the API query, unlinks and frees the record
+0xccBeginQuerypure0x58f0b00x59ae30starts counting
+0xd0EndQuerypure0x58f1000x59ae80stops counting
+0xd4GetQueryParampure0x58f1500x59aec0returns the result size in bytes (0) or whether it is ready (1)
+0xd8GetQueryResultpure0x58f2000x59af30returns the result

The derivation is in the doc.