Don't double-quote profiler literals
This commit is contained in:
parent
1b85139371
commit
eeb5fe7c02
@ -54,22 +54,22 @@ BX_PRAGMA_DIAGNOSTIC_POP()
|
|||||||
| BGFX_STATE_DEPTH_TEST_MASK \
|
| BGFX_STATE_DEPTH_TEST_MASK \
|
||||||
)
|
)
|
||||||
|
|
||||||
#define BGFX_D3D11_PROFILER_BEGIN(_view, _abgr) \
|
#define BGFX_D3D11_PROFILER_BEGIN(_view, _abgr) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
PIX_BEGINEVENT(_abgr, s_viewNameW[_view]); \
|
PIX_BEGINEVENT(_abgr, s_viewNameW[_view]); \
|
||||||
BGFX_PROFILER_BEGIN(s_viewName[view], _abgr); \
|
BGFX_PROFILER_BEGIN(s_viewName[view], _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_D3D11_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
#define BGFX_D3D11_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
PIX_BEGINEVENT(_abgr, L"" # _name); \
|
PIX_BEGINEVENT(_abgr, L"" _name); \
|
||||||
BGFX_PROFILER_BEGIN_LITERAL("" # _name, _abgr); \
|
BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_D3D11_PROFILER_END() \
|
#define BGFX_D3D11_PROFILER_END() \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
BGFX_PROFILER_END(); \
|
BGFX_PROFILER_END(); \
|
||||||
PIX_ENDEVENT(); \
|
PIX_ENDEVENT(); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
namespace bgfx { namespace d3d11
|
namespace bgfx { namespace d3d11
|
||||||
|
@ -90,8 +90,8 @@ extern "C" uint64_t WINAPI bgfx_PIXEventsReplaceBlock(bool _g
|
|||||||
|
|
||||||
#define BGFX_D3D12_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
#define BGFX_D3D12_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
PIX3_BEGINEVENT(m_commandList, _abgr, "" # _name); \
|
PIX3_BEGINEVENT(m_commandList, _abgr, "" _name); \
|
||||||
BGFX_PROFILER_BEGIN_LITERAL("" # _name, _abgr); \
|
BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_D3D12_PROFILER_END() \
|
#define BGFX_D3D12_PROFILER_END() \
|
||||||
|
@ -25,22 +25,22 @@
|
|||||||
#include "renderer_d3d.h"
|
#include "renderer_d3d.h"
|
||||||
#include "nvapi.h"
|
#include "nvapi.h"
|
||||||
|
|
||||||
#define BGFX_D3D9_PROFILER_BEGIN(_view, _abgr) \
|
#define BGFX_D3D9_PROFILER_BEGIN(_view, _abgr) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
PIX_BEGINEVENT(_abgr, s_viewNameW[_view]); \
|
PIX_BEGINEVENT(_abgr, s_viewNameW[_view]); \
|
||||||
BGFX_PROFILER_BEGIN(s_viewName[view], _abgr); \
|
BGFX_PROFILER_BEGIN(s_viewName[view], _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_D3D9_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
#define BGFX_D3D9_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
PIX_BEGINEVENT(_abgr, L"" # _name); \
|
PIX_BEGINEVENT(_abgr, L"" _name); \
|
||||||
BGFX_PROFILER_BEGIN_LITERAL("" # _name, _abgr); \
|
BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_D3D9_PROFILER_END() \
|
#define BGFX_D3D9_PROFILER_END() \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
BGFX_PROFILER_END(); \
|
BGFX_PROFILER_END(); \
|
||||||
PIX_ENDEVENT(); \
|
PIX_ENDEVENT(); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
namespace bgfx { namespace d3d9
|
namespace bgfx { namespace d3d9
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
#define BGFX_GL_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
#define BGFX_GL_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
GL_CHECK(glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, "" # _name) ); \
|
GL_CHECK(glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, "" _name) ); \
|
||||||
BGFX_PROFILER_BEGIN_LITERAL("" # _name, _abgr); \
|
BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_GL_PROFILER_END() \
|
#define BGFX_GL_PROFILER_END() \
|
||||||
|
@ -23,9 +23,9 @@
|
|||||||
BGFX_PROFILER_BEGIN(s_viewName[view], _abgr); \
|
BGFX_PROFILER_BEGIN(s_viewName[view], _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_MTL_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
#define BGFX_MTL_PROFILER_BEGIN_LITERAL(_name, _abgr) \
|
||||||
BX_MACRO_BLOCK_BEGIN \
|
BX_MACRO_BLOCK_BEGIN \
|
||||||
BGFX_PROFILER_BEGIN_LITERAL("" # _name, _abgr); \
|
BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_MTL_PROFILER_END() \
|
#define BGFX_MTL_PROFILER_END() \
|
||||||
|
@ -5690,7 +5690,7 @@ VK_DESTROY
|
|||||||
BX_UNUSED(_render, _clearQuad, _textVideoMemBlitter);
|
BX_UNUSED(_render, _clearQuad, _textVideoMemBlitter);
|
||||||
|
|
||||||
m_commandBuffer = beginNewCommand();
|
m_commandBuffer = beginNewCommand();
|
||||||
BGFX_VK_PROFILER_BEGIN_LITERAL(rendererSubmit, kColorView);
|
BGFX_VK_PROFILER_BEGIN_LITERAL("rendererSubmit", kColorView);
|
||||||
submitCommandAndWait(m_commandBuffer);
|
submitCommandAndWait(m_commandBuffer);
|
||||||
m_commandBuffer = VK_NULL_HANDLE;
|
m_commandBuffer = VK_NULL_HANDLE;
|
||||||
|
|
||||||
@ -6490,7 +6490,7 @@ BX_UNUSED(presentMin, presentMax);
|
|||||||
|
|
||||||
if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) )
|
if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) )
|
||||||
{
|
{
|
||||||
BGFX_VK_PROFILER_BEGIN_LITERAL(debugstats, kColorFrame);
|
BGFX_VK_PROFILER_BEGIN_LITERAL("debugstats", kColorFrame);
|
||||||
|
|
||||||
// m_needPresent = true;
|
// m_needPresent = true;
|
||||||
TextVideoMem& tvm = m_textVideoMem;
|
TextVideoMem& tvm = m_textVideoMem;
|
||||||
@ -6643,7 +6643,7 @@ BX_UNUSED(presentMin, presentMax);
|
|||||||
}
|
}
|
||||||
else if (_render->m_debug & BGFX_DEBUG_TEXT)
|
else if (_render->m_debug & BGFX_DEBUG_TEXT)
|
||||||
{
|
{
|
||||||
BGFX_VK_PROFILER_BEGIN_LITERAL(debugtext, kColorFrame);
|
BGFX_VK_PROFILER_BEGIN_LITERAL("debugtext", kColorFrame);
|
||||||
|
|
||||||
blit(this, _textVideoMemBlitter, _render->m_textVideoMem);
|
blit(this, _textVideoMemBlitter, _render->m_textVideoMem);
|
||||||
|
|
||||||
|
@ -252,14 +252,14 @@
|
|||||||
VkDebugUtilsLabelEXT dul; \
|
VkDebugUtilsLabelEXT dul; \
|
||||||
dul.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT; \
|
dul.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT; \
|
||||||
dul.pNext = NULL; \
|
dul.pNext = NULL; \
|
||||||
dul.pLabelName = "" # _name; \
|
dul.pLabelName = "" _name; \
|
||||||
dul.color[0] = ((_abgr >> 24) & 0xff) / 255.0f; \
|
dul.color[0] = ((_abgr >> 24) & 0xff) / 255.0f; \
|
||||||
dul.color[1] = ((_abgr >> 16) & 0xff) / 255.0f; \
|
dul.color[1] = ((_abgr >> 16) & 0xff) / 255.0f; \
|
||||||
dul.color[2] = ((_abgr >> 8) & 0xff) / 255.0f; \
|
dul.color[2] = ((_abgr >> 8) & 0xff) / 255.0f; \
|
||||||
dul.color[3] = ((_abgr >> 0) & 0xff) / 255.0f; \
|
dul.color[3] = ((_abgr >> 0) & 0xff) / 255.0f; \
|
||||||
vkCmdBeginDebugUtilsLabelEXT(m_commandBuffer, &dul); \
|
vkCmdBeginDebugUtilsLabelEXT(m_commandBuffer, &dul); \
|
||||||
} \
|
} \
|
||||||
BGFX_PROFILER_BEGIN_LITERAL("" # _name, _abgr); \
|
BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \
|
||||||
BX_MACRO_BLOCK_END
|
BX_MACRO_BLOCK_END
|
||||||
|
|
||||||
#define BGFX_VK_PROFILER_END() \
|
#define BGFX_VK_PROFILER_END() \
|
||||||
|
Loading…
Reference in New Issue
Block a user