mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +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)
|
void VkRenderState::Apply(int dt)
|
||||||
{
|
{
|
||||||
|
mApplyCount++;
|
||||||
|
if (mApplyCount == 1000)
|
||||||
|
{
|
||||||
|
EndRenderPass();
|
||||||
|
GetVulkanFrameBuffer()->FlushCommands();
|
||||||
|
mApplyCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ApplyRenderPass(dt);
|
ApplyRenderPass(dt);
|
||||||
ApplyScissor();
|
ApplyScissor();
|
||||||
ApplyViewport();
|
ApplyViewport();
|
||||||
|
@ -548,6 +556,7 @@ void VkRenderState::Bind(int bindingpoint, uint32_t offset)
|
||||||
void VkRenderState::BeginFrame()
|
void VkRenderState::BeginFrame()
|
||||||
{
|
{
|
||||||
mMaterial.Reset();
|
mMaterial.Reset();
|
||||||
|
mApplyCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VkRenderState::EndRenderPass()
|
void VkRenderState::EndRenderPass()
|
||||||
|
|
|
@ -113,6 +113,8 @@ protected:
|
||||||
bool mLastModelMatrixEnabled = true;
|
bool mLastModelMatrixEnabled = true;
|
||||||
bool mLastTextureMatrixEnabled = true;
|
bool mLastTextureMatrixEnabled = true;
|
||||||
|
|
||||||
|
int mApplyCount = 0;
|
||||||
|
|
||||||
struct RenderTarget
|
struct RenderTarget
|
||||||
{
|
{
|
||||||
VulkanImageView *View = nullptr;
|
VulkanImageView *View = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue