示例#1
0
        public override void ExecuteCommands(CommandList cl)
        {
            D3D11CommandList d3d11CL = Util.AssertSubtype <CommandList, D3D11CommandList>(cl);

            _immediateContext.ExecuteCommandList(d3d11CL.DeviceCommandList, false);
            d3d11CL.DeviceCommandList.Dispose();
            d3d11CL.DeviceCommandList = null;
            CommandListsReferencingSwapchain.Remove(d3d11CL);
        }
示例#2
0
        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();
            }
        }