Path: blob/a-new-beginning/SharedDependencies/Sources/microprofile/include/microprofile.h
2 views
#pragma once1// MIT License2//3// Copyright (c) 2023 Jonas Meyer4//5// Permission is hereby granted, free of charge, to any person obtaining a copy6// of this software and associated documentation files (the "Software"), to deal7// in the Software without restriction, including without limitation the rights8// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9// copies of the Software, and to permit persons to whom the Software is10// furnished to do so, subject to the following conditions:11//12// The above copyright notice and this permission notice shall be included in all13// copies or substantial portions of the Software.14//15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21// SOFTWARE.22// ***********************************************************************2324#ifndef MICROPROFILE_USE_CONFIG25#define MICROPROFILE_USE_CONFIG 026#endif2728#if MICROPROFILE_USE_CONFIG29#include "microprofile.config.h"30#endif3132#ifndef MICROPROFILE_ENABLED33#define MICROPROFILE_ENABLED 134#endif3536#ifndef MICROPROFILE_DYNAMIC_INSTRUMENT37#if(defined(__APPLE__) && defined(__MACH__)) || (defined(_WIN32) && defined(_M_X64)) || (defined(__unix__) && defined(__x86_64__))38#ifdef MICROPROFILE_DYNAMIC_INSTRUMENT_ENABLE39#define MICROPROFILE_DYNAMIC_INSTRUMENT 140#endif41#endif42#endif4344#ifndef MICROPROFILE_DYNAMIC_INSTRUMENT45#define MICROPROFILE_DYNAMIC_INSTRUMENT 046#endif4748#ifndef MICROPROFILE_GPU_TIMERS_D3D1149#define MICROPROFILE_GPU_TIMERS_D3D11 050#endif5152#ifndef MICROPROFILE_GPU_TIMERS_GL53#define MICROPROFILE_GPU_TIMERS_GL 054#endif5556#ifndef MICROPROFILE_GPU_TIMERS_D3D1257#define MICROPROFILE_GPU_TIMERS_D3D12 058#endif5960#ifndef MICROPROFILE_BIG_ENDIAN61#define MICROPROFILE_BIG_ENDIAN 062#endif6364#ifndef MICROPROFILE_GPU_TIMERS_VULKAN65#define MICROPROFILE_GPU_TIMERS_VULKAN 066#endif6768#ifndef MICROPROFILE_LEGACY_CSV // set this if you rely on the legacy csv dump format. (single file with multiple csv sections)69#define MICROPROFILE_LEGACY_CSV 070#endif7172#ifndef MICROPROFILE_FRAME_EXTRA_DATA // Set this to always allocate frame extra data. This is useful if you're doing profiling on platform where there is plenty of memory.73#define MICROPROFILE_FRAME_EXTRA_DATA 074#endif7576#ifndef MICROPROFILE_IMGUI77#define MICROPROFILE_IMGUI 078#endif7980#ifndef MICROPROFILE_VERIFY_BALANCED81#define MICROPROFILE_VERIFY_BALANCED 082#endif8384#ifndef MICROPROFILE_ONCE85#define MICROPROFILE_ONCE8687#include <stdint.h>8889typedef uint64_t MicroProfileToken;90typedef uint16_t MicroProfileGroupId;91typedef uint32_t MicroProfileTimelineToken;9293#if 0 == MICROPROFILE_ENABLED9495#define MICROPROFILE_DECLARE(var)96#define MICROPROFILE_DEFINE(var, group, name, color)97#define MICROPROFILE_REGISTER_GROUP(group, color, category)98#define MICROPROFILE_DECLARE_GPU(var)99#define MICROPROFILE_DEFINE_GPU(var, name, color)100#define MICROPROFILE_SCOPE(var) \101do \102{ \103} while(0)104#define MICROPROFILE_SCOPEI(group, name, color) \105do \106{ \107} while(0)108#define MICROPROFILE_SCOPE_CSTR(cstr) \109do \110{ \111} while(0)112#define MICROPROFILE_SCOPE_TOKEN(token) \113do \114{ \115} while(0)116#define MICROPROFILE_SCOPEGPU_TOKEN(token)117#define MICROPROFILE_SCOPEGPU(var) \118do \119{ \120} while(0)121#define MICROPROFILE_SCOPEGPUI(name, color) \122do \123{ \124} while(0)125#define MICROPROFILE_SCOPEGPU_CSTR(cstr) \126do \127{ \128} while(0)129#define MICROPROFILE_SCOPEGPU_TOKEN_L(Log, token) \130do \131{ \132} while(0)133#define MICROPROFILE_SCOPEGPU_L(Log, var) \134do \135{ \136} while(0)137#define MICROPROFILE_SCOPEGPUI_L(Log, name, color) \138do \139{ \140} while(0)141#define MICROPROFILE_SCOPEGPU_CSTR_L(Log, cstr) \142do \143{ \144} while(0)145#define MICROPROFILE_SECTIONGPU_TOKEN(token) \146do \147{ \148} while(0)149#define MICROPROFILE_SECTIONGPU(var) \150do \151{ \152} while(0)153#define MICROPROFILE_SECTIONGPUI(name, color) \154do \155{ \156} while(0)157#define MICROPROFILE_SECTIONGPU_TOKEN_L(Log, token) \158do \159{ \160} while(0)161#define MICROPROFILE_SECTIONGPU_L(Log, var) \162do \163{ \164} while(0)165#define MICROPROFILE_SECTIONGPUI_L(Log, name, color) \166do \167{ \168} while(0)169170#define MICROPROFILE_CONDITIONAL_SCOPEI(condition, group, name, color) \171do \172{ \173} while(0)174#define MICROPROFILE_ENTER(var) \175do \176{ \177} while(0)178#define MICROPROFILE_ENTER_TOKEN(var) \179do \180{ \181} while(0)182#define MICROPROFILE_ENTERI(group, name, color) \183do \184{ \185} while(0)186#define MICROPROFILE_LEAVE() \187do \188{ \189} while(0)190191#define MICROPROFILE_GPU_ENTER(var) \192do \193{ \194} while(0)195#define MICROPROFILE_GPU_ENTER_TOKEN(token) \196do \197{ \198} while(0)199#define MICROPROFILE_GPU_ENTERI(group, name, color) \200do \201{ \202} while(0)203#define MICROPROFILE_GPU_LEAVE() \204do \205{ \206} while(0)207#define MICROPROFILE_GPU_ENTER_L(Log, var) \208do \209{ \210} while(0)211#define MICROPROFILE_GPU_ENTER_TOKEN_L(Log, token) \212do \213{ \214} while(0)215#define MICROPROFILE_GPU_ENTERI_L(Log, name, color) \216do \217{ \218} while(0)219#define MICROPROFILE_GPU_LEAVE_L(Log) \220do \221{ \222} while(0)223#define MICROPROFILE_GPU_INIT_QUEUE(QueueName) \224do \225{ \226} while(0)227#define MICROPROFILE_GPU_GET_QUEUE(QueueName) \228do \229{ \230} while(0)231#define MICROPROFILE_GPU_BEGIN(pContext, pLog) \232do \233{ \234} while(0)235#define MICROPROFILE_GPU_SET_CONTEXT(pContext, pLog) \236do \237{ \238} while(0)239#define MICROPROFILE_GPU_END(pLog) 0240#define MICROPROFILE_GPU_SUBMIT(Queue, Work) \241do \242{ \243} while(0)244245#define MICROPROFILE_TIMELINE_TOKEN(token) \246do \247{ \248} while(0)249#define MICROPROFILE_TIMELINE_ENTER(token, color, name) \250do \251{ \252} while(0)253#define MICROPROFILE_TIMELINE_ENTERF(token, color, fmt, ...) \254do \255{ \256} while(0)257#define MICROPROFILE_TIMELINE_LEAVE(token) \258do \259{ \260} while(0)261#define MICROPROFILE_TIMELINE_ENTER_STATIC(color, name) \262do \263{ \264} while(0)265#define MICROPROFILE_TIMELINE_LEAVE_STATIC(name) \266do \267{ \268} while(0)269#define MICROPROFILE_TIMELINE_SCOPE(...) \270do \271{ \272} while(0)273#define MICROPROFILE_THREADLOGGPURESET(a) \274do \275{ \276} while(0)277#define MICROPROFILE_META_CPU(name, count)278#define MICROPROFILE_META_GPU(name, count)279#define MICROPROFILE_FORCEENABLECPUGROUP(s) \280do \281{ \282} while(0)283#define MICROPROFILE_FORCEDISABLECPUGROUP(s) \284do \285{ \286} while(0)287#define MICROPROFILE_FORCEENABLEGPUGROUP(s) \288do \289{ \290} while(0)291#define MICROPROFILE_FORCEDISABLEGPUGROUP(s) \292do \293{ \294} while(0)295#define MICROPROFILE_COUNTER_ADD(name, count) \296do \297{ \298} while(0)299#define MICROPROFILE_COUNTER_SUB(name, count) \300do \301{ \302} while(0)303#define MICROPROFILE_COUNTER_SET(name, count) \304do \305{ \306} while(0)307#define MICROPROFILE_COUNTER_SET_DOUBLE(name, count) \308do \309{ \310} while(0)311#define MICROPROFILE_COUNTER_SET_INT32_PTR(name, ptr) \312do \313{ \314} while(0)315#define MICROPROFILE_COUNTER_SET_INT64_PTR(name, ptr) \316do \317{ \318} while(0)319#define MICROPROFILE_COUNTER_CLEAR_PTR(name) \320do \321{ \322} while(0)323#define MICROPROFILE_COUNTER_SET_LIMIT(name, count) \324do \325{ \326} while(0)327#define MICROPROFILE_CONDITIONAL(expr)328#define MICROPROFILE_COUNTER_CONFIG(name, type, limit, flags)329#define MICROPROFILE_COUNTER_CONFIG_ONCE(name, type, limit, flags)330#define MICROPROFILE_DECLARE_LOCAL_COUNTER(var)331#define MICROPROFILE_DEFINE_LOCAL_COUNTER(var, name)332#define MICROPROFILE_DECLARE_LOCAL_ATOMIC_COUNTER(var)333#define MICROPROFILE_DEFINE_LOCAL_ATOMIC_COUNTER(var, name)334#define MICROPROFILE_COUNTER_LOCAL_ADD(var, count) \335do \336{ \337} while(0)338#define MICROPROFILE_COUNTER_LOCAL_SUB(var, count) \339do \340{ \341} while(0)342#define MICROPROFILE_COUNTER_LOCAL_SET(var, count) \343do \344{ \345} while(0)346#define MICROPROFILE_COUNTER_LOCAL_UPDATE_ADD(var) \347do \348{ \349} while(0)350#define MICROPROFILE_COUNTER_LOCAL_UPDATE_SET(var) \351do \352{ \353} while(0)354#define MICROPROFILE_COUNTER_LOCAL_ADD_ATOMIC(var, count) \355do \356{ \357} while(0)358#define MICROPROFILE_COUNTER_LOCAL_SUB_ATOMIC(var, count) \359do \360{ \361} while(0)362#define MICROPROFILE_COUNTER_LOCAL_SET_ATOMIC(var, count) \363do \364{ \365} while(0)366#define MICROPROFILE_COUNTER_LOCAL_UPDATE_ADD_ATOMIC(var) \367do \368{ \369} while(0)370#define MICROPROFILE_COUNTER_LOCAL_UPDATE_SET_ATOMIC(var) \371do \372{ \373} while(0)374375#define MICROPROFILE_COUNTER_GET_TOKEN(name, f) 0376#define MICROPROFILE_COUNTER_TOKEN_ADD(v, count) do{}while(0)377#define MICROPROFILE_COUNTER_TOKEN_SUB(v, count) do{}while(0)378#define MICROPROFILE_COUNTER_TOKEN_SET(v, count) do{}while(0)379380381#define MicroProfileStartAutoFlip(nHz) \382do \383{ \384} while(0)385#define MicroProfileStopAutoFlip() \386do \387{ \388} while(0)389#define MicroProfileEnableFrameExtraCounterData() \390do \391{ \392} while(0)393#define MicroProfileGetTime(group, name) 0.f394#define MicroProfileOnThreadCreate(foo) \395do \396{ \397} while(0)398#define MicroProfileOnThreadExit() \399do \400{ \401} while(0)402#define MicroProfileFlip(...) \403do \404{ \405} while(0)406#define MicroProfileFlip_CB(pContext, FreezeCB, Flag) \407do \408{ \409} while(0)410#define MicroProfileSetAggregateFrames(a) \411do \412{ \413} while(0)414#define MicroProfileGetAggregateFrames() 0415#define MicroProfileGetCurrentAggregateFrames() 0416#define MicroProfileTogglePause() \417do \418{ \419} while(0)420#define MicroProfileToggleAllGroups() \421do \422{ \423} while(0)424#define MicroProfileDumpTimers() \425do \426{ \427} while(0)428#define MicroProfileShutdown() \429do \430{ \431} while(0)432#define MicroProfileSetForceEnable(a) \433do \434{ \435} while(0)436#define MicroProfileGetForceEnable() false437#define MicroProfileSetEnableAllGroups(b) \438do \439{ \440} while(0)441#define MicroProfileEnableCategory(a) \442do \443{ \444} while(0)445#define MicroProfileDisableCategory(a) \446do \447{ \448} while(0)449#define MicroProfileGetEnableAllGroups() false450#define MicroProfileSetForceMetaCounters(a)451#define MicroProfileGetForceMetaCounters() 0452#define MicroProfileEnableMetaCounter(c) \453do \454{ \455} while(0)456#define MicroProfileDisableMetaCounter(c) \457do \458{ \459} while(0)460#define MicroProfileDumpFile(...) \461do \462{ \463} while(0)464#define MicroProfileDumpFileImmediately(...) \465do \466{ \467} while(0)468#define MicroProfileStartContextSwitchTrace() \469do \470{ \471} while(0)472#define MicroProfileGpuInsertTimeStamp(a) 1473#define MicroProfileGpuGetTimeStamp(a) 0474#define MicroProfileTicksPerSecondGpu() 1475#define MicroProfileGetGpuTickReference(a, b) 0476#define MicroProfileGpuInitD3D12(pDevice, nNodeCount, pCommandQueue, pCopyQueue) \477do \478{ \479} while(0)480#define MicroProfileGpuInitD3D11(pDevice, pDeviceContext) \481do \482{ \483} while(0)484#define MicroProfileGpuShutdown() \485do \486{ \487} while(0)488#define MicroProfileGpuShutdownPlatform() \489do \490{ \491} while(0)492#define MicroProfileGpuInitGL() \493do \494{ \495} while(0)496#define MicroProfileSetCurrentNodeD3D12(nNode) \497do \498{ \499} while(0)500#define MicroProfilePlatformMarkersGetEnabled() 0501#define MicroProfilePlatformMarkersSetEnabled(bEnabled) \502do \503{ \504} while(0)505#define MicroProfileTickToMsMultiplierCpu() 1.f506#define MicroProfileTickToMsMultiplierGpu() 0.f507#define MicroProfileTicksPerSecondCpu() 1508#define MicroProfileTick() 0509#define MicroProfileEnabled() 0510511#define MicroProfileCounterString nullptr512#define MicroProfileCounterTokenTree 0513#define MicroProfileCounterTokenTreeDynamic 0514515#define MicroProfileCsvConfigEnd()516#define MicroProfileCsvConfigBegin(...)517#define MicroProfileCsvConfigAddTimer(...)518#define MicroProfileCsvConfigAddGroup(...)519#define MicroProfileCsvConfigAddCounter(...)520#define MicroProfileUpdateSettingsPath(...)521522#define MicroProfileImguiGraphs(...) \523do \524{ \525} while(0)526#define MicroProfileImguiTable(...) \527do \528{ \529} while(0)530#define MicroProfileImguiControls(...) \531do \532{ \533} while(0)534535#else536537#include <stdint.h>538539#ifdef MICROPROFILE_EXPORT540#include "microprofile.export.h"541#else542#ifndef MICROPROFILE_API543#define MICROPROFILE_API544#endif545#endif546547#ifdef MICROPROFILE_PS4548#include "microprofile_ps4.h"549#endif550#ifdef MICROPROFILE_XBOXONE551#include "microprofile_xboxone.h"552#endif553554#ifdef _WIN32555typedef uint32_t MicroProfileThreadIdType;556#else557#ifdef MICROPROFILE_THREADID_SIZE_4BYTE558typedef uint32_t MicroProfileThreadIdType;559#elif MICROPROFILE_THREADID_SIZE_8BYTE560typedef uint64_t MicroProfileThreadIdType;561#else562typedef uint64_t MicroProfileThreadIdType;563#endif564#endif565566typedef void (*MicroProfileOnFreeze)(int nFrozen);567568#define MICROPROFILE_TOKEN_PASTE0(a, b) a##b569#define MICROPROFILE_TOKEN_PASTE(a, b) MICROPROFILE_TOKEN_PASTE0(a, b)570571#define MICROPROFILE_DECLARE(var) extern MicroProfileToken g_mp_##var572#define MICROPROFILE_DECLARE_GPU(var) extern MicroProfileToken g_mpGPU_##var573574#define MICROPROFILE_DECLARE_SECTION(var) extern MicroProfileToken g_mp_##var575#define MICROPROFILE_DECLARE_SECTION_GPU(var) extern MicroProfileToken g_mpGPU_##var576577#define MICROPROFILE_DEFINE(var, group, name, color) MicroProfileToken g_mp_##var = MicroProfileGetToken(group, name, color, MicroProfileTokenTypeCpu, 0)578#define MICROPROFILE_DEFINE_GPU(var, name, color) MicroProfileToken g_mpGPU_##var = MicroProfileGetToken("GPU", name, color, MicroProfileTokenTypeGpu, 0)579580#define MICROPROFILE_DEFINE_SECTION(var, name, color) MicroProfileToken g_mp_##var = MicroProfileGetToken("__SECTION", name, color, MicroProfileTokenTypeCpu, MICROPROFILE_TIMER_FLAG_SECTION)581#define MICROPROFILE_DEFINE_SECTION_GPU(var, name, color) MicroProfileToken g_mpGPU_##var = MicroProfileGetToken("GPU", name, color, MicroProfileTokenTypeGpu, MICROPROFILE_TIMER_FLAG_SECTION)582583#define MICROPROFILE_REGISTER_GROUP(group, category, color) MicroProfileRegisterGroup(group, category, color)584585#define MICROPROFILE_SCOPE(var) MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(g_mp_##var)586#define MICROPROFILE_SCOPE_TOKEN(token) MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(token)587#define MICROPROFILE_SCOPEI(group, name, color) \588static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__) = MicroProfileGetToken(group, name, color, MicroProfileTokenTypeCpu, 0); \589MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__))590#define MICROPROFILE_SCOPE_CSTR(CStr) MicroProfileScopeHandlerCStr MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(CStr)591592#define MICROPROFILE_SECTION(var) MICROPROFILE_SCOPE(var)593#define MICROPROFILE_SECTIONI(name, color) \594static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__) = MicroProfileGetToken("__SECTION", name, color, MicroProfileTokenTypeCpu, MICROPROFILE_TIMER_FLAG_SECTION); \595MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__))596597#define MICROPROFILE_SCOPEGPU_TOKEN(token) MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(token, MicroProfileGetGlobalGpuThreadLog())598#define MICROPROFILE_SCOPEGPU(var) MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(g_mpGPU_##var, MicroProfileGetGlobalGpuThreadLog())599#define MICROPROFILE_SCOPEGPUI(name, color) \600static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__) = MicroProfileGetToken("GPU", name, color, MicroProfileTokenTypeGpu, 0); \601MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__), MicroProfileGetGlobalGpuThreadLog())602#define MICROPROFILE_SCOPEGPU_CSTR(CStr) MicroProfileScopeGpuHandlerCStr MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(CStr, MicroProfileGetGlobalGpuThreadLog())603604#define MICROPROFILE_SCOPEGPU_TOKEN_L(Log, token) MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(token, Log)605#define MICROPROFILE_SCOPEGPU_L(Log, var) MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(g_mpGPU_##var, Log)606#define MICROPROFILE_SCOPEGPUI_L(Log, name, color) \607static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__) = MicroProfileGetToken("GPU", name, color, MicroProfileTokenTypeGpu, 0); \608MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__), Log)609#define MICROPROFILE_SCOPEGPU_CSTR_L(Log, CStr) MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(CStr, Log)610611#define MICROPROFILE_SECTIONGPU_TOKEN(token) MICROPROFILE_SCOPEGPU_TOKEN(token)612#define MICROPROFILE_SECTIONGPU(var) MICROPROFILE_SCOPEGPU(var)613#define MICROPROFILE_SECTIONGPUI(name, color) \614static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__) = MicroProfileGetToken("__SECTIONGPU", name, color, MicroProfileTokenTypeGpu, MICROPROFILE_TIMER_FLAG_SECTION); \615MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__))616617#define MICROPROFILE_SECTIONGPU_TOKEN_L(Log, token) MICROPROFILE_SCOPEGPU_TOKEN_L(token, Log)618#define MICROPROFILE_SECTIONGPU_L(Log, var) MICROPROFILE_SCOPEGPU_L(var, Log)619#define MICROPROFILE_SECTIONGPUI_L(Log, name, color) \620static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__) = MicroProfileGetToken("__SECTIONGPU", name, color, MicroProfileTokenTypeGpu, MICROPROFILE_TIMER_FLAG_SECTION); \621MicroProfileScopeGpuHandler MICROPROFILE_TOKEN_PASTE(fooGPU, __LINE__)(MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__), Log)622623#define MICROPROFILE_CONDITIONAL_SCOPEI(condition, group, name, color) \624static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__) = MicroProfileGetToken(group, name, color, MicroProfileTokenTypeCpu, 0); \625MicroProfileConditionalScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__), condition)626#define MICROPROFILE_ENTER(var) MicroProfileEnter(g_mp_##var)627#define MICROPROFILE_ENTER_TOKEN(token) MicroProfileEnter(token)628#define MICROPROFILE_ENTERI(group, name, color) \629static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__) = MICROPROFILE_INVALID_TOKEN; \630if(MICROPROFILE_INVALID_TOKEN == MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__)) \631{ \632MicroProfileGetTokenC(&MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__), group, name, color, MicroProfileTokenTypeCpu, 0); \633} \634MicroProfileEnter(MICROPROFILE_TOKEN_PASTE(g_mp, __LINE__))635#define MICROPROFILE_LEAVE() MicroProfileLeave()636637#define MICROPROFILE_GPU_ENTER(var) MicroProfileEnterGpu(g_mpGPU_##var, MicroProfileGetGlobalGpuThreadLog())638#define MICROPROFILE_GPU_ENTER_TOKEN(token) MicroProfileEnterGpu(token, MicroProfileGetGlobalGpuThreadLog())639#define MICROPROFILE_GPU_ENTERI(group, name, color) \640static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__) = MICROPROFILE_INVALID_TOKEN; \641if(MICROPROFILE_INVALID_TOKEN == MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__)) \642{ \643MicroProfileGetTokenC(&MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__), group, name, color, MicroProfileTokenTypeGpu, 0); \644} \645MicroProfileEnterGpu(MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__), MicroProfileGetGlobalGpuThreadLog())646#define MICROPROFILE_GPU_LEAVE() MicroProfileLeaveGpu(MicroProfileGetGlobalGpuThreadLog())647#define MICROPROFILE_GPU_ENTER_L(Log, var) MicroProfileEnterGpu(g_mpGPU_##var, Log)648#define MICROPROFILE_GPU_ENTER_TOKEN_L(Log, token) MicroProfileEnterGpu(token, Log)649#define MICROPROFILE_GPU_ENTERI_L(Log, name, color) \650static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__) = MICROPROFILE_INVALID_TOKEN; \651if(MICROPROFILE_INVALID_TOKEN == MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__)) \652{ \653MicroProfileGetTokenC(&MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__), group, name, color, MicroProfileTokenTypeGpu, 0); \654} \655MicroProfileEnterGpu(MICROPROFILE_TOKEN_PASTE(g_mpGPU, __LINE__), Log)656#define MICROPROFILE_GPU_LEAVE_L(Log) MicroProfileLeaveGpu(Log)657#define MICROPROFILE_GPU_INIT_QUEUE(QueueName) MicroProfileInitGpuQueue(QueueName)658#define MICROPROFILE_GPU_FREE_QUEUE(QueueName) MicroProfileFreeGpuQueue(QueueName)659#define MICROPROFILE_GPU_GET_QUEUE(QueueName) MicroProfileGetGpuQueue(QueueName)660#define MICROPROFILE_GPU_BEGIN(pContext, pLog) MicroProfileGpuBegin(pContext, pLog)661#define MICROPROFILE_GPU_SET_CONTEXT(pContext, pLog) MicroProfileGpuSetContext(pContext, pLog)662#define MICROPROFILE_GPU_END(pLog) MicroProfileGpuEnd(pLog)663#define MICROPROFILE_GPU_SUBMIT(Queue, Work) MicroProfileGpuSubmit(Queue, Work)664#define MICROPROFILE_TIMELINE_TOKEN(token) MicroProfileTimelineToken token = 0665#define MICROPROFILE_TIMELINE_ENTER(token, color, name) token = MicroProfileTimelineEnter(color, name)666#define MICROPROFILE_TIMELINE_ENTERF(token, color, fmt, ...) token = MicroProfileTimelineEnterf(color, fmt, ##__VA_ARGS__)667#define MICROPROFILE_TIMELINE_LEAVE(token) \668do \669{ \670if(token) \671{ \672MicroProfileTimelineLeave(token); \673} \674} while(0)675// use only with static string literals676#define MICROPROFILE_TIMELINE_ENTER_STATIC(color, name) MicroProfileTimelineEnterStatic(color, name)677// use only with static string literals678#define MICROPROFILE_TIMELINE_LEAVE_STATIC(name) MicroProfileTimelineLeaveStatic(name)679#define MICROPROFILE_TIMELINE_SCOPE(color, fmt, ...) \680MicroProfileTimelineToken MICROPROFILE_TOKEN_PASTE(__timeline__, __LINE__) = MicroProfileTimelineEnterf(color, fmt, ##__VA_ARGS__); \681MicroProfileScopeTimelineExitHandler MICROPROFILE_TOKEN_PASTE(__timeline__0, __LINE__)(MICROPROFILE_TOKEN_PASTE(__timeline__, __LINE__))682683#define MICROPROFILE_THREADLOGGPURESET(a) MicroProfileThreadLogGpuReset(a)684#define MICROPROFILE_META_CPU(name, count) \685do \686{ \687} while(0) // static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp_meta,__LINE__) = MicroProfileGetMetaToken(name); MicroProfileMetaUpdate(MICROPROFILE_TOKEN_PASTE(g_mp_meta,__LINE__), count,688// MicroProfileTokenTypeCpu)689#define MICROPROFILE_COUNTER_ADD(name, count) \690static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp_counter, __LINE__) = MicroProfileGetCounterToken(name, 0); \691MicroProfileCounterAdd(MICROPROFILE_TOKEN_PASTE(g_mp_counter, __LINE__), count)692#define MICROPROFILE_COUNTER_SUB(name, count) \693static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp_counter, __LINE__) = MicroProfileGetCounterToken(name, 0); \694MicroProfileCounterAdd(MICROPROFILE_TOKEN_PASTE(g_mp_counter, __LINE__), -(int64_t)count)695#define MICROPROFILE_COUNTER_SET(name, count) \696static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp_counter_set, __LINE__) = MicroProfileGetCounterToken(name, 0); \697MicroProfileCounterSet(MICROPROFILE_TOKEN_PASTE(g_mp_counter_set, __LINE__), count)698#define MICROPROFILE_COUNTER_SET_DOUBLE(name, count) \699static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp_counter_set, __LINE__) = MicroProfileGetCounterToken(name, MICROPROFILE_COUNTER_FLAG_DOUBLE); \700MicroProfileCounterSetDouble(MICROPROFILE_TOKEN_PASTE(g_mp_counter_set, __LINE__), count)701#define MICROPROFILE_COUNTER_SET_INT32_PTR(name, ptr) MicroProfileCounterSetPtr(name, ptr, sizeof(int32_t))702#define MICROPROFILE_COUNTER_SET_INT64_PTR(name, ptr) MicroProfileCounterSetPtr(name, ptr, sizeof(int64_t))703#define MICROPROFILE_COUNTER_CLEAR_PTR(name) MicroProfileCounterSetPtr(name, 0, 0)704#define MICROPROFILE_COUNTER_SET_LIMIT(name, count) \705static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp_counter, __LINE__) = MicroProfileGetCounterToken(name, 0); \706MicroProfileCounterSetLimit(MICROPROFILE_TOKEN_PASTE(g_mp_counter, __LINE__), count)707#define MICROPROFILE_COUNTER_CONFIG(name, type, limit, flags) MicroProfileCounterConfig(name, type, limit, flags)708#define MICROPROFILE_COUNTER_CONFIG_ONCE(name, type, limit, flags) \709do \710{ \711static bool MICROPROFILE_TOKEN_PASTE(g_mponce, __LINE__) = false; \712if(!MICROPROFILE_TOKEN_PASTE(g_mponce, __LINE__)) \713{ \714MICROPROFILE_TOKEN_PASTE(g_mponce, __LINE__) = true; \715MicroProfileCounterConfig(name, type, limit, flags); \716} \717} while(0)718#define MICROPROFILE_DECLARE_LOCAL_COUNTER(var) \719extern int64_t g_mp_local_counter##var; \720extern MicroProfileToken g_mp_counter_token##var;721#define MICROPROFILE_DEFINE_LOCAL_COUNTER(var, name) \722int64_t g_mp_local_counter##var = 0; \723MicroProfileToken g_mp_counter_token##var = MicroProfileGetCounterToken(name, 0)724#define MICROPROFILE_DECLARE_LOCAL_ATOMIC_COUNTER(var) extern MicroProfileToken g_mp_counter_token##var;725#define MICROPROFILE_DEFINE_LOCAL_ATOMIC_COUNTER(var, name) MicroProfileToken g_mp_counter_token##var = MicroProfileGetCounterToken(name, 0)726#define MICROPROFILE_COUNTER_LOCAL_ADD(var, count) MicroProfileLocalCounterAdd(&g_mp_local_counter##var, (count))727#define MICROPROFILE_COUNTER_LOCAL_SUB(var, count) MicroProfileLocalCounterAdd(&g_mp_local_counter##var, -(int64_t)(count))728#define MICROPROFILE_COUNTER_LOCAL_SET(var, count) MicroProfileLocalCounterSet(&g_mp_local_counter##var, count)729#define MICROPROFILE_COUNTER_LOCAL_UPDATE_ADD(var) MicroProfileCounterAdd(g_mp_counter_token##var, MicroProfileLocalCounterSet(&g_mp_local_counter##var, 0))730#define MICROPROFILE_COUNTER_LOCAL_UPDATE_SET(var) MicroProfileCounterSet(g_mp_counter_token##var, MicroProfileLocalCounterSet(&g_mp_local_counter##var, 0))731#define MICROPROFILE_COUNTER_LOCAL_ADD_ATOMIC(var, count) MicroProfileLocalCounterAddAtomic(g_mp_counter_token##var, (count))732#define MICROPROFILE_COUNTER_LOCAL_SUB_ATOMIC(var, count) MicroProfileLocalCounterAddAtomic(g_mp_counter_token##var, -(int64_t)(count))733#define MICROPROFILE_COUNTER_LOCAL_SET_ATOMIC(var, count) MicroProfileLocalCounterSetAtomic(g_mp_counter_token##var, count)734#define MICROPROFILE_COUNTER_LOCAL_UPDATE_ADD_ATOMIC(var) MicroProfileCounterAdd(g_mp_counter_token##var, MicroProfileLocalCounterSetAtomic(g_mp_counter_token##var, 0))735#define MICROPROFILE_COUNTER_LOCAL_UPDATE_SET_ATOMIC(var) MicroProfileCounterSet(g_mp_counter_token##var, MicroProfileLocalCounterSetAtomic(g_mp_counter_token##var, 0))736#define MICROPROFILE_COUNTER_GET_TOKEN(name, f) MicroProfileGetCounterToken(name, f)737#define MICROPROFILE_COUNTER_TOKEN_ADD(v, count) MicroProfileCounterAdd(v, count)738#define MICROPROFILE_COUNTER_TOKEN_SUB(v, count) MicroProfileCounterAdd(v, -(int64_t)count)739#define MICROPROFILE_COUNTER_TOKEN_SET(v, count) MicroProfileCounterSet(v, count)740#define MICROPROFILE_FORCEENABLECPUGROUP(s) MicroProfileForceEnableGroup(s, MicroProfileTokenTypeCpu)741#define MICROPROFILE_FORCEDISABLECPUGROUP(s) MicroProfileForceDisableGroup(s, MicroProfileTokenTypeCpu)742#define MICROPROFILE_FORCEENABLEGPUGROUP(s) MicroProfileForceEnableGroup(s, MicroProfileTokenTypeGpu)743#define MICROPROFILE_FORCEDISABLEGPUGROUP(s) MicroProfileForceDisableGroup(s, MicroProfileTokenTypeGpu)744#define MICROPROFILE_CONDITIONAL(expr) expr745746#ifndef MICROPROFILE_PLATFORM_MARKERS747#define MICROPROFILE_PLATFORM_MARKERS 0748#endif749750#if MICROPROFILE_PLATFORM_MARKERS751#define MICROPROFILE_PLATFORM_MARKERS_ENABLED S.nPlatformMarkersEnabled752#define MICROPROFILE_PLATFORM_MARKER_BEGIN(color, marker) MicroProfilePlatformMarkerBegin(color, marker)753#define MICROPROFILE_PLATFORM_MARKER_END() MicroProfilePlatformMarkerEnd()754#else755#define MICROPROFILE_PLATFORM_MARKER_BEGIN(color, marker) \756do \757{ \758(void)color; \759(void)marker; \760} while(0)761#define MICROPROFILE_PLATFORM_MARKER_END() \762do \763{ \764} while(0)765#define MICROPROFILE_PLATFORM_MARKERS_ENABLED 0766#endif767768#define MICROPROFILE_MAJOR_VERSION 4769#define MICROPROFILE_MINOR_VERSION 0770771#ifndef MICROPROFILE_USE_THREAD_NAME_CALLBACK772#define MICROPROFILE_USE_THREAD_NAME_CALLBACK 0773#endif774775#ifndef MICROPROFILE_PER_THREAD_BUFFER_SIZE776#define MICROPROFILE_PER_THREAD_BUFFER_SIZE (2048 << 10)777#endif778779#ifndef MICROPROFILE_PER_THREAD_GPU_BUFFER_SIZE780#define MICROPROFILE_PER_THREAD_GPU_BUFFER_SIZE (128 << 10)781#endif782783#ifndef MICROPROFILE_MAX_FRAME_HISTORY784#define MICROPROFILE_MAX_FRAME_HISTORY 512785#endif786787#ifndef MICROPROFILE_PRINTF788#define MICROPROFILE_PRINTF printf789#endif790791// #ifndef MICROPROFILE_META_MAX792// #define MICROPROFILE_META_MAX 8793// #endif794795#ifndef MICROPROFILE_WEBSERVER_PORT796#define MICROPROFILE_WEBSERVER_PORT 1338797#endif798799#ifndef MICROPROFILE_WEBSERVER800#define MICROPROFILE_WEBSERVER 1801#endif802803#ifndef MICROPROFILE_WEBSERVER_AUTO_START804#define MICROPROFILE_WEBSERVER_AUTO_START 1 // when set to 1, the webserver will start on first call to MicroProfileFlip805#endif806807#ifndef MICROPROFILE_WEBSERVER_DEFAULT_FRAMES808#define MICROPROFILE_WEBSERVER_DEFAULT_FRAMES 30809#endif810811#ifndef MICROPROFILE_WEBSERVER_SOCKET_BUFFER_SIZE812#define MICROPROFILE_WEBSERVER_SOCKET_BUFFER_SIZE (16 << 10)813#endif814815#ifndef MICROPROFILE_GPU_TIMERS816#if defined(MICROPROFILE_GPU_TIMERS_VULKAN) || defined(MICROPROFILE_GPU_TIMERS_D3D12) || defined(MICROPROFILE_GPU_TIMERS_D3D11) || defined(MICROPROFILE_GPU_TIMERS_GL)817#define MICROPROFILE_GPU_TIMERS 1818#else819#define MICROPROFILE_GPU_TIMERS 0820#endif821#endif822823#ifndef MICROPROFILE_GPU_FRAME_DELAY824#define MICROPROFILE_GPU_FRAME_DELAY 5 // must be > 0825#endif826827#ifndef MICROPROFILE_NAME_MAX_LEN828#define MICROPROFILE_NAME_MAX_LEN 64829#endif830831#ifndef MICROPROFILE_MAX_TIMERS832#define MICROPROFILE_MAX_TIMERS 1024833#endif834835#ifndef MICROPROFILE_MAX_THREADS836#define MICROPROFILE_MAX_THREADS 128837#endif838839#ifndef MICROPROFILE_UNPACK_RED840#define MICROPROFILE_UNPACK_RED(c) (0xff & ((c) >> 16))841#endif842843#ifndef MICROPROFILE_UNPACK_GREEN844#define MICROPROFILE_UNPACK_GREEN(c) (0xff & ((c) >> 8))845#endif846847#ifndef MICROPROFILE_UNPACK_BLUE848#define MICROPROFILE_UNPACK_BLUE(c) (0xff & ((c)))849#endif850851#ifndef MICROPROFILE_DEFAULT_PRESET852#define MICROPROFILE_DEFAULT_PRESET "Default"853#endif854855#ifndef MICROPROFILE_TIMELINE_MAX_ENTRIES856#define MICROPROFILE_TIMELINE_MAX_ENTRIES (4 << 10)857#endif858859#ifndef MICROPROFILE_MAX_STRING860#define MICROPROFILE_MAX_STRING 128861#endif862863#ifndef MICROPROFILE_TIMELINE_MAX_TOKENS864#define MICROPROFILE_TIMELINE_MAX_TOKENS 64865#endif866867#ifndef MICROPROFILE_THREAD_LOG_FRAMES_REUSE868#define MICROPROFILE_THREAD_LOG_FRAMES_REUSE 200869#endif870871#ifndef MICROPROFILE_CONTEXT_SWITCH_TRACE872#if defined(_WIN32)873#define MICROPROFILE_CONTEXT_SWITCH_TRACE 1874#elif defined(__APPLE__)875#define MICROPROFILE_CONTEXT_SWITCH_TRACE 0 // disabled until dtrace script is working.876#else877#define MICROPROFILE_CONTEXT_SWITCH_TRACE 0878#endif879#endif880881#if MICROPROFILE_CONTEXT_SWITCH_TRACE882#define MICROPROFILE_CONTEXT_SWITCH_BUFFER_SIZE (128 * 1024) // 2mb with 16 byte entry size883#else884#define MICROPROFILE_CONTEXT_SWITCH_BUFFER_SIZE (1)885#endif886887#ifndef MICROPROFILE_MINIZ888#define MICROPROFILE_MINIZ 0889#endif890891#ifndef MICROPROFILE_COUNTER_HISTORY892#define MICROPROFILE_COUNTER_HISTORY 1893#endif894895#ifndef MICROPROFILE_MAX_GROUPS896#define MICROPROFILE_MAX_GROUPS 128 // must be multiple of 32897#endif898899#ifndef MICROPROFILE_STACK_MAX900#define MICROPROFILE_STACK_MAX 64901#endif902903#ifndef MICROPROFILE_BREAK_ON_PATCH_FAIL904#define MICROPROFILE_BREAK_ON_PATCH_FAIL 0905#endif906907#ifndef MICROPROFILE_INSTRUMENT_MICROPROFILE908#define MICROPROFILE_INSTRUMENT_MICROPROFILE 0909#endif910911#ifndef MICROPROFILE_MAX_DYNAMIC_TOKENS912#define MICROPROFILE_MAX_DYNAMIC_TOKENS 2048913#endif914915#ifndef MICROPROFILE_INSTRUMENT_SYMBOLNAME_MAXLEN916#define MICROPROFILE_INSTRUMENT_SYMBOLNAME_MAXLEN 128917#endif918919#ifndef MICROPROFILE_INSTRUMENT_MAX_MODULES920#define MICROPROFILE_INSTRUMENT_MAX_MODULES 256921#endif922923#ifndef MICROPROFILE_INSTRUMENT_MAX_MODULE_CHARS924#define MICROPROFILE_INSTRUMENT_MAX_MODULE_CHARS (8 << 10)925#endif926927#ifndef MICROPROFILE_ASSERT_LOG_FREED928#define MICROPROFILE_ASSERT_LOG_FREED 0929#endif930931#define MICROPROFILE_FLIP_FLAG_START_WEBSERVER 0x1932933#if MICROPROFILE_WEBSERVER_AUTO_START934#define MICROPROFILE_FLIP_FLAG_DEFAULT (MICROPROFILE_FLIP_FLAG_START_WEBSERVER)935#else936#define MICROPROFILE_FLIP_FLAG_DEFAULT (0)937#endif938939#ifndef MICROPROFILE_GET_SETTINGS_FILE_PATH940#define MICROPROFILE_GET_SETTINGS_FILE_PATH ""941#endif942943#ifndef MICROPROFILE_MAX_CPU_CORES944#define MICROPROFILE_MAX_CPU_CORES 256945#endif946947typedef enum MicroProfileTokenType_t948{949MicroProfileTokenTypeCpu,950MicroProfileTokenTypeGpu,951} MicroProfileTokenType;952953struct MicroProfile;954struct MicroProfileThreadLogGpu;955struct MicroProfileScopeStateC;956957#ifdef __cplusplus958#define IF_CPP(exp) exp959#else960#define IF_CPP(exp)961#endif962963#ifdef __cplusplus964extern "C"965{966#endif967968#define MICROPROFILE_INVALID_TOKEN ((uint64_t) - 1)969#define MICROPROFILE_TIMER_FLAG_SECTION 0x1970#define MICROPROFILE_TIMER_FLAG_PLACEHOLDER 0x1000971#define MICROPROFILE_CSV_FLAG_FRAME_NUMBERS 0x0972#define MICROPROFILE_CSV_FLAG_FRAME_TIME 0x1973974MICROPROFILE_API void MicroProfileInit();975MICROPROFILE_API void MicroProfileShutdown();976MICROPROFILE_API void MicroProfileStartAutoFlip(uint32_t nHz);977MICROPROFILE_API void MicroProfileStopAutoFlip();978MICROPROFILE_API void MicroProfileEnableFrameExtraCounterData(); // enable per frame counter storage. uses more memory979MICROPROFILE_API MicroProfileToken MicroProfileFindToken(const char* sGroup, const char* sName);980MICROPROFILE_API MicroProfileToken MicroProfileGetToken(const char* sGroup, const char* sName, uint32_t nColor, MicroProfileTokenType Token, uint32_t flags);981MICROPROFILE_API void MicroProfileGetTokenC(MicroProfileToken* pToken, const char* sGroup, const char* sName, uint32_t nColor, MicroProfileTokenType Token, uint32_t flags);982MICROPROFILE_API MicroProfileToken MicroProfileGetCounterToken(const char* pName, uint32_t CounterTokenFlag);983MICROPROFILE_API MicroProfileToken MicroProfileGetChildCounterToken(MicroProfileToken Parent, const char* pName); // manually create the child/parent tree984MICROPROFILE_API void MicroProfileCounterAdd(MicroProfileToken nToken, int64_t nCount);985MICROPROFILE_API void MicroProfileCounterSet(MicroProfileToken nToken, int64_t nCount);986MICROPROFILE_API int64_t MicroProfileCounterGet(MicroProfileToken nToken);987MICROPROFILE_API void MicroProfileCounterSetDouble(MicroProfileToken nToken, double dCount);988MICROPROFILE_API double MicroProfileCounterGetDouble(MicroProfileToken nToken);989MICROPROFILE_API void MicroProfileCounterSetLimit(MicroProfileToken nToken, int64_t nCount);990MICROPROFILE_API void MicroProfileCounterSetLimitDouble(MicroProfileToken nToken, double nCount);991MICROPROFILE_API void MicroProfileCounterConfig(const char* pCounterName, uint32_t nFormat, int64_t nLimit, uint32_t nFlags);992MICROPROFILE_API void MicroProfileCounterConfigToken(MicroProfileToken nToken, uint32_t nFormat, int64_t nLimit, uint32_t nFlags);993MICROPROFILE_API void MicroProfileCounterSetPtr(const char* pCounterName, void* pValue, uint32_t nSize);994MICROPROFILE_API void MicroProfileCounterFetchCounters();995MICROPROFILE_API void MicroProfileLocalCounterAdd(int64_t* pCounter, int64_t nCount);996MICROPROFILE_API int64_t MicroProfileLocalCounterSet(int64_t* pCounter, int64_t nCount);997MICROPROFILE_API uint64_t MicroProfileEnterInternal(MicroProfileToken nToken);998MICROPROFILE_API void MicroProfileLeaveInternal(MicroProfileToken nToken, uint64_t nTick);999MICROPROFILE_API uint64_t MicroProfileEnterInternalCStr(const char* pStr);10001001MICROPROFILE_API void MicroProfileLeaveInternalCStr(const char* pStr, uint64_t nTickStart);10021003MICROPROFILE_API void MicroProfileEnter(MicroProfileToken nToken);1004MICROPROFILE_API void MicroProfileLeave();10051006MICROPROFILE_API void MicroProfileEnterSection(const char* pName, uint32_t nColor);1007MICROPROFILE_API void MicroProfileLeaveSection();10081009MICROPROFILE_API void MicroProfileEnterGpu(MicroProfileToken nToken, struct MicroProfileThreadLogGpu* pLog);1010MICROPROFILE_API void MicroProfileLeaveGpu(struct MicroProfileThreadLogGpu* pLog);1011MICROPROFILE_API MicroProfileTimelineToken MicroProfileTimelineEnterInternal(uint32_t nColor, const char* pStr, uint32_t nStrLen, int bIsStaticString);1012MICROPROFILE_API MicroProfileTimelineToken MicroProfileTimelineEnter(uint32_t nColor, const char* pStr);1013MICROPROFILE_API MicroProfileTimelineToken MicroProfileTimelineEnterf(uint32_t nColor, const char* pStr, ...);1014MICROPROFILE_API void MicroProfileTimelineLeave(MicroProfileTimelineToken id);1015MICROPROFILE_API void MicroProfileTimelineEnterStatic(uint32_t nColor, const char* pStr);1016MICROPROFILE_API void MicroProfileTimelineLeaveStatic(const char* pStr);10171018MICROPROFILE_API uint64_t MicroProfileGpuEnterInternal(struct MicroProfileThreadLogGpu* pLog, MicroProfileToken nToken);1019MICROPROFILE_API void MicroProfileGpuLeaveInternal(struct MicroProfileThreadLogGpu* pLog, MicroProfileToken nToken, uint64_t nTick);1020MICROPROFILE_API uint64_t MicroProfileGpuEnterInternalCStr(struct MicroProfileThreadLogGpu* pGpuLog, const char* pStr);1021MICROPROFILE_API void MicroProfileGpuLeaveInternalCStr(struct MicroProfileThreadLogGpu* pGpuLog, uint64_t nTickStart);10221023MICROPROFILE_API void MicroProfileGpuBegin(void* pContext, struct MicroProfileThreadLogGpu* pLog);1024MICROPROFILE_API void MicroProfileGpuSetContext(void* pContext, struct MicroProfileThreadLogGpu* pLog);1025MICROPROFILE_API uint64_t MicroProfileGpuEnd(struct MicroProfileThreadLogGpu* pLog);1026MICROPROFILE_API struct MicroProfileThreadLogGpu* MicroProfileThreadLogGpuAlloc();1027MICROPROFILE_API void MicroProfileThreadLogGpuFree(struct MicroProfileThreadLogGpu* pLog);1028MICROPROFILE_API void MicroProfileThreadLogGpuReset(struct MicroProfileThreadLogGpu* pLog);1029MICROPROFILE_API void MicroProfileGpuSubmit(int nQueue, uint64_t nWork);1030MICROPROFILE_API int MicroProfileInitGpuQueue(const char* pQueueName);1031MICROPROFILE_API void MicroProfileFreeGpuQueue(int nQueue);1032MICROPROFILE_API int MicroProfileGetGpuQueue(const char* pQueueName);10331034MICROPROFILE_API void MicroProfileFlip(void* pGpuContext, uint32_t FlipFlag IF_CPP(= MICROPROFILE_FLIP_FLAG_DEFAULT)); //! call once per frame.1035MICROPROFILE_API void MicroProfileFlip_CB(void* pGpuContext, MicroProfileOnFreeze FreezeCB, uint32_t FlipFlag IF_CPP(= MICROPROFILE_FLIP_FLAG_DEFAULT)); //! call once per frame.1036MICROPROFILE_API void MicroProfileToggleFrozen();1037MICROPROFILE_API int MicroProfileIsFrozen();1038MICROPROFILE_API int MicroProfileEnabled();1039MICROPROFILE_API void MicroProfileForceEnableGroup(const char* pGroup, MicroProfileTokenType Type);1040MICROPROFILE_API void MicroProfileForceDisableGroup(const char* pGroup, MicroProfileTokenType Type);1041MICROPROFILE_API float MicroProfileGetTime(const char* pGroup, const char* pName);1042MICROPROFILE_API int MicroProfilePlatformMarkersGetEnabled(); // enable platform markers. disables microprofile markers1043MICROPROFILE_API void MicroProfilePlatformMarkersSetEnabled(int bEnabled); // enable platform markers. disables microprofile markers1044MICROPROFILE_API void MicroProfileContextSwitchSearch(uint32_t* pContextSwitchStart, uint32_t* pContextSwitchEnd, uint64_t nBaseTicksCpu, uint64_t nBaseTicksEndCpu);1045MICROPROFILE_API void MicroProfileOnThreadCreate(const char* pThreadName); // should be called from newly created threads1046MICROPROFILE_API void MicroProfileOnThreadExit(); // call on exit to reuse log1047MICROPROFILE_API void MicroProfileInitThreadLog();1048MICROPROFILE_API void MicroProfileSetEnableAllGroups(int bEnable);1049MICROPROFILE_API void MicroProfileEnableCategory(const char* pCategory);1050MICROPROFILE_API void MicroProfileDisableCategory(const char* pCategory);1051MICROPROFILE_API int MicroProfileGetEnableAllGroups();1052MICROPROFILE_API void MicroProfileSetForceMetaCounters(int bEnable);1053MICROPROFILE_API int MicroProfileGetForceMetaCounters();1054MICROPROFILE_API void MicroProfileEnableMetaCounter(const char* pMet);1055MICROPROFILE_API void MicroProfileDisableMetaCounter(const char* pMet);1056MICROPROFILE_API void MicroProfileSetAggregateFrames(int frames);1057MICROPROFILE_API int MicroProfileGetAggregateFrames();1058MICROPROFILE_API int MicroProfileGetCurrentAggregateFrames();1059MICROPROFILE_API struct MicroProfile* MicroProfileGet();1060MICROPROFILE_API void MicroProfileGetRange(uint32_t nPut, uint32_t nGet, uint32_t nRange[2][2]);1061MICROPROFILE_API void MicroProfileStartContextSwitchTrace();1062MICROPROFILE_API void MicroProfileStopContextSwitchTrace();1063MICROPROFILE_API int MicroProfileIsLocalThread(uint32_t nThreadId);1064MICROPROFILE_API int MicroProfileFormatCounter(int eFormat, int64_t nCounter, char* pOut, uint32_t nBufferSize);1065MICROPROFILE_API struct MicroProfileThreadLogGpu* MicroProfileGetGlobalGpuThreadLog();1066MICROPROFILE_API int MicroProfileGetGlobalGpuQueue();1067MICROPROFILE_API void MicroProfileRegisterGroup(const char* pGroup, const char* pCategory, uint32_t nColor);1068#if MICROPROFILE_PLATFORM_MARKERS1069MICROPROFILE_API void MicroProfilePlatformMarkerBegin(uint32_t nColor, const char* pMarker); // not implemented by microprofile.1070MICROPROFILE_API void MicroProfilePlatformMarkerEnd(); // not implemented by microprofile.1071#endif10721073MICROPROFILE_API float MicroProfileTickToMsMultiplierCpu();1074MICROPROFILE_API float MicroProfileTickToMsMultiplierGpu();1075MICROPROFILE_API int64_t MicroProfileTicksPerSecondCpu();1076MICROPROFILE_API uint64_t MicroProfileTick();10771078MICROPROFILE_API void MicroProfileLocalCounterAddAtomic(MicroProfileToken Token, int64_t nCount);1079MICROPROFILE_API int64_t MicroProfileLocalCounterSetAtomic(MicroProfileToken, int64_t nCount);10801081MICROPROFILE_API const char* MicroProfileCounterString(const char* String);1082MICROPROFILE_API MicroProfileToken MicroProfileCounterTokenTree(MicroProfileToken* LastToken, MicroProfileToken CurrentParent, const char* pString);1083MICROPROFILE_API MicroProfileToken MicroProfileCounterTokenTreeDynamic(MicroProfileToken* LastToken, MicroProfileToken Parent, const char* pString);10841085MICROPROFILE_API void MicroProfileCsvConfigEnd();1086MICROPROFILE_API void MicroProfileCsvConfigBegin(uint32_t MaxTimers, uint32_t MaxGroups, uint32_t MaxCounters, uint32_t Flags);1087MICROPROFILE_API void MicroProfileCsvConfigAddTimer(const char* Group, const char* Timer, const char* DisplayName IF_CPP(= nullptr), MicroProfileTokenType Type IF_CPP(= MicroProfileTokenTypeCpu));1088MICROPROFILE_API void MicroProfileCsvConfigAddGroup(const char* Group, const char* DisplayName IF_CPP(= nullptr));1089MICROPROFILE_API void MicroProfileCsvConfigAddCounter(const char* CounterName, const char* DisplayName IF_CPP(= nullptr));10901091MICROPROFILE_API void MicroProfileUpdateSettingsPath();10921093#if MICROPROFILE_IMGUI1094// Basic support for controlling MicroProfile from ImGui, and for rendering graphs & tables1095enum MicroProfileImguiAlign;1096struct MicroProfileImguiWindowDesc;1097struct MicroProfileImguiEntryDesc;1098MICROPROFILE_API void MicroProfileImguiGraphs(const MicroProfileImguiWindowDesc& Window, const MicroProfileImguiEntryDesc* Entries, uint32_t NumEntries);1099MICROPROFILE_API void MicroProfileImguiTable(const MicroProfileImguiWindowDesc& Window, const MicroProfileImguiEntryDesc* Entries, uint32_t NumEntries);1100MICROPROFILE_API void MicroProfileImguiControls();1101#endif11021103#ifdef __cplusplus1104}1105#endif11061107#ifdef __cplusplus1108struct MicroProfileThreadInfo1109{1110// 3 first members are used to sort. dont reorder1111uint32_t nIsLocal;1112MicroProfileThreadIdType pid;1113MicroProfileThreadIdType tid;1114// 3 first members are used to sort. dont reorder11151116const char* pThreadModule;1117const char* pProcessModule;1118MicroProfileThreadInfo()1119: nIsLocal(0)1120, pid(0)1121, tid(0)1122, pThreadModule("?")1123, pProcessModule("?")1124{1125}1126MicroProfileThreadInfo(uint32_t ThreadId, uint32_t ProcessId, uint32_t nIsLocal)1127: nIsLocal(nIsLocal)1128, pid(ProcessId)1129, tid(ThreadId)1130, pThreadModule("?")1131, pProcessModule("?")1132{1133}1134~MicroProfileThreadInfo()1135{1136}1137};1138MICROPROFILE_API MicroProfileThreadInfo MicroProfileGetThreadInfo(MicroProfileThreadIdType nThreadId);1139MICROPROFILE_API uint32_t MicroProfileGetThreadInfoArray(MicroProfileThreadInfo** pThreadArray);1140#endif11411142#ifdef __cplusplus1143extern "C"1144{1145#endif11461147#if MICROPROFILE_GPU_TIMERS_D3D121148MICROPROFILE_API void MicroProfileGpuInitD3D12(void* pDevice, uint32_t nNodeCount, void** pCommandQueues, void** pCopyQueues);1149MICROPROFILE_API void MicroProfileGpuShutdownD3D12();1150MICROPROFILE_API void MicroProfileSetCurrentNodeD3D12(uint32_t nNode);1151#endif11521153#if MICROPROFILE_GPU_TIMERS_VULKAN1154#include <vulkan/vulkan.h>1155void MicroProfileGpuInitVulkan(VkDevice* pDevices, VkPhysicalDevice* pPhysicalDevices, VkQueue* pQueues, uint32_t* QueueFamily, uint32_t nNodeCount);1156MICROPROFILE_API void MicroProfileGpuShutdownVulkan();1157MICROPROFILE_API void MicroProfileSetCurrentNodeVulkan(uint32_t nNode);1158#endif11591160MICROPROFILE_API void MicroProfileDumpFile(const char* pHtml, const char* pCsv, float fCpuSpike, float fGpuSpike, uint32_t FrameCount IF_CPP(= MICROPROFILE_WEBSERVER_DEFAULT_FRAMES));1161MICROPROFILE_API void MicroProfileDumpFileImmediately(const char* pHtml, const char* pCsv, void* pGpuContext, uint32_t FrameCount IF_CPP(= MICROPROFILE_WEBSERVER_DEFAULT_FRAMES));11621163#if MICROPROFILE_ENABLED && MICROPROFILE_WEBSERVER1164MICROPROFILE_API uint32_t MicroProfileWebServerPort();1165MICROPROFILE_API void MicroProfileSetWebServerPort(uint32_t nPort);1166#else1167#define MicroProfileWebServerPort() ((uint32_t) - 1)1168#define MicroProfileSetWebServerPort(a) \1169do \1170{ \1171} while(0)1172#endif11731174typedef enum MicroProfileGpuTimerStateType_1175{1176MicroProfileGpuTimerStateType_Invalid = 0,1177MicroProfileGpuTimerStateType_D3D11,1178MicroProfileGpuTimerStateType_D3D12,1179MicroProfileGpuTimerStateType_Vulkan,1180MicroProfileGpuTimerStateType_GL,1181MicroProfileGpuTimerStateType_Custom1182} MicroProfileGpuTimerStateType;11831184typedef struct MicroProfileGpuTimerState_1185{1186MicroProfileGpuTimerStateType Type;1187} MicroProfileGpuTimerState;11881189#if MICROPROFILE_GPU_TIMERS1190typedef uint32_t(*MicroProfileGpuInsertTimeStamp_CB)(void* pContext);1191typedef uint64_t(*MicroProfileGpuGetTimeStamp_CB)(uint32_t nKey);1192typedef uint64_t(*MicroProfileTicksPerSecondGpu_CB)();1193typedef int (*MicroProfileGetGpuTickReference_CB)(int64_t* pOutCPU, int64_t* pOutGpu);1194typedef uint32_t(*MicroProfileGpuFlip_CB)(void*);1195typedef void (*MicroProfileGpuShutdown_CB)();11961197MICROPROFILE_API void MicroProfileGpuShutdownPlatform();11981199MICROPROFILE_API void MicroProfileGpuInitPlatform(MicroProfileGpuTimerStateType eType,1200MicroProfileGpuTimerState* pGpuState,1201MicroProfileGpuInsertTimeStamp_CB InsertTimeStamp,1202MicroProfileGpuGetTimeStamp_CB GetTimeStamp,1203MicroProfileTicksPerSecondGpu_CB TicksPerSecond,1204MicroProfileGetGpuTickReference_CB GetTickReference,1205MicroProfileGpuFlip_CB Flip,1206MicroProfileGpuShutdown_CB Shutdown);1207#else1208#define MicroProfileGpuShutdownPlatform() \1209do \1210{ \1211} while(0)1212#define MicroProfileGpuInitPlatform(...) \1213do \1214{ \1215} while(0)1216#define MicroProfileGpuInsertTimeStamp(a) 11217#define MicroProfileGpuGetTimeStamp(a) 01218#define MicroProfileTicksPerSecondGpu() 11219#define MicroProfileGetGpuTickReference(a, b) 01220#define MicroProfileGpuFlip(a) 01221#define MicroProfileGpuShutdown() \1222do \1223{ \1224} while(0)12251226#endif12271228#if MICROPROFILE_GPU_TIMERS_D3D111229#define MICROPROFILE_D3D11_MAX_QUERIES (32 << 10)1230MICROPROFILE_API void MicroProfileGpuInitD3D11(void* pDevice, void* pDeviceContext);1231MICROPROFILE_API void MicroProfileGpuShutdownD3D11();1232#endif12331234#if MICROPROFILE_GPU_TIMERS_GL1235#define MICROPROFILE_GL_MAX_QUERIES (8 << 10)1236MICROPROFILE_API void MicroProfileGpuInitGL();1237#endif12381239#if MICROPROFILE_USE_THREAD_NAME_CALLBACK1240MICROPROFILE_API const char* MicroProfileGetThreadName(char* pzName);1241#else1242#define MicroProfileGetThreadName(a) 01243#endif12441245#ifdef __cplusplus1246}1247#endif12481249struct MicroProfileScopeStateC1250{1251MicroProfileToken Token;1252int64_t nTick;1253};12541255#ifdef __cplusplus1256struct MicroProfileScopeHandler1257{1258MicroProfileToken nToken;1259uint64_t nTick;1260MicroProfileScopeHandler(MicroProfileToken Token)1261: nToken(Token)1262{1263nTick = MicroProfileEnterInternal(nToken);1264}1265~MicroProfileScopeHandler()1266{1267MicroProfileLeaveInternal(nToken, nTick);1268}1269};12701271struct MicroProfileScopeHandlerCStr1272{1273uint64_t nTick;1274const char* pStr;1275MicroProfileScopeHandlerCStr(const char* pStr)1276: pStr(pStr)1277{1278nTick = MicroProfileEnterInternalCStr(pStr);1279}1280~MicroProfileScopeHandlerCStr()1281{1282MicroProfileLeaveInternalCStr(pStr, nTick);1283}1284};12851286struct MicroProfileScopeGpuHandler1287{1288MicroProfileToken nToken;1289MicroProfileThreadLogGpu* pLog;1290uint64_t nTick;1291MicroProfileScopeGpuHandler(MicroProfileToken Token, MicroProfileThreadLogGpu* pLog)1292: nToken(Token)1293, pLog(pLog)1294{1295nTick = MicroProfileGpuEnterInternal(pLog, nToken);1296}1297~MicroProfileScopeGpuHandler()1298{1299MicroProfileGpuLeaveInternal(pLog, nToken, nTick);1300}1301};13021303struct MicroProfileScopeGpuHandlerCStr1304{1305MicroProfileThreadLogGpu* pLog;1306uint64_t nTick;1307MicroProfileScopeGpuHandlerCStr(const char* pStr, MicroProfileThreadLogGpu* pLog)1308: pLog(pLog)1309{1310nTick = MicroProfileGpuEnterInternalCStr(pLog, pStr);1311}1312~MicroProfileScopeGpuHandlerCStr()1313{1314MicroProfileGpuLeaveInternalCStr(pLog, nTick);1315}1316};13171318struct MicroProfileConditionalScopeHandler1319{1320MicroProfileToken nToken;1321uint64_t nTick;1322MicroProfileConditionalScopeHandler(MicroProfileToken token, bool condition)1323: nToken(token)1324{1325nTick = condition ? MicroProfileEnterInternal(token) : MICROPROFILE_INVALID_TOKEN;1326}1327~MicroProfileConditionalScopeHandler()1328{1329if (nTick != MICROPROFILE_INVALID_TOKEN)1330{1331MicroProfileLeaveInternal(nToken, nTick);1332}1333}1334};1335struct MicroProfileScopeTimelineExitHandler1336{1337MicroProfileTimelineToken nToken;1338MicroProfileScopeTimelineExitHandler(MicroProfileTimelineToken Token)1339: nToken(Token)1340{1341}1342~MicroProfileScopeTimelineExitHandler()1343{1344MicroProfileTimelineLeave(nToken);1345}1346};13471348#if MICROPROFILE_IMGUI1349enum MicroProfileImguiAlign1350{1351MICROPROFILE_IMGUI_ALIGN_TOP_LEFT = 0,1352MICROPROFILE_IMGUI_ALIGN_TOP_RIGHT = 1,1353MICROPROFILE_IMGUI_ALIGN_BOTTOM_LEFT = 2,1354MICROPROFILE_IMGUI_ALIGN_BOTTOM_RIGHT = 3,1355};13561357struct MicroProfileImguiWindowDesc1358{1359uint32_t Align = MICROPROFILE_IMGUI_ALIGN_TOP_LEFT;1360int GraphWidth = 300;1361int GraphHeight = 80;1362int OffsetX = 0;1363int OffsetY = 0;1364};1365struct MicroProfileImguiEntryDesc1366{1367MicroProfileToken GraphTimer;1368float GraphMax = -1;1369};1370#endif13711372#endif //__cplusplus1373#endif // enabled13741375enum MicroProfileCounterFormat1376{1377MICROPROFILE_COUNTER_FORMAT_DEFAULT = 0,1378MICROPROFILE_COUNTER_FORMAT_BYTES = 1,1379};13801381enum MicroProfileCounterFlags1382{1383MICROPROFILE_COUNTER_FLAG_NONE = 0,1384MICROPROFILE_COUNTER_FLAG_DETAILED = 0x1,1385MICROPROFILE_COUNTER_FLAG_DETAILED_GRAPH = 0x2,1386// internal:1387MICROPROFILE_COUNTER_FLAG_INTERNAL_MASK = ~0x3,1388MICROPROFILE_COUNTER_FLAG_HAS_LIMIT = 0x4,1389MICROPROFILE_COUNTER_FLAG_CLOSED = 0x8,1390MICROPROFILE_COUNTER_FLAG_MANUAL_SWAP = 0x10,1391MICROPROFILE_COUNTER_FLAG_LEAF = 0x20,1392MICROPROFILE_COUNTER_FLAG_DOUBLE = 0x40,1393MICROPROFILE_COUNTER_FLAG_TYPE_MASK = MICROPROFILE_COUNTER_FLAG_DOUBLE,1394MICROPROFILE_COUNTER_FLAG_TOKEN_DONT_CREATE = 0x80000000,1395};13961397#endif // once13981399#define MP_AUTO 01400// from http://fugal.net/vim/rgbtxt.html1401#define MP_SNOW 0xfffafa1402#define MP_GHOSTWHITE 0xf8f8ff1403#define MP_WHITESMOKE 0xf5f5f51404#define MP_GAINSBORO 0xdcdcdc1405#define MP_FLORALWHITE 0xfffaf01406#define MP_OLDLACE 0xfdf5e61407#define MP_LINEN 0xfaf0e61408#define MP_ANTIQUEWHITE 0xfaebd71409#define MP_PAPAYAWHIP 0xffefd51410#define MP_BLANCHEDALMOND 0xffebcd1411#define MP_BISQUE 0xffe4c41412#define MP_PEACHPUFF 0xffdab91413#define MP_NAVAJOWHITE 0xffdead1414#define MP_MOCCASIN 0xffe4b51415#define MP_CORNSILK 0xfff8dc1416#define MP_IVORY 0xfffff01417#define MP_LEMONCHIFFON 0xfffacd1418#define MP_SEASHELL 0xfff5ee1419#define MP_HONEYDEW 0xf0fff01420#define MP_MINTCREAM 0xf5fffa1421#define MP_AZURE 0xf0ffff1422#define MP_ALICEBLUE 0xf0f8ff1423#define MP_LAVENDER 0xe6e6fa1424#define MP_LAVENDERBLUSH 0xfff0f51425#define MP_MISTYROSE 0xffe4e11426#define MP_WHITE 0xffffff1427#define MP_BLACK 0x0101011428#define MP_DARKSLATEGRAY 0x2f4f4f1429#define MP_DARKSLATEGREY 0x2f4f4f1430#define MP_DIMGRAY 0x6969691431#define MP_DIMGREY 0x6969691432#define MP_SLATEGRAY 0x7080901433#define MP_SLATEGREY 0x7080901434#define MP_LIGHTSLATEGRAY 0x7788991435#define MP_LIGHTSLATEGREY 0x7788991436#define MP_GRAY 0xbebebe1437#define MP_GREY 0xbebebe1438#define MP_LIGHTGREY 0xd3d3d31439#define MP_LIGHTGRAY 0xd3d3d31440#define MP_MIDNIGHTBLUE 0x1919701441#define MP_NAVY 0x0000801442#define MP_NAVYBLUE 0x0000801443#define MP_CORNFLOWERBLUE 0x6495ed1444#define MP_DARKSLATEBLUE 0x483d8b1445#define MP_SLATEBLUE 0x6a5acd1446#define MP_MEDIUMSLATEBLUE 0x7b68ee1447#define MP_LIGHTSLATEBLUE 0x8470ff1448#define MP_MEDIUMBLUE 0x0000cd1449#define MP_ROYALBLUE 0x4169e11450#define MP_BLUE 0x0000ff1451#define MP_DODGERBLUE 0x1e90ff1452#define MP_DEEPSKYBLUE 0x00bfff1453#define MP_SKYBLUE 0x87ceeb1454#define MP_LIGHTSKYBLUE 0x87cefa1455#define MP_STEELBLUE 0x4682b41456#define MP_LIGHTSTEELBLUE 0xb0c4de1457#define MP_LIGHTBLUE 0xadd8e61458#define MP_POWDERBLUE 0xb0e0e61459#define MP_PALETURQUOISE 0xafeeee1460#define MP_DARKTURQUOISE 0x00ced11461#define MP_MEDIUMTURQUOISE 0x48d1cc1462#define MP_TURQUOISE 0x40e0d01463#define MP_CYAN 0x00ffff1464#define MP_LIGHTCYAN 0xe0ffff1465#define MP_CADETBLUE 0x5f9ea01466#define MP_MEDIUMAQUAMARINE 0x66cdaa1467#define MP_AQUAMARINE 0x7fffd41468#define MP_DARKGREEN 0x0064001469#define MP_DARKOLIVEGREEN 0x556b2f1470#define MP_DARKSEAGREEN 0x8fbc8f1471#define MP_SEAGREEN 0x2e8b571472#define MP_MEDIUMSEAGREEN 0x3cb3711473#define MP_LIGHTSEAGREEN 0x20b2aa1474#define MP_PALEGREEN 0x98fb981475#define MP_SPRINGGREEN 0x00ff7f1476#define MP_LAWNGREEN 0x7cfc001477#define MP_GREEN 0x00ff001478#define MP_CHARTREUSE 0x7fff001479#define MP_MEDIUMSPRINGGREEN 0x00fa9a1480#define MP_GREENYELLOW 0xadff2f1481#define MP_LIMEGREEN 0x32cd321482#define MP_YELLOWGREEN 0x9acd321483#define MP_FORESTGREEN 0x228b221484#define MP_OLIVEDRAB 0x6b8e231485#define MP_DARKKHAKI 0xbdb76b1486#define MP_KHAKI 0xf0e68c1487#define MP_PALEGOLDENROD 0xeee8aa1488#define MP_LIGHTGOLDENRODYELLOW 0xfafad21489#define MP_LIGHTYELLOW 0xffffe01490#define MP_YELLOW 0xffff001491#define MP_GOLD 0xffd7001492#define MP_LIGHTGOLDENROD 0xeedd821493#define MP_GOLDENROD 0xdaa5201494#define MP_DARKGOLDENROD 0xb8860b1495#define MP_ROSYBROWN 0xbc8f8f1496#define MP_INDIANRED 0xcd5c5c1497#define MP_SADDLEBROWN 0x8b45131498#define MP_SIENNA 0xa0522d1499#define MP_PERU 0xcd853f1500#define MP_BURLYWOOD 0xdeb8871501#define MP_BEIGE 0xf5f5dc1502#define MP_WHEAT 0xf5deb31503#define MP_SANDYBROWN 0xf4a4601504#define MP_TAN 0xd2b48c1505#define MP_CHOCOLATE 0xd2691e1506#define MP_FIREBRICK 0xb222221507#define MP_BROWN 0xa52a2a1508#define MP_DARKSALMON 0xe9967a1509#define MP_SALMON 0xfa80721510#define MP_LIGHTSALMON 0xffa07a1511#define MP_ORANGE 0xffa5001512#define MP_DARKORANGE 0xff8c001513#define MP_CORAL 0xff7f501514#define MP_LIGHTCORAL 0xf080801515#define MP_TOMATO 0xff63471516#define MP_ORANGERED 0xff45001517#define MP_RED 0xff00001518#define MP_HOTPINK 0xff69b41519#define MP_DEEPPINK 0xff14931520#define MP_PINK 0xffc0cb1521#define MP_LIGHTPINK 0xffb6c11522#define MP_PALEVIOLETRED 0xdb70931523#define MP_MAROON 0xb030601524#define MP_MEDIUMVIOLETRED 0xc715851525#define MP_VIOLETRED 0xd020901526#define MP_MAGENTA 0xff00ff1527#define MP_VIOLET 0xee82ee1528#define MP_PLUM 0xdda0dd1529#define MP_ORCHID 0xda70d61530#define MP_MEDIUMORCHID 0xba55d31531#define MP_DARKORCHID 0x9932cc1532#define MP_DARKVIOLET 0x9400d31533#define MP_BLUEVIOLET 0x8a2be21534#define MP_PURPLE 0xa020f01535#define MP_MEDIUMPURPLE 0x9370db1536#define MP_THISTLE 0xd8bfd81537#define MP_SNOW1 0xfffafa1538#define MP_SNOW2 0xeee9e91539#define MP_SNOW3 0xcdc9c91540#define MP_SNOW4 0x8b89891541#define MP_SEASHELL1 0xfff5ee1542#define MP_SEASHELL2 0xeee5de1543#define MP_SEASHELL3 0xcdc5bf1544#define MP_SEASHELL4 0x8b86821545#define MP_ANTIQUEWHITE1 0xffefdb1546#define MP_ANTIQUEWHITE2 0xeedfcc1547#define MP_ANTIQUEWHITE3 0xcdc0b01548#define MP_ANTIQUEWHITE4 0x8b83781549#define MP_BISQUE1 0xffe4c41550#define MP_BISQUE2 0xeed5b71551#define MP_BISQUE3 0xcdb79e1552#define MP_BISQUE4 0x8b7d6b1553#define MP_PEACHPUFF1 0xffdab91554#define MP_PEACHPUFF2 0xeecbad1555#define MP_PEACHPUFF3 0xcdaf951556#define MP_PEACHPUFF4 0x8b77651557#define MP_NAVAJOWHITE1 0xffdead1558#define MP_NAVAJOWHITE2 0xeecfa11559#define MP_NAVAJOWHITE3 0xcdb38b1560#define MP_NAVAJOWHITE4 0x8b795e1561#define MP_LEMONCHIFFON1 0xfffacd1562#define MP_LEMONCHIFFON2 0xeee9bf1563#define MP_LEMONCHIFFON3 0xcdc9a51564#define MP_LEMONCHIFFON4 0x8b89701565#define MP_CORNSILK1 0xfff8dc1566#define MP_CORNSILK2 0xeee8cd1567#define MP_CORNSILK3 0xcdc8b11568#define MP_CORNSILK4 0x8b88781569#define MP_IVORY1 0xfffff01570#define MP_IVORY2 0xeeeee01571#define MP_IVORY3 0xcdcdc11572#define MP_IVORY4 0x8b8b831573#define MP_HONEYDEW1 0xf0fff01574#define MP_HONEYDEW2 0xe0eee01575#define MP_HONEYDEW3 0xc1cdc11576#define MP_HONEYDEW4 0x838b831577#define MP_LAVENDERBLUSH1 0xfff0f51578#define MP_LAVENDERBLUSH2 0xeee0e51579#define MP_LAVENDERBLUSH3 0xcdc1c51580#define MP_LAVENDERBLUSH4 0x8b83861581#define MP_MISTYROSE1 0xffe4e11582#define MP_MISTYROSE2 0xeed5d21583#define MP_MISTYROSE3 0xcdb7b51584#define MP_MISTYROSE4 0x8b7d7b1585#define MP_AZURE1 0xf0ffff1586#define MP_AZURE2 0xe0eeee1587#define MP_AZURE3 0xc1cdcd1588#define MP_AZURE4 0x838b8b1589#define MP_SLATEBLUE1 0x836fff1590#define MP_SLATEBLUE2 0x7a67ee1591#define MP_SLATEBLUE3 0x6959cd1592#define MP_SLATEBLUE4 0x473c8b1593#define MP_ROYALBLUE1 0x4876ff1594#define MP_ROYALBLUE2 0x436eee1595#define MP_ROYALBLUE3 0x3a5fcd1596#define MP_ROYALBLUE4 0x27408b1597#define MP_BLUE1 0x0000ff1598#define MP_BLUE2 0x0000ee1599#define MP_BLUE3 0x0000cd1600#define MP_BLUE4 0x00008b1601#define MP_DODGERBLUE1 0x1e90ff1602#define MP_DODGERBLUE2 0x1c86ee1603#define MP_DODGERBLUE3 0x1874cd1604#define MP_DODGERBLUE4 0x104e8b1605#define MP_STEELBLUE1 0x63b8ff1606#define MP_STEELBLUE2 0x5cacee1607#define MP_STEELBLUE3 0x4f94cd1608#define MP_STEELBLUE4 0x36648b1609#define MP_DEEPSKYBLUE1 0x00bfff1610#define MP_DEEPSKYBLUE2 0x00b2ee1611#define MP_DEEPSKYBLUE3 0x009acd1612#define MP_DEEPSKYBLUE4 0x00688b1613#define MP_SKYBLUE1 0x87ceff1614#define MP_SKYBLUE2 0x7ec0ee1615#define MP_SKYBLUE3 0x6ca6cd1616#define MP_SKYBLUE4 0x4a708b1617#define MP_LIGHTSKYBLUE1 0xb0e2ff1618#define MP_LIGHTSKYBLUE2 0xa4d3ee1619#define MP_LIGHTSKYBLUE3 0x8db6cd1620#define MP_LIGHTSKYBLUE4 0x607b8b1621#define MP_SLATEGRAY1 0xc6e2ff1622#define MP_SLATEGRAY2 0xb9d3ee1623#define MP_SLATEGRAY3 0x9fb6cd1624#define MP_SLATEGRAY4 0x6c7b8b1625#define MP_LIGHTSTEELBLUE1 0xcae1ff1626#define MP_LIGHTSTEELBLUE2 0xbcd2ee1627#define MP_LIGHTSTEELBLUE3 0xa2b5cd1628#define MP_LIGHTSTEELBLUE4 0x6e7b8b1629#define MP_LIGHTBLUE1 0xbfefff1630#define MP_LIGHTBLUE2 0xb2dfee1631#define MP_LIGHTBLUE3 0x9ac0cd1632#define MP_LIGHTBLUE4 0x68838b1633#define MP_LIGHTCYAN1 0xe0ffff1634#define MP_LIGHTCYAN2 0xd1eeee1635#define MP_LIGHTCYAN3 0xb4cdcd1636#define MP_LIGHTCYAN4 0x7a8b8b1637#define MP_PALETURQUOISE1 0xbbffff1638#define MP_PALETURQUOISE2 0xaeeeee1639#define MP_PALETURQUOISE3 0x96cdcd1640#define MP_PALETURQUOISE4 0x668b8b1641#define MP_CADETBLUE1 0x98f5ff1642#define MP_CADETBLUE2 0x8ee5ee1643#define MP_CADETBLUE3 0x7ac5cd1644#define MP_CADETBLUE4 0x53868b1645#define MP_TURQUOISE1 0x00f5ff1646#define MP_TURQUOISE2 0x00e5ee1647#define MP_TURQUOISE3 0x00c5cd1648#define MP_TURQUOISE4 0x00868b1649#define MP_CYAN1 0x00ffff1650#define MP_CYAN2 0x00eeee1651#define MP_CYAN3 0x00cdcd1652#define MP_CYAN4 0x008b8b1653#define MP_DARKSLATEGRAY1 0x97ffff1654#define MP_DARKSLATEGRAY2 0x8deeee1655#define MP_DARKSLATEGRAY3 0x79cdcd1656#define MP_DARKSLATEGRAY4 0x528b8b1657#define MP_AQUAMARINE1 0x7fffd41658#define MP_AQUAMARINE2 0x76eec61659#define MP_AQUAMARINE3 0x66cdaa1660#define MP_AQUAMARINE4 0x458b741661#define MP_DARKSEAGREEN1 0xc1ffc11662#define MP_DARKSEAGREEN2 0xb4eeb41663#define MP_DARKSEAGREEN3 0x9bcd9b1664#define MP_DARKSEAGREEN4 0x698b691665#define MP_SEAGREEN1 0x54ff9f1666#define MP_SEAGREEN2 0x4eee941667#define MP_SEAGREEN3 0x43cd801668#define MP_SEAGREEN4 0x2e8b571669#define MP_PALEGREEN1 0x9aff9a1670#define MP_PALEGREEN2 0x90ee901671#define MP_PALEGREEN3 0x7ccd7c1672#define MP_PALEGREEN4 0x548b541673#define MP_SPRINGGREEN1 0x00ff7f1674#define MP_SPRINGGREEN2 0x00ee761675#define MP_SPRINGGREEN3 0x00cd661676#define MP_SPRINGGREEN4 0x008b451677#define MP_GREEN1 0x00ff001678#define MP_GREEN2 0x00ee001679#define MP_GREEN3 0x00cd001680#define MP_GREEN4 0x008b001681#define MP_CHARTREUSE1 0x7fff001682#define MP_CHARTREUSE2 0x76ee001683#define MP_CHARTREUSE3 0x66cd001684#define MP_CHARTREUSE4 0x458b001685#define MP_OLIVEDRAB1 0xc0ff3e1686#define MP_OLIVEDRAB2 0xb3ee3a1687#define MP_OLIVEDRAB3 0x9acd321688#define MP_OLIVEDRAB4 0x698b221689#define MP_DARKOLIVEGREEN1 0xcaff701690#define MP_DARKOLIVEGREEN2 0xbcee681691#define MP_DARKOLIVEGREEN3 0xa2cd5a1692#define MP_DARKOLIVEGREEN4 0x6e8b3d1693#define MP_KHAKI1 0xfff68f1694#define MP_KHAKI2 0xeee6851695#define MP_KHAKI3 0xcdc6731696#define MP_KHAKI4 0x8b864e1697#define MP_LIGHTGOLDENROD1 0xffec8b1698#define MP_LIGHTGOLDENROD2 0xeedc821699#define MP_LIGHTGOLDENROD3 0xcdbe701700#define MP_LIGHTGOLDENROD4 0x8b814c1701#define MP_LIGHTYELLOW1 0xffffe01702#define MP_LIGHTYELLOW2 0xeeeed11703#define MP_LIGHTYELLOW3 0xcdcdb41704#define MP_LIGHTYELLOW4 0x8b8b7a1705#define MP_YELLOW1 0xffff001706#define MP_YELLOW2 0xeeee001707#define MP_YELLOW3 0xcdcd001708#define MP_YELLOW4 0x8b8b001709#define MP_GOLD1 0xffd7001710#define MP_GOLD2 0xeec9001711#define MP_GOLD3 0xcdad001712#define MP_GOLD4 0x8b75001713#define MP_GOLDENROD1 0xffc1251714#define MP_GOLDENROD2 0xeeb4221715#define MP_GOLDENROD3 0xcd9b1d1716#define MP_GOLDENROD4 0x8b69141717#define MP_DARKGOLDENROD1 0xffb90f1718#define MP_DARKGOLDENROD2 0xeead0e1719#define MP_DARKGOLDENROD3 0xcd950c1720#define MP_DARKGOLDENROD4 0x8b65081721#define MP_ROSYBROWN1 0xffc1c11722#define MP_ROSYBROWN2 0xeeb4b41723#define MP_ROSYBROWN3 0xcd9b9b1724#define MP_ROSYBROWN4 0x8b69691725#define MP_INDIANRED1 0xff6a6a1726#define MP_INDIANRED2 0xee63631727#define MP_INDIANRED3 0xcd55551728#define MP_INDIANRED4 0x8b3a3a1729#define MP_SIENNA1 0xff82471730#define MP_SIENNA2 0xee79421731#define MP_SIENNA3 0xcd68391732#define MP_SIENNA4 0x8b47261733#define MP_BURLYWOOD1 0xffd39b1734#define MP_BURLYWOOD2 0xeec5911735#define MP_BURLYWOOD3 0xcdaa7d1736#define MP_BURLYWOOD4 0x8b73551737#define MP_WHEAT1 0xffe7ba1738#define MP_WHEAT2 0xeed8ae1739#define MP_WHEAT3 0xcdba961740#define MP_WHEAT4 0x8b7e661741#define MP_TAN1 0xffa54f1742#define MP_TAN2 0xee9a491743#define MP_TAN3 0xcd853f1744#define MP_TAN4 0x8b5a2b1745#define MP_CHOCOLATE1 0xff7f241746#define MP_CHOCOLATE2 0xee76211747#define MP_CHOCOLATE3 0xcd661d1748#define MP_CHOCOLATE4 0x8b45131749#define MP_FIREBRICK1 0xff30301750#define MP_FIREBRICK2 0xee2c2c1751#define MP_FIREBRICK3 0xcd26261752#define MP_FIREBRICK4 0x8b1a1a1753#define MP_BROWN1 0xff40401754#define MP_BROWN2 0xee3b3b1755#define MP_BROWN3 0xcd33331756#define MP_BROWN4 0x8b23231757#define MP_SALMON1 0xff8c691758#define MP_SALMON2 0xee82621759#define MP_SALMON3 0xcd70541760#define MP_SALMON4 0x8b4c391761#define MP_LIGHTSALMON1 0xffa07a1762#define MP_LIGHTSALMON2 0xee95721763#define MP_LIGHTSALMON3 0xcd81621764#define MP_LIGHTSALMON4 0x8b57421765#define MP_ORANGE1 0xffa5001766#define MP_ORANGE2 0xee9a001767#define MP_ORANGE3 0xcd85001768#define MP_ORANGE4 0x8b5a001769#define MP_DARKORANGE1 0xff7f001770#define MP_DARKORANGE2 0xee76001771#define MP_DARKORANGE3 0xcd66001772#define MP_DARKORANGE4 0x8b45001773#define MP_CORAL1 0xff72561774#define MP_CORAL2 0xee6a501775#define MP_CORAL3 0xcd5b451776#define MP_CORAL4 0x8b3e2f1777#define MP_TOMATO1 0xff63471778#define MP_TOMATO2 0xee5c421779#define MP_TOMATO3 0xcd4f391780#define MP_TOMATO4 0x8b36261781#define MP_ORANGERED1 0xff45001782#define MP_ORANGERED2 0xee40001783#define MP_ORANGERED3 0xcd37001784#define MP_ORANGERED4 0x8b25001785#define MP_RED1 0xff00001786#define MP_RED2 0xee00001787#define MP_RED3 0xcd00001788#define MP_RED4 0x8b00001789#define MP_DEEPPINK1 0xff14931790#define MP_DEEPPINK2 0xee12891791#define MP_DEEPPINK3 0xcd10761792#define MP_DEEPPINK4 0x8b0a501793#define MP_HOTPINK1 0xff6eb41794#define MP_HOTPINK2 0xee6aa71795#define MP_HOTPINK3 0xcd60901796#define MP_HOTPINK4 0x8b3a621797#define MP_PINK1 0xffb5c51798#define MP_PINK2 0xeea9b81799#define MP_PINK3 0xcd919e1800#define MP_PINK4 0x8b636c1801#define MP_LIGHTPINK1 0xffaeb91802#define MP_LIGHTPINK2 0xeea2ad1803#define MP_LIGHTPINK3 0xcd8c951804#define MP_LIGHTPINK4 0x8b5f651805#define MP_PALEVIOLETRED1 0xff82ab1806#define MP_PALEVIOLETRED2 0xee799f1807#define MP_PALEVIOLETRED3 0xcd68891808#define MP_PALEVIOLETRED4 0x8b475d1809#define MP_MAROON1 0xff34b31810#define MP_MAROON2 0xee30a71811#define MP_MAROON3 0xcd29901812#define MP_MAROON4 0x8b1c621813#define MP_VIOLETRED1 0xff3e961814#define MP_VIOLETRED2 0xee3a8c1815#define MP_VIOLETRED3 0xcd32781816#define MP_VIOLETRED4 0x8b22521817#define MP_MAGENTA1 0xff00ff1818#define MP_MAGENTA2 0xee00ee1819#define MP_MAGENTA3 0xcd00cd1820#define MP_MAGENTA4 0x8b008b1821#define MP_ORCHID1 0xff83fa1822#define MP_ORCHID2 0xee7ae91823#define MP_ORCHID3 0xcd69c91824#define MP_ORCHID4 0x8b47891825#define MP_PLUM1 0xffbbff1826#define MP_PLUM2 0xeeaeee1827#define MP_PLUM3 0xcd96cd1828#define MP_PLUM4 0x8b668b1829#define MP_MEDIUMORCHID1 0xe066ff1830#define MP_MEDIUMORCHID2 0xd15fee1831#define MP_MEDIUMORCHID3 0xb452cd1832#define MP_MEDIUMORCHID4 0x7a378b1833#define MP_DARKORCHID1 0xbf3eff1834#define MP_DARKORCHID2 0xb23aee1835#define MP_DARKORCHID3 0x9a32cd1836#define MP_DARKORCHID4 0x68228b1837#define MP_PURPLE1 0x9b30ff1838#define MP_PURPLE2 0x912cee1839#define MP_PURPLE3 0x7d26cd1840#define MP_PURPLE4 0x551a8b1841#define MP_MEDIUMPURPLE1 0xab82ff1842#define MP_MEDIUMPURPLE2 0x9f79ee1843#define MP_MEDIUMPURPLE3 0x8968cd1844#define MP_MEDIUMPURPLE4 0x5d478b1845#define MP_THISTLE1 0xffe1ff1846#define MP_THISTLE2 0xeed2ee1847#define MP_THISTLE3 0xcdb5cd1848#define MP_THISTLE4 0x8b7b8b1849#define MP_GRAY0 0x0000001850#define MP_GREY0 0x0000001851#define MP_GRAY1 0x0303031852#define MP_GREY1 0x0303031853#define MP_GRAY2 0x0505051854#define MP_GREY2 0x0505051855#define MP_GRAY3 0x0808081856#define MP_GREY3 0x0808081857#define MP_GRAY4 0x0a0a0a1858#define MP_GREY4 0x0a0a0a1859#define MP_GRAY5 0x0d0d0d1860#define MP_GREY5 0x0d0d0d1861#define MP_GRAY6 0x0f0f0f1862#define MP_GREY6 0x0f0f0f1863#define MP_GRAY7 0x1212121864#define MP_GREY7 0x1212121865#define MP_GRAY8 0x1414141866#define MP_GREY8 0x1414141867#define MP_GRAY9 0x1717171868#define MP_GREY9 0x1717171869#define MP_GRAY10 0x1a1a1a1870#define MP_GREY10 0x1a1a1a1871#define MP_GRAY11 0x1c1c1c1872#define MP_GREY11 0x1c1c1c1873#define MP_GRAY12 0x1f1f1f1874#define MP_GREY12 0x1f1f1f1875#define MP_GRAY13 0x2121211876#define MP_GREY13 0x2121211877#define MP_GRAY14 0x2424241878#define MP_GREY14 0x2424241879#define MP_GRAY15 0x2626261880#define MP_GREY15 0x2626261881#define MP_GRAY16 0x2929291882#define MP_GREY16 0x2929291883#define MP_GRAY17 0x2b2b2b1884#define MP_GREY17 0x2b2b2b1885#define MP_GRAY18 0x2e2e2e1886#define MP_GREY18 0x2e2e2e1887#define MP_GRAY19 0x3030301888#define MP_GREY19 0x3030301889#define MP_GRAY20 0x3333331890#define MP_GREY20 0x3333331891#define MP_GRAY21 0x3636361892#define MP_GREY21 0x3636361893#define MP_GRAY22 0x3838381894#define MP_GREY22 0x3838381895#define MP_GRAY23 0x3b3b3b1896#define MP_GREY23 0x3b3b3b1897#define MP_GRAY24 0x3d3d3d1898#define MP_GREY24 0x3d3d3d1899#define MP_GRAY25 0x4040401900#define MP_GREY25 0x4040401901#define MP_GRAY26 0x4242421902#define MP_GREY26 0x4242421903#define MP_GRAY27 0x4545451904#define MP_GREY27 0x4545451905#define MP_GRAY28 0x4747471906#define MP_GREY28 0x4747471907#define MP_GRAY29 0x4a4a4a1908#define MP_GREY29 0x4a4a4a1909#define MP_GRAY30 0x4d4d4d1910#define MP_GREY30 0x4d4d4d1911#define MP_GRAY31 0x4f4f4f1912#define MP_GREY31 0x4f4f4f1913#define MP_GRAY32 0x5252521914#define MP_GREY32 0x5252521915#define MP_GRAY33 0x5454541916#define MP_GREY33 0x5454541917#define MP_GRAY34 0x5757571918#define MP_GREY34 0x5757571919#define MP_GRAY35 0x5959591920#define MP_GREY35 0x5959591921#define MP_GRAY36 0x5c5c5c1922#define MP_GREY36 0x5c5c5c1923#define MP_GRAY37 0x5e5e5e1924#define MP_GREY37 0x5e5e5e1925#define MP_GRAY38 0x6161611926#define MP_GREY38 0x6161611927#define MP_GRAY39 0x6363631928#define MP_GREY39 0x6363631929#define MP_GRAY40 0x6666661930#define MP_GREY40 0x6666661931#define MP_GRAY41 0x6969691932#define MP_GREY41 0x6969691933#define MP_GRAY42 0x6b6b6b1934#define MP_GREY42 0x6b6b6b1935#define MP_GRAY43 0x6e6e6e1936#define MP_GREY43 0x6e6e6e1937#define MP_GRAY44 0x7070701938#define MP_GREY44 0x7070701939#define MP_GRAY45 0x7373731940#define MP_GREY45 0x7373731941#define MP_GRAY46 0x7575751942#define MP_GREY46 0x7575751943#define MP_GRAY47 0x7878781944#define MP_GREY47 0x7878781945#define MP_GRAY48 0x7a7a7a1946#define MP_GREY48 0x7a7a7a1947#define MP_GRAY49 0x7d7d7d1948#define MP_GREY49 0x7d7d7d1949#define MP_GRAY50 0x7f7f7f1950#define MP_GREY50 0x7f7f7f1951#define MP_GRAY51 0x8282821952#define MP_GREY51 0x8282821953#define MP_GRAY52 0x8585851954#define MP_GREY52 0x8585851955#define MP_GRAY53 0x8787871956#define MP_GREY53 0x8787871957#define MP_GRAY54 0x8a8a8a1958#define MP_GREY54 0x8a8a8a1959#define MP_GRAY55 0x8c8c8c1960#define MP_GREY55 0x8c8c8c1961#define MP_GRAY56 0x8f8f8f1962#define MP_GREY56 0x8f8f8f1963#define MP_GRAY57 0x9191911964#define MP_GREY57 0x9191911965#define MP_GRAY58 0x9494941966#define MP_GREY58 0x9494941967#define MP_GRAY59 0x9696961968#define MP_GREY59 0x9696961969#define MP_GRAY60 0x9999991970#define MP_GREY60 0x9999991971#define MP_GRAY61 0x9c9c9c1972#define MP_GREY61 0x9c9c9c1973#define MP_GRAY62 0x9e9e9e1974#define MP_GREY62 0x9e9e9e1975#define MP_GRAY63 0xa1a1a11976#define MP_GREY63 0xa1a1a11977#define MP_GRAY64 0xa3a3a31978#define MP_GREY64 0xa3a3a31979#define MP_GRAY65 0xa6a6a61980#define MP_GREY65 0xa6a6a61981#define MP_GRAY66 0xa8a8a81982#define MP_GREY66 0xa8a8a81983#define MP_GRAY67 0xababab1984#define MP_GREY67 0xababab1985#define MP_GRAY68 0xadadad1986#define MP_GREY68 0xadadad1987#define MP_GRAY69 0xb0b0b01988#define MP_GREY69 0xb0b0b01989#define MP_GRAY70 0xb3b3b31990#define MP_GREY70 0xb3b3b31991#define MP_GRAY71 0xb5b5b51992#define MP_GREY71 0xb5b5b51993#define MP_GRAY72 0xb8b8b81994#define MP_GREY72 0xb8b8b81995#define MP_GRAY73 0xbababa1996#define MP_GREY73 0xbababa1997#define MP_GRAY74 0xbdbdbd1998#define MP_GREY74 0xbdbdbd1999#define MP_GRAY75 0xbfbfbf2000#define MP_GREY75 0xbfbfbf2001#define MP_GRAY76 0xc2c2c22002#define MP_GREY76 0xc2c2c22003#define MP_GRAY77 0xc4c4c42004#define MP_GREY77 0xc4c4c42005#define MP_GRAY78 0xc7c7c72006#define MP_GREY78 0xc7c7c72007#define MP_GRAY79 0xc9c9c92008#define MP_GREY79 0xc9c9c92009#define MP_GRAY80 0xcccccc2010#define MP_GREY80 0xcccccc2011#define MP_GRAY81 0xcfcfcf2012#define MP_GREY81 0xcfcfcf2013#define MP_GRAY82 0xd1d1d12014#define MP_GREY82 0xd1d1d12015#define MP_GRAY83 0xd4d4d42016#define MP_GREY83 0xd4d4d42017#define MP_GRAY84 0xd6d6d62018#define MP_GREY84 0xd6d6d62019#define MP_GRAY85 0xd9d9d92020#define MP_GREY85 0xd9d9d92021#define MP_GRAY86 0xdbdbdb2022#define MP_GREY86 0xdbdbdb2023#define MP_GRAY87 0xdedede2024#define MP_GREY87 0xdedede2025#define MP_GRAY88 0xe0e0e02026#define MP_GREY88 0xe0e0e02027#define MP_GRAY89 0xe3e3e32028#define MP_GREY89 0xe3e3e32029#define MP_GRAY90 0xe5e5e52030#define MP_GREY90 0xe5e5e52031#define MP_GRAY91 0xe8e8e82032#define MP_GREY91 0xe8e8e82033#define MP_GRAY92 0xebebeb2034#define MP_GREY92 0xebebeb2035#define MP_GRAY93 0xededed2036#define MP_GREY93 0xededed2037#define MP_GRAY94 0xf0f0f02038#define MP_GREY94 0xf0f0f02039#define MP_GRAY95 0xf2f2f22040#define MP_GREY95 0xf2f2f22041#define MP_GRAY96 0xf5f5f52042#define MP_GREY96 0xf5f5f52043#define MP_GRAY97 0xf7f7f72044#define MP_GREY97 0xf7f7f72045#define MP_GRAY98 0xfafafa2046#define MP_GREY98 0xfafafa2047#define MP_GRAY99 0xfcfcfc2048#define MP_GREY99 0xfcfcfc2049#define MP_GRAY100 0xffffff2050#define MP_GREY100 0xffffff2051#define MP_DARKGREY 0xa9a9a92052#define MP_DARKGRAY 0xa9a9a92053#define MP_DARKBLUE 0x00008b2054#define MP_DARKCYAN 0x008b8b2055#define MP_DARKMAGENTA 0x8b008b2056#define MP_DARKRED 0x8b00002057#define MP_LIGHTGREEN 0x90ee90205820592060