2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 15:07:43 +00:00

Graphics debug groups and bug fixes

This commit is contained in:
Jack Andersen
2019-07-20 22:42:52 -10:00
parent b4fe474de3
commit 5acf9ecbcf
90 changed files with 217 additions and 27 deletions

View File

@@ -344,4 +344,25 @@ public:
void Draw() const { CGraphics::DrawArray(m_start, m_vec.size() - m_start); }
};
#ifdef BOO_GRAPHICS_DEBUG_GROUPS
class GraphicsDebugGroup {
/* Stack only */
void* operator new(size_t);
void operator delete(void*);
void* operator new[](size_t);
void operator delete[](void*);
public:
explicit GraphicsDebugGroup(const char* name, const zeus::CColor& color = zeus::skWhite) {
zeus::simd_floats f(color.mSimd);
CGraphics::g_BooMainCommandQueue->pushDebugGroup(name, f.array());
}
~GraphicsDebugGroup() {
CGraphics::g_BooMainCommandQueue->popDebugGroup();
}
};
#define SCOPED_GRAPHICS_DEBUG_GROUP(...) GraphicsDebugGroup _GfxDbg_(__VA_ARGS__);
#else
#define SCOPED_GRAPHICS_DEBUG_GROUP(...)
#endif
} // namespace urde