private protected override void SubmitCommandsCore(CommandList cl, Fence fence) { D3D11CommandList d3d11CL = Util.AssertSubtype <CommandList, D3D11CommandList>(cl); lock (_immediateContextLock) { if (d3d11CL.DeviceCommandList != null) // CommandList may have been reset in the meantime (resized swapchain). { _immediateContext.ExecuteCommandList(d3d11CL.DeviceCommandList, false); d3d11CL.OnCompleted(); } } if (fence is D3D11Fence d3d11Fence) { d3d11Fence.Set(); } }