Removed use of debugPrintf.

This commit is contained in:
Branimir Karadžić 2018-11-26 17:32:15 -08:00
parent b50c64289a
commit 9abc80cb62
4 changed files with 35 additions and 37 deletions

View File

@ -488,6 +488,40 @@ namespace bgfx
return handle;
}
void dump(const VertexDecl& _decl)
{
if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
{
BX_TRACE("vertexdecl %08x (%08x), stride %d\n"
, _decl.m_hash
, bx::hash<bx::HashMurmur2A>(_decl.m_attributes)
, _decl.m_stride
);
for (uint32_t attr = 0; attr < Attrib::Count; ++attr)
{
if (UINT16_MAX != _decl.m_attributes[attr])
{
uint8_t num;
AttribType::Enum type;
bool normalized;
bool asInt;
_decl.decode(Attrib::Enum(attr), num, type, normalized, asInt);
BX_TRACE("\tattr %d - %s, num %d, type %d, norm %d, asint %d, offset %d\n"
, attr
, getAttribName(Attrib::Enum(attr) )
, num
, type
, normalized
, asInt
, _decl.m_offset[attr]
);
}
}
}
}
#include "charset.h"
void charsetFillTexture(const uint8_t* _charset, uint8_t* _rgba, uint32_t _height, uint32_t _pitch, uint32_t _bpp)

View File

@ -528,6 +528,7 @@ namespace bgfx
return 1;
}
/// Dump vertex declaration into debug output.
void dump(const VertexDecl& _decl);
struct TextVideoMem

View File

@ -153,40 +153,6 @@ namespace bgfx
return s_attrName[_attr*2+1];
}
void dump(const VertexDecl& _decl)
{
if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
{
bx::debugPrintf("vertexdecl %08x (%08x), stride %d\n"
, _decl.m_hash
, bx::hash<bx::HashMurmur2A>(_decl.m_attributes)
, _decl.m_stride
);
for (uint32_t attr = 0; attr < Attrib::Count; ++attr)
{
if (UINT16_MAX != _decl.m_attributes[attr])
{
uint8_t num;
AttribType::Enum type;
bool normalized;
bool asInt;
_decl.decode(Attrib::Enum(attr), num, type, normalized, asInt);
bx::debugPrintf("\tattr %d - %s, num %d, type %d, norm %d, asint %d, offset %d\n"
, attr
, getAttribName(Attrib::Enum(attr) )
, num
, type
, normalized
, asInt
, _decl.m_offset[attr]
);
}
}
}
}
struct AttribToId
{
Attrib::Enum attr;

View File

@ -20,9 +20,6 @@ namespace bgfx
///
const char* getAttribNameShort(Attrib::Enum _attr);
/// Dump vertex declaration into debug output.
void dump(const VertexDecl& _decl);
///
Attrib::Enum idToAttrib(uint16_t id);