mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-04-24 04:53:28 -04:00
Fixed vertexdecl leak.
This commit is contained in:
parent
61ec034023
commit
5ffff78d8d
2 changed files with 8 additions and 2 deletions
|
@ -1351,6 +1351,12 @@ namespace bgfx
|
|||
m_dynVertexBufferAllocator.compact();
|
||||
m_dynIndexBufferAllocator.compact();
|
||||
|
||||
BX_CHECK(m_vertexDeclHandle.getNumHandles() == uint16_t(m_declRef.m_vertexDeclMap.size() )
|
||||
, "VertexDeclRef mismatch, num handles %d, handles in hash map %d."
|
||||
, m_vertexDeclHandle.getNumHandles()
|
||||
, m_declRef.m_vertexDeclMap.size()
|
||||
);
|
||||
|
||||
m_declRef.shutdown(m_vertexDeclHandle);
|
||||
|
||||
#if BGFX_CONFIG_MULTITHREADED
|
||||
|
|
|
@ -2271,7 +2271,7 @@ namespace bgfx
|
|||
{
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyVertexDecl);
|
||||
cmdbuf.write(declHandle);
|
||||
m_submit->free(declHandle);
|
||||
m_render->free(declHandle);
|
||||
}
|
||||
|
||||
m_vertexBufferHandle.free(_handle.idx);
|
||||
|
@ -2564,7 +2564,7 @@ namespace bgfx
|
|||
{
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyVertexDecl);
|
||||
cmdbuf.write(declHandle);
|
||||
m_submit->free(declHandle);
|
||||
m_render->free(declHandle);
|
||||
}
|
||||
|
||||
if (0 != (dvb.m_flags & BGFX_BUFFER_COMPUTE_WRITE) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue