mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 21:13:02 +01:00
Fix crash when hitting max draw call limit (#2440)
* Expand instancing demo to have non-instanced path * Fix count vs. index off by one error when hitting max draw calls
This commit is contained in:
committed by
GitHub
parent
e38920c07b
commit
cb77d3bb46
@@ -1237,7 +1237,7 @@ namespace bgfx
|
||||
}
|
||||
|
||||
const uint32_t renderItemIdx = bx::atomicFetchAndAddsat<uint32_t>(&m_frame->m_numRenderItems, 1, BGFX_CONFIG_MAX_DRAW_CALLS);
|
||||
if (BGFX_CONFIG_MAX_DRAW_CALLS-1 <= renderItemIdx)
|
||||
if (BGFX_CONFIG_MAX_DRAW_CALLS <= renderItemIdx)
|
||||
{
|
||||
discard(_flags);
|
||||
++m_numDropped;
|
||||
|
||||
Reference in New Issue
Block a user