public CommandListSingleAllocationPolicy(CommandListType type, Device device) { var allocatorDesc = new CommandAllocator.Descriptor() { Type = type }; Allocator = device.Create(ref allocatorDesc); Allocator.AddRef(); }
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(); }