Port BufCreate, PoolCreate/PoolDestroy, DeviceCreatePools, DeviceCreateStreamBufs, IShaderLoad, ShaderCreate, ShaderDestroy, CGxShader::Load/dtor, CGxPool dtor, CGxDevice ctor/dtor and OsGetProcessorFeatures. CGxBuf gets its own header/source. CGxPool/CGxBuf/CGxAppRenderState/CGxPushedRenderState become structs (RTTI .?AU). HASHKEY_STRI derives from HASHKEY_STR. m_shaderList is TSHashTable<CGxShader, HASHKEY_STRI>[6]; list offsets via offsetof. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
37 lines
951 B
C++
37 lines
951 B
C++
#include <cstdint>
|
|
#include "Engine/Source/Gx/CGxPool.h"
|
|
|
|
// INLINED
|
|
CGxPool::CGxPool(EGxPoolTarget target, EGxPoolUsage usage, int32_t size, EGxPoolHintBits hint, const char* name) : m_target(target), m_usage(usage), m_size(size), m_apiSpecific(nullptr), unk_001C(0), m_hint(hint), m_name(name) {
|
|
}
|
|
|
|
// VERIFY: 434bd8af manual
|
|
// OFFSET: 0x00687740
|
|
CGxPool::~CGxPool() {
|
|
}
|
|
|
|
// VERIFY: 3a3418b6 manual
|
|
// OFFSET: 0x00688230
|
|
void CGxPool::Invalidate() {
|
|
for (CGxBuf* buf = this->m_bufList.Head(); buf; buf = this->m_bufList.Next(buf)) {
|
|
buf->unk_001C = 0;
|
|
}
|
|
}
|
|
|
|
// VERIFY: 9189f656 manual
|
|
// OFFSET: 0x00688260
|
|
void CGxPool::Discard() {
|
|
for (CGxBuf* buf = this->m_bufList.Head(); buf; buf = this->m_bufList.Next(buf)) {
|
|
buf->unk_001C = 0;
|
|
}
|
|
|
|
this->unk_001C = 0;
|
|
}
|
|
|
|
// VERIFY: 56739d8d auto
|
|
// OFFSET: 0x00685C00
|
|
void CGxPool::UnlinkBuf(CGxBuf* buf) {
|
|
this->m_bufList.UnlinkNode(buf);
|
|
buf->m_pool = nullptr;
|
|
}
|