Skip to content

Fix DrawLayer::AllocateBatch minVtxCount clamp#2422

Open
cuiweixie wants to merge 1 commit intobeefytech:masterfrom
cuiweixie:fix/drawlayer-allocatebatch-minvtxcount
Open

Fix DrawLayer::AllocateBatch minVtxCount clamp#2422
cuiweixie wants to merge 1 commit intobeefytech:masterfrom
cuiweixie:fix/drawlayer-allocatebatch-minvtxcount

Conversation

@cuiweixie
Copy link
Copy Markdown

Summary

In DrawLayer::AllocateBatch, the minimum vertex count was clamped with BF_MAX(minIdxCount, 512) instead of minVtxCount, so the requested vertex budget could be wrong when it differed from the index budget.

Change

  • BeefySysLib/gfx/DrawLayer.cpp: use BF_MAX(minVtxCount, 512) for minVtxCount.

BF_MAX was incorrectly applied to minIdxCount when sizing the vertex batch;
use minVtxCount so the minimum vertex requirement is respected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant