Merge pull request #3697 from lioncash/declarations
CMakeLists: Enable -Wmissing-declarations on Linux builds
This commit is contained in:
commit
2409fedacf
20
externals/microprofile/microprofile.h
vendored
20
externals/microprofile/microprofile.h
vendored
@ -910,14 +910,14 @@ typedef void* (*MicroProfileThreadFunc)(void*);
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
typedef pthread_t MicroProfileThread;
|
typedef pthread_t MicroProfileThread;
|
||||||
void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
|
inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
|
||||||
{
|
{
|
||||||
pthread_attr_t Attr;
|
pthread_attr_t Attr;
|
||||||
int r = pthread_attr_init(&Attr);
|
int r = pthread_attr_init(&Attr);
|
||||||
MP_ASSERT(r == 0);
|
MP_ASSERT(r == 0);
|
||||||
pthread_create(pThread, &Attr, Func, 0);
|
pthread_create(pThread, &Attr, Func, 0);
|
||||||
}
|
}
|
||||||
void MicroProfileThreadJoin(MicroProfileThread* pThread)
|
inline void MicroProfileThreadJoin(MicroProfileThread* pThread)
|
||||||
{
|
{
|
||||||
int r = pthread_join(*pThread, 0);
|
int r = pthread_join(*pThread, 0);
|
||||||
MP_ASSERT(r == 0);
|
MP_ASSERT(r == 0);
|
||||||
@ -930,11 +930,11 @@ DWORD _stdcall ThreadTrampoline(void* pFunc)
|
|||||||
return (uint32_t)F(0);
|
return (uint32_t)F(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
|
inline void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
|
||||||
{
|
{
|
||||||
*pThread = CreateThread(0, 0, ThreadTrampoline, Func, 0, 0);
|
*pThread = CreateThread(0, 0, ThreadTrampoline, Func, 0, 0);
|
||||||
}
|
}
|
||||||
void MicroProfileThreadJoin(MicroProfileThread* pThread)
|
inline void MicroProfileThreadJoin(MicroProfileThread* pThread)
|
||||||
{
|
{
|
||||||
WaitForSingleObject(*pThread, INFINITE);
|
WaitForSingleObject(*pThread, INFINITE);
|
||||||
CloseHandle(*pThread);
|
CloseHandle(*pThread);
|
||||||
@ -1131,7 +1131,7 @@ inline void MicroProfileSetThreadLog(MicroProfileThreadLog* pLog)
|
|||||||
pthread_setspecific(g_MicroProfileThreadLogKey, pLog);
|
pthread_setspecific(g_MicroProfileThreadLogKey, pLog);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
MicroProfileThreadLog* MicroProfileGetThreadLog()
|
inline MicroProfileThreadLog* MicroProfileGetThreadLog()
|
||||||
{
|
{
|
||||||
return g_MicroProfileThreadLog;
|
return g_MicroProfileThreadLog;
|
||||||
}
|
}
|
||||||
@ -1247,7 +1247,7 @@ MicroProfileToken MicroProfileFindToken(const char* pGroup, const char* pName)
|
|||||||
return MICROPROFILE_INVALID_TOKEN;
|
return MICROPROFILE_INVALID_TOKEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type)
|
inline uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type)
|
||||||
{
|
{
|
||||||
for(uint32_t i = 0; i < S.nGroupCount; ++i)
|
for(uint32_t i = 0; i < S.nGroupCount; ++i)
|
||||||
{
|
{
|
||||||
@ -1276,7 +1276,7 @@ uint16_t MicroProfileGetGroup(const char* pGroup, MicroProfileTokenType Type)
|
|||||||
return nGroupIndex;
|
return nGroupIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileRegisterGroup(const char* pGroup, const char* pCategory, uint32_t nColor)
|
inline void MicroProfileRegisterGroup(const char* pGroup, const char* pCategory, uint32_t nColor)
|
||||||
{
|
{
|
||||||
int nCategoryIndex = -1;
|
int nCategoryIndex = -1;
|
||||||
for(uint32_t i = 0; i < S.nCategoryCount; ++i)
|
for(uint32_t i = 0; i < S.nCategoryCount; ++i)
|
||||||
@ -1442,7 +1442,7 @@ void MicroProfileGpuLeave(MicroProfileToken nToken_, uint64_t nTickStart)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileContextSwitchPut(MicroProfileContextSwitch* pContextSwitch)
|
inline void MicroProfileContextSwitchPut(MicroProfileContextSwitch* pContextSwitch)
|
||||||
{
|
{
|
||||||
if(S.nRunning || pContextSwitch->nTicks <= S.nPauseTicks)
|
if(S.nRunning || pContextSwitch->nTicks <= S.nPauseTicks)
|
||||||
{
|
{
|
||||||
@ -1894,7 +1894,7 @@ void MicroProfileSetEnableAllGroups(bool bEnableAllGroups)
|
|||||||
S.nAllGroupsWanted = bEnableAllGroups ? 1 : 0;
|
S.nAllGroupsWanted = bEnableAllGroups ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileEnableCategory(const char* pCategory, bool bEnabled)
|
inline void MicroProfileEnableCategory(const char* pCategory, bool bEnabled)
|
||||||
{
|
{
|
||||||
int nCategoryIndex = -1;
|
int nCategoryIndex = -1;
|
||||||
for(uint32_t i = 0; i < S.nCategoryCount; ++i)
|
for(uint32_t i = 0; i < S.nCategoryCount; ++i)
|
||||||
@ -2004,7 +2004,7 @@ void MicroProfileForceDisableGroup(const char* pGroup, MicroProfileTokenType Typ
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileCalcAllTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, float* pTotal, uint32_t nSize)
|
inline void MicroProfileCalcAllTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, float* pTotal, uint32_t nSize)
|
||||||
{
|
{
|
||||||
for(uint32_t i = 0; i < S.nTotalTimers && i < nSize; ++i)
|
for(uint32_t i = 0; i < S.nTotalTimers && i < nSize; ++i)
|
||||||
{
|
{
|
||||||
|
108
externals/microprofile/microprofileui.h
vendored
108
externals/microprofile/microprofileui.h
vendored
@ -417,19 +417,19 @@ void MicroProfileToggleDisplayMode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileStringArrayClear(MicroProfileStringArray* pArray)
|
inline void MicroProfileStringArrayClear(MicroProfileStringArray* pArray)
|
||||||
{
|
{
|
||||||
pArray->nNumStrings = 0;
|
pArray->nNumStrings = 0;
|
||||||
pArray->pBufferPos = &pArray->Buffer[0];
|
pArray->pBufferPos = &pArray->Buffer[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileStringArrayAddLiteral(MicroProfileStringArray* pArray, const char* pLiteral)
|
inline void MicroProfileStringArrayAddLiteral(MicroProfileStringArray* pArray, const char* pLiteral)
|
||||||
{
|
{
|
||||||
MP_ASSERT(pArray->nNumStrings < MICROPROFILE_TOOLTIP_MAX_STRINGS);
|
MP_ASSERT(pArray->nNumStrings < MICROPROFILE_TOOLTIP_MAX_STRINGS);
|
||||||
pArray->ppStrings[pArray->nNumStrings++] = pLiteral;
|
pArray->ppStrings[pArray->nNumStrings++] = pLiteral;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileStringArrayFormat(MicroProfileStringArray* pArray, const char* fmt, ...)
|
inline void MicroProfileStringArrayFormat(MicroProfileStringArray* pArray, const char* fmt, ...)
|
||||||
{
|
{
|
||||||
MP_ASSERT(pArray->nNumStrings < MICROPROFILE_TOOLTIP_MAX_STRINGS);
|
MP_ASSERT(pArray->nNumStrings < MICROPROFILE_TOOLTIP_MAX_STRINGS);
|
||||||
pArray->ppStrings[pArray->nNumStrings++] = pArray->pBufferPos;
|
pArray->ppStrings[pArray->nNumStrings++] = pArray->pBufferPos;
|
||||||
@ -439,7 +439,7 @@ void MicroProfileStringArrayFormat(MicroProfileStringArray* pArray, const char*
|
|||||||
va_end(args);
|
va_end(args);
|
||||||
MP_ASSERT(pArray->pBufferPos < pArray->Buffer + MICROPROFILE_TOOLTIP_STRING_BUFFER_SIZE);
|
MP_ASSERT(pArray->pBufferPos < pArray->Buffer + MICROPROFILE_TOOLTIP_STRING_BUFFER_SIZE);
|
||||||
}
|
}
|
||||||
void MicroProfileStringArrayCopy(MicroProfileStringArray* pDest, MicroProfileStringArray* pSrc)
|
inline void MicroProfileStringArrayCopy(MicroProfileStringArray* pDest, MicroProfileStringArray* pSrc)
|
||||||
{
|
{
|
||||||
memcpy(&pDest->ppStrings[0], &pSrc->ppStrings[0], sizeof(pDest->ppStrings));
|
memcpy(&pDest->ppStrings[0], &pSrc->ppStrings[0], sizeof(pDest->ppStrings));
|
||||||
memcpy(&pDest->Buffer[0], &pSrc->Buffer[0], sizeof(pDest->Buffer));
|
memcpy(&pDest->Buffer[0], &pSrc->Buffer[0], sizeof(pDest->Buffer));
|
||||||
@ -456,7 +456,7 @@ void MicroProfileStringArrayCopy(MicroProfileStringArray* pDest, MicroProfileStr
|
|||||||
pDest->nNumStrings = pSrc->nNumStrings;
|
pDest->nNumStrings = pSrc->nNumStrings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileFloatWindowSize(const char** ppStrings, uint32_t nNumStrings, uint32_t* pColors, uint32_t& nWidth, uint32_t& nHeight, uint32_t* pStringLengths = 0)
|
inline void MicroProfileFloatWindowSize(const char** ppStrings, uint32_t nNumStrings, uint32_t* pColors, uint32_t& nWidth, uint32_t& nHeight, uint32_t* pStringLengths = 0)
|
||||||
{
|
{
|
||||||
uint32_t* nStringLengths = pStringLengths ? pStringLengths : (uint32_t*)alloca(nNumStrings * sizeof(uint32_t));
|
uint32_t* nStringLengths = pStringLengths ? pStringLengths : (uint32_t*)alloca(nNumStrings * sizeof(uint32_t));
|
||||||
uint32_t nTextCount = nNumStrings/2;
|
uint32_t nTextCount = nNumStrings/2;
|
||||||
@ -474,7 +474,7 @@ void MicroProfileFloatWindowSize(const char** ppStrings, uint32_t nNumStrings, u
|
|||||||
nHeight = (MICROPROFILE_TEXT_HEIGHT+1) * nTextCount + 2 * MICROPROFILE_BORDER_SIZE;
|
nHeight = (MICROPROFILE_TEXT_HEIGHT+1) * nTextCount + 2 * MICROPROFILE_BORDER_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileDrawFloatWindow(uint32_t nX, uint32_t nY, const char** ppStrings, uint32_t nNumStrings, uint32_t nColor, uint32_t* pColors = 0)
|
inline void MicroProfileDrawFloatWindow(uint32_t nX, uint32_t nY, const char** ppStrings, uint32_t nNumStrings, uint32_t nColor, uint32_t* pColors = 0)
|
||||||
{
|
{
|
||||||
uint32_t nWidth = 0, nHeight = 0;
|
uint32_t nWidth = 0, nHeight = 0;
|
||||||
uint32_t* nStringLengths = (uint32_t*)alloca(nNumStrings * sizeof(uint32_t));
|
uint32_t* nStringLengths = (uint32_t*)alloca(nNumStrings * sizeof(uint32_t));
|
||||||
@ -503,7 +503,7 @@ void MicroProfileDrawFloatWindow(uint32_t nX, uint32_t nY, const char** ppString
|
|||||||
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
nY += (MICROPROFILE_TEXT_HEIGHT+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MicroProfileDrawTextBox(uint32_t nX, uint32_t nY, const char** ppStrings, uint32_t nNumStrings, uint32_t nColor, uint32_t* pColors = 0)
|
inline void MicroProfileDrawTextBox(uint32_t nX, uint32_t nY, const char** ppStrings, uint32_t nNumStrings, uint32_t nColor, uint32_t* pColors = 0)
|
||||||
{
|
{
|
||||||
uint32_t nWidth = 0, nHeight = 0;
|
uint32_t nWidth = 0, nHeight = 0;
|
||||||
uint32_t* nStringLengths = (uint32_t*)alloca(nNumStrings * sizeof(uint32_t));
|
uint32_t* nStringLengths = (uint32_t*)alloca(nNumStrings * sizeof(uint32_t));
|
||||||
@ -529,7 +529,7 @@ void MicroProfileDrawTextBox(uint32_t nX, uint32_t nY, const char** ppStrings, u
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileToolTipMeta(MicroProfileStringArray* pToolTip)
|
inline void MicroProfileToolTipMeta(MicroProfileStringArray* pToolTip)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
if(UI.nRangeBeginIndex != UI.nRangeEndIndex && UI.pRangeLog)
|
if(UI.nRangeBeginIndex != UI.nRangeEndIndex && UI.pRangeLog)
|
||||||
@ -608,7 +608,7 @@ void MicroProfileToolTipMeta(MicroProfileStringArray* pToolTip)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileDrawFloatTooltip(uint32_t nX, uint32_t nY, uint32_t nToken, uint64_t nTime)
|
inline void MicroProfileDrawFloatTooltip(uint32_t nX, uint32_t nY, uint32_t nToken, uint64_t nTime)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
|
|
||||||
@ -718,7 +718,7 @@ void MicroProfileDrawFloatTooltip(uint32_t nX, uint32_t nY, uint32_t nToken, uin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileZoomTo(int64_t nTickStart, int64_t nTickEnd)
|
inline void MicroProfileZoomTo(int64_t nTickStart, int64_t nTickEnd)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ void MicroProfileZoomTo(int64_t nTickStart, int64_t nTickEnd)
|
|||||||
UI.fDetailedRangeTarget = MicroProfileLogTickDifference(nTickStart, nTickEnd) * fToMs;
|
UI.fDetailedRangeTarget = MicroProfileLogTickDifference(nTickStart, nTickEnd) * fToMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileCenter(int64_t nTickCenter)
|
inline void MicroProfileCenter(int64_t nTickCenter)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
int64_t nStart = S.Frames[S.nFrameCurrent].nFrameStartCpu;
|
int64_t nStart = S.Frames[S.nFrameCurrent].nFrameStartCpu;
|
||||||
@ -739,7 +739,7 @@ void MicroProfileCenter(int64_t nTickCenter)
|
|||||||
#ifdef MICROPROFILE_DEBUG
|
#ifdef MICROPROFILE_DEBUG
|
||||||
uint64_t* g_pMicroProfileDumpStart = 0;
|
uint64_t* g_pMicroProfileDumpStart = 0;
|
||||||
uint64_t* g_pMicroProfileDumpEnd = 0;
|
uint64_t* g_pMicroProfileDumpEnd = 0;
|
||||||
void MicroProfileDebugDumpRange()
|
inline void MicroProfileDebugDumpRange()
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
if(g_pMicroProfileDumpStart != g_pMicroProfileDumpEnd)
|
if(g_pMicroProfileDumpStart != g_pMicroProfileDumpEnd)
|
||||||
@ -777,7 +777,7 @@ void MicroProfileDebugDumpRange()
|
|||||||
|
|
||||||
#define MICROPROFILE_HOVER_DIST 0.5f
|
#define MICROPROFILE_HOVER_DIST 0.5f
|
||||||
|
|
||||||
void MicroProfileDrawDetailedContextSwitchBars(uint32_t nY, uint32_t nThreadId, uint32_t nContextSwitchStart, uint32_t nContextSwitchEnd, int64_t nBaseTicks, uint32_t nBaseY)
|
inline void MicroProfileDrawDetailedContextSwitchBars(uint32_t nY, uint32_t nThreadId, uint32_t nContextSwitchStart, uint32_t nContextSwitchEnd, int64_t nBaseTicks, uint32_t nBaseY)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
int64_t nTickIn = -1;
|
int64_t nTickIn = -1;
|
||||||
@ -841,7 +841,7 @@ void MicroProfileDrawDetailedContextSwitchBars(uint32_t nY, uint32_t nThreadId,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY, int nSelectedFrame)
|
inline void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY, int nSelectedFrame)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
MP_DEBUG_DUMP_RANGE();
|
MP_DEBUG_DUMP_RANGE();
|
||||||
@ -1325,7 +1325,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileDrawDetailedFrameHistory(uint32_t nWidth, uint32_t nHeight, uint32_t nBaseY, uint32_t nSelectedFrame)
|
inline void MicroProfileDrawDetailedFrameHistory(uint32_t nWidth, uint32_t nHeight, uint32_t nBaseY, uint32_t nSelectedFrame)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
|
|
||||||
@ -1379,7 +1379,7 @@ void MicroProfileDrawDetailedFrameHistory(uint32_t nWidth, uint32_t nHeight, uin
|
|||||||
}
|
}
|
||||||
MicroProfileDrawBox(fSelectionStart, nBaseY, fSelectionEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, MICROPROFILE_FRAME_HISTORY_COLOR_HIGHTLIGHT, MicroProfileBoxTypeFlat);
|
MicroProfileDrawBox(fSelectionStart, nBaseY, fSelectionEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, MICROPROFILE_FRAME_HISTORY_COLOR_HIGHTLIGHT, MicroProfileBoxTypeFlat);
|
||||||
}
|
}
|
||||||
void MicroProfileDrawDetailedView(uint32_t nWidth, uint32_t nHeight)
|
inline void MicroProfileDrawDetailedView(uint32_t nWidth, uint32_t nHeight)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
|
|
||||||
@ -1416,11 +1416,11 @@ void MicroProfileDrawDetailedView(uint32_t nWidth, uint32_t nHeight)
|
|||||||
MicroProfileDrawDetailedFrameHistory(nWidth, nHeight, nBaseY, nSelectedFrame);
|
MicroProfileDrawDetailedFrameHistory(nWidth, nHeight, nBaseY, nSelectedFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileDrawTextRight(uint32_t nX, uint32_t nY, uint32_t nColor, const char* pStr, uint32_t nStrLen)
|
inline void MicroProfileDrawTextRight(uint32_t nX, uint32_t nY, uint32_t nColor, const char* pStr, uint32_t nStrLen)
|
||||||
{
|
{
|
||||||
MicroProfileDrawText(nX - nStrLen * (MICROPROFILE_TEXT_WIDTH+1), nY, nColor, pStr, nStrLen);
|
MicroProfileDrawText(nX - nStrLen * (MICROPROFILE_TEXT_WIDTH+1), nY, nColor, pStr, nStrLen);
|
||||||
}
|
}
|
||||||
void MicroProfileDrawHeader(int32_t nX, uint32_t nWidth, const char* pName)
|
inline void MicroProfileDrawHeader(int32_t nX, uint32_t nWidth, const char* pName)
|
||||||
{
|
{
|
||||||
if(pName)
|
if(pName)
|
||||||
{
|
{
|
||||||
@ -1432,7 +1432,7 @@ void MicroProfileDrawHeader(int32_t nX, uint32_t nWidth, const char* pName)
|
|||||||
|
|
||||||
typedef void (*MicroProfileLoopGroupCallback)(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pData);
|
typedef void (*MicroProfileLoopGroupCallback)(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pData);
|
||||||
|
|
||||||
void MicroProfileLoopActiveGroupsDraw(int32_t nX, int32_t nY, const char* pName, MicroProfileLoopGroupCallback CB, void* pData)
|
inline void MicroProfileLoopActiveGroupsDraw(int32_t nX, int32_t nY, const char* pName, MicroProfileLoopGroupCallback CB, void* pData)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
nY += MICROPROFILE_TEXT_HEIGHT + 2;
|
nY += MICROPROFILE_TEXT_HEIGHT + 2;
|
||||||
@ -1465,7 +1465,7 @@ void MicroProfileLoopActiveGroupsDraw(int32_t nX, int32_t nY, const char* pName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileCalcTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, uint64_t nGroup, uint32_t nSize)
|
inline void MicroProfileCalcTimers(float* pTimers, float* pAverage, float* pMax, float* pCallAverage, float* pExclusive, float* pAverageExclusive, float* pMaxExclusive, uint64_t nGroup, uint32_t nSize)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
|
|
||||||
@ -1527,7 +1527,7 @@ void MicroProfileCalcTimers(float* pTimers, float* pAverage, float* pMax, float*
|
|||||||
|
|
||||||
#define SBUF_MAX 32
|
#define SBUF_MAX 32
|
||||||
|
|
||||||
void MicroProfileDrawBarArrayCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
inline void MicroProfileDrawBarArrayCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
||||||
{
|
{
|
||||||
const uint32_t nHeight = MICROPROFILE_TEXT_HEIGHT;
|
const uint32_t nHeight = MICROPROFILE_TEXT_HEIGHT;
|
||||||
const uint32_t nTextWidth = 6 * (1+MICROPROFILE_TEXT_WIDTH);
|
const uint32_t nTextWidth = 6 * (1+MICROPROFILE_TEXT_WIDTH);
|
||||||
@ -1547,7 +1547,7 @@ void MicroProfileDrawBarArrayCallback(uint32_t nTimer, uint32_t nIdx, uint64_t n
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarArray(int32_t nX, int32_t nY, float* pTimers, const char* pName, uint32_t nTotalHeight, float* pTimers2 = NULL)
|
inline uint32_t MicroProfileDrawBarArray(int32_t nX, int32_t nY, float* pTimers, const char* pName, uint32_t nTotalHeight, float* pTimers2 = NULL)
|
||||||
{
|
{
|
||||||
const uint32_t nTextWidth = 6 * (1+MICROPROFILE_TEXT_WIDTH);
|
const uint32_t nTextWidth = 6 * (1+MICROPROFILE_TEXT_WIDTH);
|
||||||
const uint32_t nWidth = MICROPROFILE_BAR_WIDTH;
|
const uint32_t nWidth = MICROPROFILE_BAR_WIDTH;
|
||||||
@ -1559,7 +1559,7 @@ uint32_t MicroProfileDrawBarArray(int32_t nX, int32_t nY, float* pTimers, const
|
|||||||
return nWidth + 5 + nTextWidth;
|
return nWidth + 5 + nTextWidth;
|
||||||
|
|
||||||
}
|
}
|
||||||
void MicroProfileDrawBarCallCountCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
inline void MicroProfileDrawBarCallCountCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
char sBuffer[SBUF_MAX];
|
char sBuffer[SBUF_MAX];
|
||||||
@ -1567,7 +1567,7 @@ void MicroProfileDrawBarCallCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
|
|||||||
MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, nLen);
|
MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, nLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarCallCount(int32_t nX, int32_t nY, const char* pName)
|
inline uint32_t MicroProfileDrawBarCallCount(int32_t nX, int32_t nY, const char* pName)
|
||||||
{
|
{
|
||||||
MicroProfileLoopActiveGroupsDraw(nX, nY, pName, MicroProfileDrawBarCallCountCallback, 0);
|
MicroProfileLoopActiveGroupsDraw(nX, nY, pName, MicroProfileDrawBarCallCountCallback, 0);
|
||||||
const uint32_t nTextWidth = 6 * MICROPROFILE_TEXT_WIDTH;
|
const uint32_t nTextWidth = 6 * MICROPROFILE_TEXT_WIDTH;
|
||||||
@ -1581,7 +1581,7 @@ struct MicroProfileMetaAverageArgs
|
|||||||
float fRcpFrames;
|
float fRcpFrames;
|
||||||
};
|
};
|
||||||
|
|
||||||
void MicroProfileDrawBarMetaAverageCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
inline void MicroProfileDrawBarMetaAverageCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
||||||
{
|
{
|
||||||
MicroProfileMetaAverageArgs* pArgs = (MicroProfileMetaAverageArgs*)pExtra;
|
MicroProfileMetaAverageArgs* pArgs = (MicroProfileMetaAverageArgs*)pExtra;
|
||||||
uint64_t* pCounters = pArgs->pCounters;
|
uint64_t* pCounters = pArgs->pCounters;
|
||||||
@ -1591,7 +1591,7 @@ void MicroProfileDrawBarMetaAverageCallback(uint32_t nTimer, uint32_t nIdx, uint
|
|||||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
inline uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
||||||
{
|
{
|
||||||
if(!pName)
|
if(!pName)
|
||||||
return 0;
|
return 0;
|
||||||
@ -1605,7 +1605,7 @@ uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCount
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileDrawBarMetaCountCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
inline void MicroProfileDrawBarMetaCountCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
||||||
{
|
{
|
||||||
uint64_t* pCounters = (uint64_t*)pExtra;
|
uint64_t* pCounters = (uint64_t*)pExtra;
|
||||||
char sBuffer[SBUF_MAX];
|
char sBuffer[SBUF_MAX];
|
||||||
@ -1613,7 +1613,7 @@ void MicroProfileDrawBarMetaCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
|
|||||||
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
inline uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
|
||||||
{
|
{
|
||||||
if(!pName)
|
if(!pName)
|
||||||
return 0;
|
return 0;
|
||||||
@ -1625,7 +1625,7 @@ uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounter
|
|||||||
return 5 + nTextWidth;
|
return 5 + nTextWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileDrawBarLegendCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
inline void MicroProfileDrawBarLegendCallback(uint32_t nTimer, uint32_t nIdx, uint64_t nGroupMask, uint32_t nX, uint32_t nY, void* pExtra)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
if (S.TimerInfo[nTimer].bGraph)
|
if (S.TimerInfo[nTimer].bGraph)
|
||||||
@ -1640,7 +1640,7 @@ void MicroProfileDrawBarLegendCallback(uint32_t nTimer, uint32_t nIdx, uint64_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileDrawBarLegend(int32_t nX, int32_t nY, uint32_t nTotalHeight, uint32_t nMaxWidth)
|
inline uint32_t MicroProfileDrawBarLegend(int32_t nX, int32_t nY, uint32_t nTotalHeight, uint32_t nMaxWidth)
|
||||||
{
|
{
|
||||||
MicroProfileDrawLineVertical(nX-5, nY, nTotalHeight, UI.nOpacityBackground | g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
|
MicroProfileDrawLineVertical(nX-5, nY, nTotalHeight, UI.nOpacityBackground | g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
|
||||||
MicroProfileLoopActiveGroupsDraw(nMaxWidth, nY, 0, MicroProfileDrawBarLegendCallback, 0);
|
MicroProfileLoopActiveGroupsDraw(nMaxWidth, nY, 0, MicroProfileDrawBarLegendCallback, 0);
|
||||||
@ -1807,7 +1807,7 @@ void MicroProfileDumpTimers()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
inline void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
|
|
||||||
@ -1951,7 +1951,7 @@ typedef const char* (*MicroProfileSubmenuCallback)(int, bool* bSelected);
|
|||||||
typedef void (*MicroProfileClickCallback)(int);
|
typedef void (*MicroProfileClickCallback)(int);
|
||||||
|
|
||||||
|
|
||||||
const char* MicroProfileUIMenuMode(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuMode(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
switch(nIndex)
|
switch(nIndex)
|
||||||
@ -1979,7 +1979,7 @@ const char* MicroProfileUIMenuMode(int nIndex, bool* bSelected)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
*bSelected = false;
|
*bSelected = false;
|
||||||
@ -2012,7 +2012,7 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
if(nIndex < sizeof(g_MicroProfileAggregatePresets)/sizeof(g_MicroProfileAggregatePresets[0]))
|
if(nIndex < sizeof(g_MicroProfileAggregatePresets)/sizeof(g_MicroProfileAggregatePresets[0]))
|
||||||
@ -2032,7 +2032,7 @@ const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MicroProfileUIMenuTimers(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuTimers(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
*bSelected = 0 != (S.nBars & (1 << nIndex));
|
*bSelected = 0 != (S.nBars & (1 << nIndex));
|
||||||
@ -2054,7 +2054,7 @@ const char* MicroProfileUIMenuTimers(int nIndex, bool* bSelected)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MicroProfileUIMenuOptions(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuOptions(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
if(nIndex >= MICROPROFILE_OPTION_SIZE) return 0;
|
if(nIndex >= MICROPROFILE_OPTION_SIZE) return 0;
|
||||||
@ -2094,7 +2094,7 @@ const char* MicroProfileUIMenuOptions(int nIndex, bool* bSelected)
|
|||||||
return UI.Options[nIndex].Text;
|
return UI.Options[nIndex].Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
static char buf[128];
|
static char buf[128];
|
||||||
*bSelected = false;
|
*bSelected = false;
|
||||||
@ -2118,7 +2118,7 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
if((uint32_t)-1 == UI.nCustomActive)
|
if((uint32_t)-1 == UI.nCustomActive)
|
||||||
{
|
{
|
||||||
@ -2145,13 +2145,13 @@ const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MicroProfileUIMenuEmpty(int nIndex, bool* bSelected)
|
inline const char* MicroProfileUIMenuEmpty(int nIndex, bool* bSelected)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileUIClickMode(int nIndex)
|
inline void MicroProfileUIClickMode(int nIndex)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
switch(nIndex)
|
switch(nIndex)
|
||||||
@ -2176,7 +2176,7 @@ void MicroProfileUIClickMode(int nIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileUIClickGroups(int nIndex)
|
inline void MicroProfileUIClickGroups(int nIndex)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
if(nIndex == 0)
|
if(nIndex == 0)
|
||||||
@ -2208,7 +2208,7 @@ void MicroProfileUIClickGroups(int nIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileUIClickAggregate(int nIndex)
|
inline void MicroProfileUIClickAggregate(int nIndex)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
S.nAggregateFlip = g_MicroProfileAggregatePresets[nIndex];
|
S.nAggregateFlip = g_MicroProfileAggregatePresets[nIndex];
|
||||||
@ -2218,13 +2218,13 @@ void MicroProfileUIClickAggregate(int nIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileUIClickTimers(int nIndex)
|
inline void MicroProfileUIClickTimers(int nIndex)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
S.nBars ^= (1 << nIndex);
|
S.nBars ^= (1 << nIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileUIClickOptions(int nIndex)
|
inline void MicroProfileUIClickOptions(int nIndex)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
switch(UI.Options[nIndex].nSubType)
|
switch(UI.Options[nIndex].nSubType)
|
||||||
@ -2271,7 +2271,7 @@ void MicroProfileUIClickOptions(int nIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileUIClickPreset(int nIndex)
|
inline void MicroProfileUIClickPreset(int nIndex)
|
||||||
{
|
{
|
||||||
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
|
||||||
int nIndexSave = nIndex - nNumPresets - 1;
|
int nIndexSave = nIndex - nNumPresets - 1;
|
||||||
@ -2285,7 +2285,7 @@ void MicroProfileUIClickPreset(int nIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileUIClickCustom(int nIndex)
|
inline void MicroProfileUIClickCustom(int nIndex)
|
||||||
{
|
{
|
||||||
if(nIndex == 0)
|
if(nIndex == 0)
|
||||||
{
|
{
|
||||||
@ -2298,13 +2298,13 @@ void MicroProfileUIClickCustom(int nIndex)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileUIClickEmpty(int nIndex)
|
inline void MicroProfileUIClickEmpty(int nIndex)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
inline void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
||||||
{
|
{
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
|
|
||||||
@ -2489,7 +2489,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MicroProfileMoveGraph()
|
inline void MicroProfileMoveGraph()
|
||||||
{
|
{
|
||||||
|
|
||||||
int nZoom = UI.nMouseWheelDelta;
|
int nZoom = UI.nMouseWheelDelta;
|
||||||
@ -2536,7 +2536,7 @@ void MicroProfileMoveGraph()
|
|||||||
UI.nOffsetY = 0;
|
UI.nOffsetY = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
inline void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
||||||
{
|
{
|
||||||
if((uint32_t)-1 != UI.nCustomActive)
|
if((uint32_t)-1 != UI.nCustomActive)
|
||||||
{
|
{
|
||||||
@ -2633,7 +2633,7 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
inline void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
|
||||||
{
|
{
|
||||||
MICROPROFILE_SCOPE(g_MicroProfileDraw);
|
MICROPROFILE_SCOPE(g_MicroProfileDraw);
|
||||||
MicroProfile& S = *MicroProfileGet();
|
MicroProfile& S = *MicroProfileGet();
|
||||||
@ -3226,7 +3226,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileCustomGroupFind(const char* pCustomName)
|
inline uint32_t MicroProfileCustomGroupFind(const char* pCustomName)
|
||||||
{
|
{
|
||||||
for(uint32_t i = 0; i < UI.nCustomCount; ++i)
|
for(uint32_t i = 0; i < UI.nCustomCount; ++i)
|
||||||
{
|
{
|
||||||
@ -3238,7 +3238,7 @@ uint32_t MicroProfileCustomGroupFind(const char* pCustomName)
|
|||||||
return (uint32_t)-1;
|
return (uint32_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
inline uint32_t MicroProfileCustomGroup(const char* pCustomName)
|
||||||
{
|
{
|
||||||
for(uint32_t i = 0; i < UI.nCustomCount; ++i)
|
for(uint32_t i = 0; i < UI.nCustomCount; ++i)
|
||||||
{
|
{
|
||||||
@ -3271,7 +3271,7 @@ void MicroProfileCustomGroup(const char* pCustomName, uint32_t nMaxTimers, uint3
|
|||||||
UI.Custom[nIndex].nAggregateFlip = nAggregateFlip;
|
UI.Custom[nIndex].nAggregateFlip = nAggregateFlip;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MicroProfileCustomGroupEnable(uint32_t nIndex)
|
inline void MicroProfileCustomGroupEnable(uint32_t nIndex)
|
||||||
{
|
{
|
||||||
if(nIndex < UI.nCustomCount)
|
if(nIndex < UI.nCustomCount)
|
||||||
{
|
{
|
||||||
|
@ -54,8 +54,10 @@ else()
|
|||||||
add_compile_options(
|
add_compile_options(
|
||||||
-Wall
|
-Wall
|
||||||
-Werror=implicit-fallthrough
|
-Werror=implicit-fallthrough
|
||||||
|
-Werror=missing-declarations
|
||||||
-Werror=reorder
|
-Werror=reorder
|
||||||
-Wextra
|
-Wextra
|
||||||
|
-Wmissing-declarations
|
||||||
-Wno-attributes
|
-Wno-attributes
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
)
|
)
|
||||||
|
@ -202,8 +202,8 @@ static std::array<Key128, 0x20> FindEncryptedMasterKeyFromHex(const std::vector<
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir,
|
static FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir,
|
||||||
const std::string& name) {
|
const std::string& name) {
|
||||||
const auto upper = Common::ToUpper(name);
|
const auto upper = Common::ToUpper(name);
|
||||||
|
|
||||||
for (const auto& fname : {name, name + ".bin", upper, upper + ".BIN"}) {
|
for (const auto& fname : {name, name + ".bin", upper, upper + ".BIN"}) {
|
||||||
@ -345,8 +345,7 @@ FileSys::VirtualFile PartitionDataManager::GetPackage2Raw(Package2Type type) con
|
|||||||
return package2.at(static_cast<size_t>(type));
|
return package2.at(static_cast<size_t>(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) {
|
static bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) {
|
||||||
|
|
||||||
const std::vector<u8> iv(header.header_ctr.begin(), header.header_ctr.end());
|
const std::vector<u8> iv(header.header_ctr.begin(), header.header_ctr.end());
|
||||||
Package2Header temp = header;
|
Package2Header temp = header;
|
||||||
AESCipher<Key128> cipher(key, Mode::CTR);
|
AESCipher<Key128> cipher(key, Mode::CTR);
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "core/hle/service/bcat/backend/boxcat.h"
|
#include "core/hle/service/bcat/backend/boxcat.h"
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
|
|
||||||
|
namespace Service::BCAT {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// Prevents conflicts with windows macro called CreateFile
|
// Prevents conflicts with windows macro called CreateFile
|
||||||
@ -30,10 +31,6 @@ bool VfsDeleteFileWrap(FileSys::VirtualDir dir, std::string_view name) {
|
|||||||
return dir->DeleteFile(name);
|
return dir->DeleteFile(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Anonymous namespace
|
|
||||||
|
|
||||||
namespace Service::BCAT {
|
|
||||||
|
|
||||||
constexpr ResultCode ERROR_GENERAL_BCAT_FAILURE{ErrorModule::BCAT, 1};
|
constexpr ResultCode ERROR_GENERAL_BCAT_FAILURE{ErrorModule::BCAT, 1};
|
||||||
|
|
||||||
constexpr char BOXCAT_HOSTNAME[] = "api.yuzu-emu.org";
|
constexpr char BOXCAT_HOSTNAME[] = "api.yuzu-emu.org";
|
||||||
@ -90,8 +87,6 @@ constexpr u32 PORT = 443;
|
|||||||
constexpr u32 TIMEOUT_SECONDS = 30;
|
constexpr u32 TIMEOUT_SECONDS = 30;
|
||||||
[[maybe_unused]] constexpr u64 VFS_COPY_BLOCK_SIZE = 1ULL << 24; // 4MB
|
[[maybe_unused]] constexpr u64 VFS_COPY_BLOCK_SIZE = 1ULL << 24; // 4MB
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
std::string GetBINFilePath(u64 title_id) {
|
std::string GetBINFilePath(u64 title_id) {
|
||||||
return fmt::format("{}bcat/{:016X}/launchparam.bin",
|
return fmt::format("{}bcat/{:016X}/launchparam.bin",
|
||||||
FileUtil::GetUserPath(FileUtil::UserPath::CacheDir), title_id);
|
FileUtil::GetUserPath(FileUtil::UserPath::CacheDir), title_id);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "core/crypto/key_manager.h"
|
#include "core/crypto/key_manager.h"
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
|
#include "core/hle/service/es/es.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
namespace Service::ES {
|
namespace Service::ES {
|
||||||
|
@ -14,13 +14,14 @@
|
|||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
// Numbers are chosen randomly to make sure the correct one is given.
|
// Numbers are chosen randomly to make sure the correct one is given.
|
||||||
static constexpr std::array<u64, 5> CB_IDS{{42, 144, 93, 1026, UINT64_C(0xFFFF7FFFF7FFFF)}};
|
constexpr std::array<u64, 5> CB_IDS{{42, 144, 93, 1026, UINT64_C(0xFFFF7FFFF7FFFF)}};
|
||||||
static constexpr int MAX_SLICE_LENGTH = 10000; // Copied from CoreTiming internals
|
constexpr int MAX_SLICE_LENGTH = 10000; // Copied from CoreTiming internals
|
||||||
|
|
||||||
static std::bitset<CB_IDS.size()> callbacks_ran_flags;
|
std::bitset<CB_IDS.size()> callbacks_ran_flags;
|
||||||
static u64 expected_callback = 0;
|
u64 expected_callback = 0;
|
||||||
static s64 lateness = 0;
|
s64 lateness = 0;
|
||||||
|
|
||||||
template <unsigned int IDX>
|
template <unsigned int IDX>
|
||||||
void CallbackTemplate(u64 userdata, s64 cycles_late) {
|
void CallbackTemplate(u64 userdata, s64 cycles_late) {
|
||||||
@ -31,7 +32,7 @@ void CallbackTemplate(u64 userdata, s64 cycles_late) {
|
|||||||
REQUIRE(lateness == cycles_late);
|
REQUIRE(lateness == cycles_late);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u64 callbacks_done = 0;
|
u64 callbacks_done = 0;
|
||||||
|
|
||||||
void EmptyCallback(u64 userdata, s64 cycles_late) {
|
void EmptyCallback(u64 userdata, s64 cycles_late) {
|
||||||
++callbacks_done;
|
++callbacks_done;
|
||||||
@ -48,8 +49,8 @@ struct ScopeInit final {
|
|||||||
Core::Timing::CoreTiming core_timing;
|
Core::Timing::CoreTiming core_timing;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void AdvanceAndCheck(Core::Timing::CoreTiming& core_timing, u32 idx, u32 context = 0,
|
void AdvanceAndCheck(Core::Timing::CoreTiming& core_timing, u32 idx, u32 context = 0,
|
||||||
int expected_lateness = 0, int cpu_downcount = 0) {
|
int expected_lateness = 0, int cpu_downcount = 0) {
|
||||||
callbacks_ran_flags = 0;
|
callbacks_ran_flags = 0;
|
||||||
expected_callback = CB_IDS[idx];
|
expected_callback = CB_IDS[idx];
|
||||||
lateness = expected_lateness;
|
lateness = expected_lateness;
|
||||||
@ -62,6 +63,7 @@ static void AdvanceAndCheck(Core::Timing::CoreTiming& core_timing, u32 idx, u32
|
|||||||
|
|
||||||
REQUIRE(decltype(callbacks_ran_flags)().set(idx) == callbacks_ran_flags);
|
REQUIRE(decltype(callbacks_ran_flags)().set(idx) == callbacks_ran_flags);
|
||||||
}
|
}
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
TEST_CASE("CoreTiming[BasicOrder]", "[core]") {
|
TEST_CASE("CoreTiming[BasicOrder]", "[core]") {
|
||||||
ScopeInit guard;
|
ScopeInit guard;
|
||||||
|
@ -28,7 +28,7 @@ void Fermi2D::CallMethod(const GPU::MethodCall& method_call) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<u32, u32> DelimitLine(u32 src_1, u32 src_2, u32 dst_1, u32 dst_2, u32 src_line) {
|
static std::pair<u32, u32> DelimitLine(u32 src_1, u32 src_2, u32 dst_1, u32 dst_2, u32 src_line) {
|
||||||
const u32 line_a = src_2 - src_1;
|
const u32 line_a = src_2 - src_1;
|
||||||
const u32 line_b = dst_2 - dst_1;
|
const u32 line_b = dst_2 - dst_1;
|
||||||
const u32 excess = std::max<s32>(0, line_a - src_line + src_1);
|
const u32 excess = std::max<s32>(0, line_a - src_line + src_1);
|
||||||
|
@ -587,8 +587,6 @@ bool TryQuery(CFGRebuildState& state) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Anonymous namespace
|
|
||||||
|
|
||||||
void InsertBranch(ASTManager& mm, const BlockBranchInfo& branch_info) {
|
void InsertBranch(ASTManager& mm, const BlockBranchInfo& branch_info) {
|
||||||
const auto get_expr = ([&](const Condition& cond) -> Expr {
|
const auto get_expr = ([&](const Condition& cond) -> Expr {
|
||||||
Expr result{};
|
Expr result{};
|
||||||
@ -655,6 +653,8 @@ void DecompileShader(CFGRebuildState& state) {
|
|||||||
state.manager->Decompile();
|
state.manager->Decompile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, u32 start_address,
|
std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, u32 start_address,
|
||||||
const CompilerSettings& settings,
|
const CompilerSettings& settings,
|
||||||
Registry& registry) {
|
Registry& registry) {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "video_core/textures/texture.h"
|
#include "video_core/textures/texture.h"
|
||||||
|
|
||||||
namespace Tegra::Texture {
|
namespace Tegra::Texture {
|
||||||
|
namespace {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This table represents the internal swizzle of a gob,
|
* This table represents the internal swizzle of a gob,
|
||||||
@ -174,6 +175,8 @@ void SwizzledData(u8* const swizzled_data, u8* const unswizzled_data, const bool
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
void CopySwizzledData(u32 width, u32 height, u32 depth, u32 bytes_per_pixel,
|
void CopySwizzledData(u32 width, u32 height, u32 depth, u32 bytes_per_pixel,
|
||||||
u32 out_bytes_per_pixel, u8* const swizzled_data, u8* const unswizzled_data,
|
u32 out_bytes_per_pixel, u8* const swizzled_data, u8* const unswizzled_data,
|
||||||
bool unswizzle, u32 block_height, u32 block_depth, u32 width_spacing) {
|
bool unswizzle, u32 block_height, u32 block_depth, u32 width_spacing) {
|
||||||
|
@ -56,8 +56,7 @@ void UnswizzleSubrect(u32 subrect_width, u32 subrect_height, u32 dest_pitch, u32
|
|||||||
u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data, u32 block_height,
|
u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data, u32 block_height,
|
||||||
u32 offset_x, u32 offset_y);
|
u32 offset_x, u32 offset_y);
|
||||||
|
|
||||||
void SwizzleKepler(const u32 width, const u32 height, const u32 dst_x, const u32 dst_y,
|
void SwizzleKepler(u32 width, u32 height, u32 dst_x, u32 dst_y, u32 block_height,
|
||||||
const u32 block_height, const std::size_t copy_size, const u8* source_data,
|
std::size_t copy_size, const u8* source_data, u8* swizzle_data);
|
||||||
u8* swizzle_data);
|
|
||||||
|
|
||||||
} // namespace Tegra::Texture
|
} // namespace Tegra::Texture
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "yuzu/applets/profile_select.h"
|
#include "yuzu/applets/profile_select.h"
|
||||||
#include "yuzu/main.h"
|
#include "yuzu/main.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
QString FormatUserEntryText(const QString& username, Common::UUID uuid) {
|
QString FormatUserEntryText(const QString& username, Common::UUID uuid) {
|
||||||
return QtProfileSelectionDialog::tr(
|
return QtProfileSelectionDialog::tr(
|
||||||
"%1\n%2", "%1 is the profile username, %2 is the formatted UUID (e.g. "
|
"%1\n%2", "%1 is the profile username, %2 is the formatted UUID (e.g. "
|
||||||
@ -41,6 +42,7 @@ QPixmap GetIcon(Common::UUID uuid) {
|
|||||||
|
|
||||||
return icon.scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
return icon.scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
}
|
}
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
QtProfileSelectionDialog::QtProfileSelectionDialog(QWidget* parent)
|
QtProfileSelectionDialog::QtProfileSelectionDialog(QWidget* parent)
|
||||||
: QDialog(parent), profile_manager(std::make_unique<Service::Account::ProfileManager>()) {
|
: QDialog(parent), profile_manager(std::make_unique<Service::Account::ProfileManager>()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user