Beispiel #1
0
        public CommandListSingleAllocationPolicy(CommandListType type, Device device)
        {
            var allocatorDesc = new CommandAllocator.Descriptor()
            {
                Type = type
            };

            Allocator = device.Create(ref allocatorDesc);
            Allocator.AddRef();
        }
Beispiel #2
0
        public void StartRecording()
        {
            Assert.Always(!Recording, "CommandList is already in recording state!");

            Recording = true;

            ActiveAllocator = Desc.AllocationPolicy.GetCurrentAllocator();
            Assert.Debug(ActiveAllocator.Desc.Type == Desc.Type, "Allocator type needs to match command list type!");
            ActiveAllocator.AddRef();
            ActiveAllocator.ResetResourceUse();

            // Reset redundancy check state.
            descriptorHeapColor        = null;
            slotsColor                 = null;
            descriptorHeapDepthStencil = null;
            slotDepthStencil           = UInt32.MaxValue;

            StartRecordingImpl();
        }