This commit is contained in:
Branimir Karadžić 2017-01-20 16:28:12 -08:00
Родитель 335c1ae320
Коммит 8a1c9a2f27
4 изменённых файлов: 6 добавлений и 31 удалений

Просмотреть файл

@ -392,7 +392,7 @@ namespace bgfx
if (BX_UNLIKELY(NULL == g_callback) ) if (BX_UNLIKELY(NULL == g_callback) )
{ {
dbgPrintfVargs(_format, argList); bx::debugPrintfVargs(_format, argList);
abort(); abort();
} }
else else
@ -420,7 +420,7 @@ namespace bgfx
if (BX_UNLIKELY(NULL == g_callback) ) if (BX_UNLIKELY(NULL == g_callback) )
{ {
dbgPrintfVargs(_format, argList); bx::debugPrintfVargs(_format, argList);
} }
else else
{ {

Просмотреть файл

@ -83,9 +83,6 @@ namespace bgfx
void trace(const char* _filePath, uint16_t _line, const char* _format, ...); 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 VertexDeclHandle& _lhs, const VertexDeclHandle& _rhs) { return _lhs.idx == _rhs.idx; }
inline bool operator==(const UniformHandle& _lhs, const UniformHandle& _rhs) { return _lhs.idx == _rhs.idx; } inline bool operator==(const UniformHandle& _lhs, const UniformHandle& _rhs) { return _lhs.idx == _rhs.idx; }
} }

Просмотреть файл

@ -2397,8 +2397,8 @@ data.NumQualityLevels = 0;
{ {
if (0 != memcmp(&program.m_fsh->m_code->data[ii], &temp->data[ii], 16) ) 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, ""); // bx::debugPrintfData(&program.m_fsh->m_code->data[ii], temp->size-ii, "");
// dbgPrintfData(&temp->data[ii], temp->size-ii, ""); // bx::debugPrintfData(&temp->data[ii], temp->size-ii, "");
break; break;
} }
} }

Просмотреть файл

@ -64,28 +64,6 @@ namespace bgfx
s_attribTypeSize[RendererType::Count] = s_attribTypeSize[_type]; 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() VertexDecl::VertexDecl()
{ {
// BK - struct need to have ctor to qualify as non-POD data. // BK - struct need to have ctor to qualify as non-POD data.
@ -172,7 +150,7 @@ namespace bgfx
{ {
if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
{ {
dbgPrintf("vertexdecl %08x (%08x), stride %d\n" bx::debugPrintf("vertexdecl %08x (%08x), stride %d\n"
, _decl.m_hash , _decl.m_hash
, bx::hashMurmur2A(_decl.m_attributes) , bx::hashMurmur2A(_decl.m_attributes)
, _decl.m_stride , _decl.m_stride
@ -188,7 +166,7 @@ namespace bgfx
bool asInt; bool asInt;
_decl.decode(Attrib::Enum(attr), num, type, normalized, 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 , attr
, getAttribName(Attrib::Enum(attr) ) , getAttribName(Attrib::Enum(attr) )
, num , num