I noticed that IDXGISwapChain::Present
takes about ~3.5ms (while having stripped all my own command recording and execution from the render loop).
According to PIX, this seems to be related to internal command recording and execution in DXGI itself.
Any ideas what might cause this? As a reference, the vanilla ImGui D3D12/x64 example (without VSync) with Debug configuration runs ≤ 1ms on the same machine.
- DXGI and D3D12 debug modes are off.
- D3D12 validation layer is off.
- Swap chain descriptor (I already tried changing format, flags, etc.):
DXGI_SWAP_CHAIN_DESC1
{
...
.Format = DXGI_FORMAT_R10G10B10A2_UNORM,
.Stereo = FALSE,
.SampleDesc = { .Count = 1u, .Quality = 0u },
.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT,
.BufferCount = 3u,
.Scaling = DXGI_SCALING_STRETCH,
.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD,
.AlphaMode = DXGI_ALPHA_MODE_IGNORE,
.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH | DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING
}