diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 0f6479d7d..d1a271983 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -392,7 +392,7 @@ namespace bgfx if (BX_UNLIKELY(NULL == g_callback) ) { - dbgPrintfVargs(_format, argList); + bx::debugPrintfVargs(_format, argList); abort(); } else @@ -420,7 +420,7 @@ namespace bgfx if (BX_UNLIKELY(NULL == g_callback) ) { - dbgPrintfVargs(_format, argList); + bx::debugPrintfVargs(_format, argList); } else { diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 851da6017..7d0c47ad8 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -83,9 +83,6 @@ namespace bgfx void trace(const char* _filePath, uint16_t _line, const char* _format, ...); - void dbgPrintfVargs(const char* _format, va_list _argList); - void dbgPrintf(const char* _format, ...); - inline bool operator==(const VertexDeclHandle& _lhs, const VertexDeclHandle& _rhs) { return _lhs.idx == _rhs.idx; } inline bool operator==(const UniformHandle& _lhs, const UniformHandle& _rhs) { return _lhs.idx == _rhs.idx; } } diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index aac8128c4..750692c8e 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -2397,8 +2397,8 @@ data.NumQualityLevels = 0; { if (0 != memcmp(&program.m_fsh->m_code->data[ii], &temp->data[ii], 16) ) { -// dbgPrintfData(&program.m_fsh->m_code->data[ii], temp->size-ii, ""); -// dbgPrintfData(&temp->data[ii], temp->size-ii, ""); +// bx::debugPrintfData(&program.m_fsh->m_code->data[ii], temp->size-ii, ""); +// bx::debugPrintfData(&temp->data[ii], temp->size-ii, ""); break; } } diff --git a/src/vertexdecl.cpp b/src/vertexdecl.cpp index 66793c7de..70c3aafc6 100644 --- a/src/vertexdecl.cpp +++ b/src/vertexdecl.cpp @@ -64,28 +64,6 @@ namespace bgfx s_attribTypeSize[RendererType::Count] = s_attribTypeSize[_type]; } - void dbgPrintfVargs(const char* _format, va_list _argList) - { - char temp[8192]; - char* out = temp; - int32_t len = bx::vsnprintf(out, sizeof(temp), _format, _argList); - if ( (int32_t)sizeof(temp) < len) - { - out = (char*)alloca(len+1); - len = bx::vsnprintf(out, len, _format, _argList); - } - out[len] = '\0'; - bx::debugOutput(out); - } - - void dbgPrintf(const char* _format, ...) - { - va_list argList; - va_start(argList, _format); - dbgPrintfVargs(_format, argList); - va_end(argList); - } - VertexDecl::VertexDecl() { // BK - struct need to have ctor to qualify as non-POD data. @@ -172,7 +150,7 @@ namespace bgfx { if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { - dbgPrintf("vertexdecl %08x (%08x), stride %d\n" + bx::debugPrintf("vertexdecl %08x (%08x), stride %d\n" , _decl.m_hash , bx::hashMurmur2A(_decl.m_attributes) , _decl.m_stride @@ -188,7 +166,7 @@ namespace bgfx bool asInt; _decl.decode(Attrib::Enum(attr), num, type, normalized, asInt); - dbgPrintf("\tattr %d - %s, num %d, type %d, norm %d, asint %d, offset %d\n" + bx::debugPrintf("\tattr %d - %s, num %d, type %d, norm %d, asint %d, offset %d\n" , attr , getAttribName(Attrib::Enum(attr) ) , num