Cleanup.
This commit is contained in:
Родитель
916d159965
Коммит
200778511e
|
@ -3110,7 +3110,7 @@ namespace bgfx
|
|||
|
||||
const char* name = (const char*)_cmdbuf.skip(len);
|
||||
|
||||
m_renderCtx->setName(handle, name);
|
||||
m_renderCtx->setName(handle, name, len-1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -2771,7 +2771,7 @@ namespace bgfx
|
|||
virtual void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) = 0;
|
||||
virtual void setMarker(const char* _marker, uint32_t _size) = 0;
|
||||
virtual void invalidateOcclusionQuery(OcclusionQueryHandle _handle) = 0;
|
||||
virtual void setName(Handle _handle, const char* _name) = 0;
|
||||
virtual void setName(Handle _handle, const char* _name, uint16_t _len) = 0;
|
||||
virtual void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) = 0;
|
||||
virtual void blitSetup(TextVideoMemBlitter& _blitter) = 0;
|
||||
virtual void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) = 0;
|
||||
|
|
|
@ -1997,24 +1997,24 @@ namespace bgfx { namespace d3d11
|
|||
m_occlusionQuery.invalidate(_handle);
|
||||
}
|
||||
|
||||
virtual void setName(Handle _handle, const char* _name) override
|
||||
virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
|
||||
{
|
||||
switch (_handle.type)
|
||||
{
|
||||
case Handle::IndexBuffer:
|
||||
setDebugObjectName(m_indexBuffers[_handle.idx].m_ptr, "%s", _name);
|
||||
setDebugObjectName(m_indexBuffers[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
case Handle::Shader:
|
||||
setDebugObjectName(m_shaders[_handle.idx].m_ptr, "%s", _name);
|
||||
setDebugObjectName(m_shaders[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
case Handle::Texture:
|
||||
setDebugObjectName(m_textures[_handle.idx].m_ptr, "%s", _name);
|
||||
setDebugObjectName(m_textures[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
case Handle::VertexBuffer:
|
||||
setDebugObjectName(m_vertexBuffers[_handle.idx].m_ptr, "%s", _name);
|
||||
setDebugObjectName(m_vertexBuffers[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1872,24 +1872,24 @@ namespace bgfx { namespace d3d12
|
|||
m_occlusionQuery.invalidate(_handle);
|
||||
}
|
||||
|
||||
virtual void setName(Handle _handle, const char* _name) override
|
||||
virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
|
||||
{
|
||||
switch (_handle.type)
|
||||
{
|
||||
case Handle::IndexBuffer:
|
||||
setDebugObjectName(m_indexBuffers[_handle.idx].m_ptr, "%s", _name);
|
||||
setDebugObjectName(m_indexBuffers[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
case Handle::Shader:
|
||||
// setDebugObjectName(m_shaders[_handle.idx].m_ptr, "%s", _name);
|
||||
// setDebugObjectName(m_shaders[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
case Handle::Texture:
|
||||
setDebugObjectName(m_textures[_handle.idx].m_ptr, "%s", _name);
|
||||
setDebugObjectName(m_textures[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
case Handle::VertexBuffer:
|
||||
setDebugObjectName(m_vertexBuffers[_handle.idx].m_ptr, "%s", _name);
|
||||
setDebugObjectName(m_vertexBuffers[_handle.idx].m_ptr, "%.*s", _len, _name);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1296,9 +1296,9 @@ namespace bgfx { namespace d3d9
|
|||
m_occlusionQuery.invalidate(_handle);
|
||||
}
|
||||
|
||||
virtual void setName(Handle _handle, const char* _name) override
|
||||
virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
|
||||
{
|
||||
BX_UNUSED(_handle, _name)
|
||||
BX_UNUSED(_handle, _name, _len)
|
||||
}
|
||||
|
||||
void submitBlit(BlitState& _bs, uint16_t _view);
|
||||
|
|
|
@ -2527,7 +2527,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
glInsertEventMarker = stubInsertEventMarker;
|
||||
}
|
||||
|
||||
m_maxLabelLen = (uint32_t)glGet(GL_MAX_LABEL_LENGTH);
|
||||
m_maxLabelLen = uint16_t(glGet(GL_MAX_LABEL_LENGTH) );
|
||||
|
||||
setGraphicsDebuggerPresent(s_extension[Extension::EXT_debug_tool].m_supported);
|
||||
|
||||
|
@ -2990,9 +2990,9 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
m_occlusionQuery.invalidate(_handle);
|
||||
}
|
||||
|
||||
virtual void setName(Handle _handle, const char* _name) override
|
||||
virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
|
||||
{
|
||||
uint32_t len = bx::strLen(_name, m_maxLabelLen);
|
||||
uint16_t len = bx::min(_len, m_maxLabelLen);
|
||||
|
||||
switch (_handle.type)
|
||||
{
|
||||
|
@ -3873,8 +3873,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
float m_maxAnisotropy;
|
||||
float m_maxAnisotropyDefault;
|
||||
int32_t m_maxMsaa;
|
||||
uint32_t m_maxLabelLen;
|
||||
GLuint m_vao;
|
||||
uint16_t m_maxLabelLen;
|
||||
bool m_blitSupported;
|
||||
bool m_readBackSupported;
|
||||
bool m_vaoSupport;
|
||||
|
|
|
@ -1015,8 +1015,10 @@ namespace bgfx { namespace mtl
|
|||
m_occlusionQuery.invalidate(_handle);
|
||||
}
|
||||
|
||||
virtual void setName(Handle _handle, const char* _name) override
|
||||
virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
|
||||
{
|
||||
BX_UNUSED(_len);
|
||||
|
||||
switch (_handle.type)
|
||||
{
|
||||
case Handle::IndexBuffer:
|
||||
|
|
|
@ -234,7 +234,7 @@ namespace bgfx { namespace noop
|
|||
{
|
||||
}
|
||||
|
||||
virtual void setName(Handle /*_handle*/, const char* /*_name*/) override
|
||||
virtual void setName(Handle /*_handle*/, const char* /*_name*/, uint16_t /*_len*/) override
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -2157,9 +2157,9 @@ VK_IMPORT_DEVICE
|
|||
BX_UNUSED(_handle);
|
||||
}
|
||||
|
||||
virtual void setName(Handle _handle, const char* _name) override
|
||||
virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
|
||||
{
|
||||
BX_UNUSED(_handle, _name)
|
||||
BX_UNUSED(_handle, _name, _len)
|
||||
}
|
||||
|
||||
void submitBlit(BlitState& _bs, uint16_t _view);
|
||||
|
|
Загрузка…
Ссылка в новой задаче