Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/Profiler2.cpp
Show All 30 Lines | |||||
#include "third_party/mongoose/mongoose.h" | #include "third_party/mongoose/mongoose.h" | ||||
#include <iomanip> | #include <iomanip> | ||||
#include <map> | #include <map> | ||||
#include <unordered_map> | #include <unordered_map> | ||||
CProfiler2 g_Profiler2; | CProfiler2 g_Profiler2; | ||||
const size_t CProfiler2::MAX_ATTRIBUTE_LENGTH = 256; | |||||
// TODO: what's a good size? | |||||
const size_t CProfiler2::BUFFER_SIZE = 4 * 1024 * 1024; | |||||
const size_t CProfiler2::HOLD_BUFFER_SIZE = 128 * 1024; | |||||
// A human-recognisable pattern (for debugging) followed by random bytes (for uniqueness) | // A human-recognisable pattern (for debugging) followed by random bytes (for uniqueness) | ||||
const u8 CProfiler2::RESYNC_MAGIC[8] = {0x11, 0x22, 0x33, 0x44, 0xf4, 0x93, 0xbe, 0x15}; | const u8 CProfiler2::RESYNC_MAGIC[8] = {0x11, 0x22, 0x33, 0x44, 0xf4, 0x93, 0xbe, 0x15}; | ||||
thread_local CProfiler2::ThreadStorage* CProfiler2::m_CurrentStorage = nullptr; | thread_local CProfiler2::ThreadStorage* CProfiler2::m_CurrentStorage = nullptr; | ||||
CProfiler2::CProfiler2() : | CProfiler2::CProfiler2() : | ||||
m_Initialised(false), m_FrameNumber(0), m_MgContext(NULL), m_GPU(NULL) | m_Initialised(false), m_FrameNumber(0), m_MgContext(NULL), m_GPU(NULL) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 929 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator