mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- 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()
|
||||
|
|
|
@ -113,6 +113,8 @@ protected:
|
|||
bool mLastModelMatrixEnabled = true;
|
||||
bool mLastTextureMatrixEnabled = true;
|
||||
|
||||
int mApplyCount = 0;
|
||||
|
||||
struct RenderTarget
|
||||
{
|
||||
VulkanImageView *View = nullptr;
|
||||
|
|
Loading…
Reference in a new issue