From a04350635a06dc79d3f709b81606d264e175a889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 22 Apr 2018 08:22:16 -0700 Subject: [PATCH] Added resource guard to allocInstanceDataBuffer. --- src/bgfx_p.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 52c0187d4..6a6e31d61 100644 --- a/src/bgfx_p.h +++ b/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);