- add vk_submit_multithread for doing command buffer submit calls on a worker thread

- add vk_submit_size for testing various command buffer sizes before flushing them
- add submitted command buffer count to renderstats
This commit is contained in:
Magnus Norddahl 2019-04-19 22:42:32 +02:00
commit 458da39c39
4 changed files with 121 additions and 22 deletions

View file

@ -17,6 +17,8 @@
#include "hwrenderer/data/hw_viewpointbuffer.h"
#include "hwrenderer/data/shaderuniforms.h"
CVAR(Int, vk_submit_size, 1000, 0);
VkRenderState::VkRenderState()
{
mIdentityMatrix.loadIdentity();
@ -161,7 +163,7 @@ void VkRenderState::EnableLineSmooth(bool on)
void VkRenderState::Apply(int dt)
{
mApplyCount++;
if (mApplyCount == 1000)
if (mApplyCount >= vk_submit_size)
{
EndRenderPass();
GetVulkanFrameBuffer()->FlushCommands();