Remove CommandBufferScoped Dependencies (#6958)

This commit is contained in:
Isaac Marovitz 2024-07-16 21:01:06 +01:00 committed by GitHub
parent eb212aa91b
commit 344f4f52c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 82 deletions

View file

@ -31,11 +31,9 @@ namespace Ryujinx.Graphics.Vulkan
public int SubmissionCount;
public CommandBuffer CommandBuffer;
public FenceHolder Fence;
public SemaphoreHolder Semaphore;
public List<IAuto> Dependants;
public List<MultiFenceHolder> Waitables;
public HashSet<SemaphoreHolder> Dependencies;
public void Initialize(Vk api, Device device, CommandPool pool)
{
@ -51,7 +49,6 @@ namespace Ryujinx.Graphics.Vulkan
Dependants = new List<IAuto>();
Waitables = new List<MultiFenceHolder>();
Dependencies = new HashSet<SemaphoreHolder>();
}
}
@ -143,14 +140,6 @@ namespace Ryujinx.Graphics.Vulkan
}
}
public void AddDependency(int cbIndex, CommandBufferScoped dependencyCbs)
{
Debug.Assert(_commandBuffers[cbIndex].InUse);
var semaphoreHolder = _commandBuffers[dependencyCbs.CommandBufferIndex].Semaphore;
semaphoreHolder.Get();
_commandBuffers[cbIndex].Dependencies.Add(semaphoreHolder);
}
public void AddWaitable(int cbIndex, MultiFenceHolder waitable)
{
ref var entry = ref _commandBuffers[cbIndex];
@ -354,14 +343,8 @@ namespace Ryujinx.Graphics.Vulkan
waitable.RemoveBufferUses(cbIndex);
}
foreach (var dependency in entry.Dependencies)
{
dependency.Put();
}
entry.Dependants.Clear();
entry.Waitables.Clear();
entry.Dependencies.Clear();
entry.Fence?.Dispose();
if (refreshFence)