public Auto(T value, MultiFenceHolder waitable, params IAutoPrivate[] referencedObjs) : this(value) { _waitable = waitable; _referencedObjs = referencedObjs; for (int i = 0; i < referencedObjs.Length; i++) { referencedObjs[i].IncrementReferenceCount(); } }
public BufferHolder(VulkanRenderer gd, Device device, VkBuffer buffer, MemoryAllocation allocation, int size) { _gd = gd; _device = device; _allocation = allocation; _allocationAuto = new Auto <MemoryAllocation>(allocation); _waitable = new MultiFenceHolder(size); _buffer = new Auto <DisposableBuffer>(new DisposableBuffer(gd.Api, device, buffer), _waitable, _allocationAuto); _bufferHandle = buffer.Handle; Size = size; _map = allocation.HostPointer; }
public void AddWaitable(MultiFenceHolder waitable) { lock (_commandBuffers) { for (int i = 0; i < _totalCommandBuffers; i++) { ref var entry = ref _commandBuffers[i]; if (entry.InConsumption) { AddWaitable(i, waitable); } } }
public void Create(ulong id) { MultiFenceHolder waitable = new MultiFenceHolder(); _gd.FlushAllCommands(); _gd.CommandBufferPool.AddWaitable(waitable); SyncHandle handle = new SyncHandle { ID = id, Waitable = waitable }; lock (_handles) { _handles.Add(handle); } }
public void AddWaitable(MultiFenceHolder waitable) { _pool.AddWaitable(CommandBufferIndex, waitable); }