benilla-re systems structs docs

M2Cache

struct · models · 4152 bytes

Meaning
Holds the model cache: features, shared model buckets, release list, helper thread and shaders
Confidence
verified, proof one
Finding
models/cache#cache-object

Finding: Cache object in models: the cache

The cache is a 0x1038-byte static. Its constructor zeroes the initialized flag, the 1021 bucket heads and the release list, and creates the two thread events; its destructor logs Model2: M2Destroy never called when the flag is still set, then closes the thread and the events.

offsetholds
+0x000initialized flag
+0x004granted feature mask
+0x008scene sort and draw mode, stored by 0x706e00
+0x00c, +0x010release list: head, address of the tail link
+0x0141021 bucket heads of shared models
+0x100c to +0x1028helper thread: handle, running, stop, start event, done event, thread context, job, argument
+0x102c, +0x1030vertex shader array (1800 handles), pixel shader array (32 handles)
+0x1034a 4-byte device object the texture loads read

The derivation is in the doc.

Fields 14

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_initializedHolds 1 once the cache is initializedverified, proof onemodels/cache#cache-object
0x00044uint32_tm_featuresHolds the granted feature maskverified, proof onemodels/cache#cache-object
0x00084uint32_tm_sortModeHolds the scene sort and draw mode flagsverified, proof onemodels/cache#cache-object
0x000c4CM2Shared *m_releaseHeadHolds the first released shared modelverified, proof onemodels/cache#cache-object
0x00104void *m_releaseTailHolds the address of the release list's tail linkverified, proof onemodels/cache#cache-object
0x00144084CM2Shared *[1021]m_bucketsHolds the 1021 chains of cached shared modelsverified, proof onemodels/cache#cache-object
0x100c4void *m_threadHolds the helper thread handleverified, proof onemodels/cache#cache-object
0x10144uint32_tm_stopHolds 1 when the helper thread must stopverified, proof onemodels/cache#cache-object
0x10184void *m_startEventHolds the event that wakes the helper threadverified, proof onemodels/cache#cache-object
0x101c4void *m_doneEventHolds the event the helper thread sets after its jobverified, proof onemodels/cache#cache-object
0x10244void *m_jobHolds the helper thread's job functionverified, proof onemodels/cache#cache-object
0x10284void *m_jobArgHolds the helper thread job's argumentverified, proof onemodels/cache#cache-object
0x102c4void *m_vertexShadersHolds the array of 1800 vertex shader handlesverified, proof onemodels/cache#cache-object
0x10304void *m_pixelShadersHolds the array of 32 pixel shader handlesverified, proof onemodels/cache#cache-object

Globals of this type