Przeglądaj źródła

Added resource guard to allocInstanceDataBuffer.

Branimir Karadžić 7 lat temu
rodzic
commit
a04350635a
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/bgfx_p.h

+ 2 - 0
src/bgfx_p.h

@@ -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);