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.
| offset | holds |
|---|---|
+0x000 | initialized flag |
+0x004 | granted feature mask |
+0x008 | scene sort and draw mode, stored by 0x706e00 |
+0x00c, +0x010 | release list: head, address of the tail link |
+0x014 | 1021 bucket heads of shared models |
+0x100c to +0x1028 | helper thread: handle, running, stop, start event, done event, thread context, job, argument |
+0x102c, +0x1030 | vertex shader array (1800 handles), pixel shader array (32 handles) |
+0x1034 | a 4-byte device object the texture loads read |
The derivation is in the doc.
Fields 14
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | uint32_t | m_initialized | Holds 1 once the cache is initialized | verified, proof one | models/cache#cache-object |
0x0004 | 4 | uint32_t | m_features | Holds the granted feature mask | verified, proof one | models/cache#cache-object |
0x0008 | 4 | uint32_t | m_sortMode | Holds the scene sort and draw mode flags | verified, proof one | models/cache#cache-object |
0x000c | 4 | CM2Shared * | m_releaseHead | Holds the first released shared model | verified, proof one | models/cache#cache-object |
0x0010 | 4 | void * | m_releaseTail | Holds the address of the release list's tail link | verified, proof one | models/cache#cache-object |
0x0014 | 4084 | CM2Shared *[1021] | m_buckets | Holds the 1021 chains of cached shared models | verified, proof one | models/cache#cache-object |
0x100c | 4 | void * | m_thread | Holds the helper thread handle | verified, proof one | models/cache#cache-object |
0x1014 | 4 | uint32_t | m_stop | Holds 1 when the helper thread must stop | verified, proof one | models/cache#cache-object |
0x1018 | 4 | void * | m_startEvent | Holds the event that wakes the helper thread | verified, proof one | models/cache#cache-object |
0x101c | 4 | void * | m_doneEvent | Holds the event the helper thread sets after its job | verified, proof one | models/cache#cache-object |
0x1024 | 4 | void * | m_job | Holds the helper thread's job function | verified, proof one | models/cache#cache-object |
0x1028 | 4 | void * | m_jobArg | Holds the helper thread job's argument | verified, proof one | models/cache#cache-object |
0x102c | 4 | void * | m_vertexShaders | Holds the array of 1800 vertex shader handles | verified, proof one | models/cache#cache-object |
0x1030 | 4 | void * | m_pixelShaders | Holds the array of 32 pixel shader handles | verified, proof one | models/cache#cache-object |
Globals of this type
0xceefb0s_m2Cache