Added resource guard to allocInstanceDataBuffer.

This commit is contained in:
Branimir Karadžić 2018-04-22 08:22:16 -07:00
parent 0a72ce0110
commit a04350635a
1 changed files with 2 additions and 0 deletions

View File

@ -3454,6 +3454,8 @@ namespace bgfx
BGFX_API_FUNC(void allocInstanceDataBuffer(InstanceDataBuffer* _idb, uint32_t _num, uint16_t _stride) )
{
BGFX_MUTEX_SCOPE(m_resourceApiLock);
uint16_t stride = BX_ALIGN_16(_stride);
uint32_t offset = m_submit->allocTransientVertexBuffer(_num, stride);