- flush the commands for every 1000th Apply call
This commit is contained in:
parent
8fadf3d9bd
commit
3957a19bd0
2 changed files with 11 additions and 0 deletions
|
|
@ -160,6 +160,14 @@ void VkRenderState::EnableLineSmooth(bool on)
|
|||
|
||||
void VkRenderState::Apply(int dt)
|
||||
{
|
||||
mApplyCount++;
|
||||
if (mApplyCount == 1000)
|
||||
{
|
||||
EndRenderPass();
|
||||
GetVulkanFrameBuffer()->FlushCommands();
|
||||
mApplyCount = 0;
|
||||
}
|
||||
|
||||
ApplyRenderPass(dt);
|
||||
ApplyScissor();
|
||||
ApplyViewport();
|
||||
|
|
@ -548,6 +556,7 @@ void VkRenderState::Bind(int bindingpoint, uint32_t offset)
|
|||
void VkRenderState::BeginFrame()
|
||||
{
|
||||
mMaterial.Reset();
|
||||
mApplyCount = 0;
|
||||
}
|
||||
|
||||
void VkRenderState::EndRenderPass()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue