|
|
@@ -2627,9 +2627,9 @@ namespace bgfx
|
|
|
uint16_t flags = BGFX_BUFFER_NONE;
|
|
|
cmdbuf.write(flags);
|
|
|
|
|
|
- size_t size = BX_ALIGN_16(sizeof(TransientIndexBuffer)) + BX_ALIGN_16(_size);
|
|
|
+ const uint32_t size = BX_ALIGN_16(sizeof(TransientIndexBuffer) ) + BX_ALIGN_16(_size);
|
|
|
tib = (TransientIndexBuffer*)BX_ALIGNED_ALLOC(g_allocator, size, 16);
|
|
|
- tib->data = (uint8_t *)((size_t)tib + BX_ALIGN_16(sizeof(TransientIndexBuffer)));
|
|
|
+ tib->data = (uint8_t *)tib + BX_ALIGN_16(sizeof(TransientIndexBuffer) );
|
|
|
tib->size = _size;
|
|
|
tib->handle = handle;
|
|
|
}
|
|
|
@@ -2643,7 +2643,7 @@ namespace bgfx
|
|
|
cmdbuf.write(_tib->handle);
|
|
|
|
|
|
m_submit->free(_tib->handle);
|
|
|
- BX_FREE(g_allocator, _tib);
|
|
|
+ BX_ALIGNED_FREE(g_allocator, _tib, 16);
|
|
|
}
|
|
|
|
|
|
BGFX_API_FUNC(void allocTransientIndexBuffer(TransientIndexBuffer* _tib, uint32_t _num) )
|
|
|
@@ -2684,9 +2684,9 @@ namespace bgfx
|
|
|
uint16_t flags = BGFX_BUFFER_NONE;
|
|
|
cmdbuf.write(flags);
|
|
|
|
|
|
- size_t size = BX_ALIGN_16(sizeof(TransientVertexBuffer)) + BX_ALIGN_16(_size);
|
|
|
+ const uint32_t size = BX_ALIGN_16(sizeof(TransientVertexBuffer) ) + BX_ALIGN_16(_size);
|
|
|
tvb = (TransientVertexBuffer*)BX_ALIGNED_ALLOC(g_allocator, size, 16);
|
|
|
- tvb->data = (uint8_t *)((size_t)tvb + BX_ALIGN_16(sizeof(TransientVertexBuffer)));
|
|
|
+ tvb->data = (uint8_t *)tvb + BX_ALIGN_16(sizeof(TransientVertexBuffer) );
|
|
|
tvb->size = _size;
|
|
|
tvb->startVertex = 0;
|
|
|
tvb->stride = stride;
|
|
|
@@ -2703,7 +2703,7 @@ namespace bgfx
|
|
|
cmdbuf.write(_tvb->handle);
|
|
|
|
|
|
m_submit->free(_tvb->handle);
|
|
|
- BX_FREE(g_allocator, _tvb);
|
|
|
+ BX_ALIGNED_FREE(g_allocator, _tvb, 16);
|
|
|
}
|
|
|
|
|
|
BGFX_API_FUNC(void allocTransientVertexBuffer(TransientVertexBuffer* _tvb, uint32_t _num, const VertexDecl& _decl) )
|