Fixed assert message.

This commit is contained in:
Branimir Karadžić 2016-04-19 09:12:04 -07:00
parent fe62fe5ebf
commit da0af1e356
1 changed files with 5 additions and 2 deletions

View File

@ -2385,7 +2385,10 @@ namespace bgfx
}
uint32_t offset = (dib.m_startIndex + _startIndex)*indexSize;
uint32_t size = bx::uint32_min(bx::uint32_satsub(dib.m_size, _startIndex*indexSize), _mem->size);
uint32_t size = bx::uint32_min(offset
+ bx::uint32_min(bx::uint32_satsub(dib.m_size, _startIndex*indexSize), _mem->size)
, BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE) - offset
;
BX_CHECK(_mem->size <= size, "Truncating dynamic index buffer update (size %d, mem size %d)."
, size
, _mem->size
@ -2540,7 +2543,7 @@ namespace bgfx
, BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE) - offset
;
BX_CHECK(_mem->size <= size, "Truncating dynamic vertex buffer update (size %d, mem size %d)."
, dvb.m_size
, size
, _mem->size
);