mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Warn on matrix cache overflow.
This commit is contained in:
parent
dd0cd19725
commit
517e5069c9
2 changed files with 2 additions and 2 deletions
|
@ -826,7 +826,7 @@ namespace bgfx
|
||||||
uint32_t reserve(uint16_t* _num)
|
uint32_t reserve(uint16_t* _num)
|
||||||
{
|
{
|
||||||
uint32_t num = *_num;
|
uint32_t num = *_num;
|
||||||
BX_CHECK(m_num+num < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache overflow. %d (max: %d)", m_num+num, BGFX_CONFIG_MAX_MATRIX_CACHE);
|
BX_WARN(m_num+num < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache overflow. %d (max: %d)", m_num+num, BGFX_CONFIG_MAX_MATRIX_CACHE);
|
||||||
num = bx::uint32_min(num, BGFX_CONFIG_MAX_MATRIX_CACHE-m_num);
|
num = bx::uint32_min(num, BGFX_CONFIG_MAX_MATRIX_CACHE-m_num);
|
||||||
uint32_t first = m_num;
|
uint32_t first = m_num;
|
||||||
m_num += num;
|
m_num += num;
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
#endif // BGFX_CONFIG_MAX_DRAW_CALLS
|
#endif // BGFX_CONFIG_MAX_DRAW_CALLS
|
||||||
|
|
||||||
#ifndef BGFX_CONFIG_MAX_BLIT_ITEMS
|
#ifndef BGFX_CONFIG_MAX_BLIT_ITEMS
|
||||||
# define BGFX_CONFIG_MAX_BLIT_ITEMS 256
|
# define BGFX_CONFIG_MAX_BLIT_ITEMS (1<<10)
|
||||||
#endif // BGFX_CONFIG_MAX_BLIT_ITEMS
|
#endif // BGFX_CONFIG_MAX_BLIT_ITEMS
|
||||||
|
|
||||||
#ifndef BGFX_CONFIG_MAX_MATRIX_CACHE
|
#ifndef BGFX_CONFIG_MAX_MATRIX_CACHE
|
||||||
|
|
Loading…
Reference in a new issue