Skip to content

Commit e83ccf0

Browse files
Updated core & samples (fixed premature flushes in VK)
1 parent fe59e09 commit e83ccf0

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

Projects/Asteroids/src/asteroids_DE.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ void Asteroids::InitDevice(HWND hWnd, RENDER_DEVICE_TYPE DevType)
139139
EngineD3D12CreateInfo EngineCI;
140140
EngineCI.NumDeferredContexts = mNumSubsets - 1;
141141
EngineCI.GPUDescriptorHeapDynamicSize[0] = 65536 * 4;
142-
EngineCI.GPUDescriptorHeapSize[0] = 65536; // For mutable mode
143-
EngineCI.NumCommandsToFlushCmdList = 1024;
142+
EngineCI.GPUDescriptorHeapSize[0] = 65536; // For mutable mode
143+
EngineCI.NumCommandsToFlushCmdList = UINT_MAX; // Never flush the context while recording commands
144144
# ifndef _DEBUG
145145
EngineCI.DynamicDescriptorAllocationChunkSize[0] = 8192;
146146
# endif
@@ -160,8 +160,9 @@ void Asteroids::InitDevice(HWND hWnd, RENDER_DEVICE_TYPE DevType)
160160
case RENDER_DEVICE_TYPE_VULKAN:
161161
{
162162
EngineVkCreateInfo EngineCI;
163-
EngineCI.NumDeferredContexts = mNumSubsets - 1;
164-
EngineCI.DynamicHeapSize = 64 << 20;
163+
EngineCI.NumDeferredContexts = mNumSubsets - 1;
164+
EngineCI.DynamicHeapSize = 64 << 20;
165+
EngineCI.NumCommandsToFlushCmdBuffer = UINT_MAX; // Never flush the context while recording commands
165166
# if ENGINE_DLL
166167
if (GetEngineFactoryVulkan == nullptr)
167168
GetEngineFactoryVulkan = LoadGraphicsEngineVk();

0 commit comments

Comments
 (0)