diff options
| author | TSR Berry <20988865+TSRBerry@users.noreply.github.com> | 2023-04-08 01:22:00 +0200 |
|---|---|---|
| committer | Mary <thog@protonmail.com> | 2023-04-27 23:51:14 +0200 |
| commit | cee712105850ac3385cd0091a923438167433f9f (patch) | |
| tree | 4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /Ryujinx.Graphics.Vulkan/PipelineLayoutCache.cs | |
| parent | cd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff) | |
Move solution and projects to src
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/PipelineLayoutCache.cs')
| -rw-r--r-- | Ryujinx.Graphics.Vulkan/PipelineLayoutCache.cs | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/Ryujinx.Graphics.Vulkan/PipelineLayoutCache.cs b/Ryujinx.Graphics.Vulkan/PipelineLayoutCache.cs deleted file mode 100644 index c834fa62..00000000 --- a/Ryujinx.Graphics.Vulkan/PipelineLayoutCache.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Ryujinx.Graphics.GAL; -using Silk.NET.Vulkan; -using System.Collections.Generic; - -namespace Ryujinx.Graphics.Vulkan -{ - class PipelineLayoutCache - { - private readonly PipelineLayoutCacheEntry[] _plce; - private readonly List<PipelineLayoutCacheEntry> _plceMinimal; - - public PipelineLayoutCache() - { - _plce = new PipelineLayoutCacheEntry[1 << Constants.MaxShaderStages]; - _plceMinimal = new List<PipelineLayoutCacheEntry>(); - } - - public PipelineLayoutCacheEntry Create(VulkanRenderer gd, Device device, ShaderSource[] shaders) - { - var plce = new PipelineLayoutCacheEntry(gd, device, shaders); - _plceMinimal.Add(plce); - return plce; - } - - public PipelineLayoutCacheEntry GetOrCreate(VulkanRenderer gd, Device device, uint stages, bool usePd) - { - if (_plce[stages] == null) - { - _plce[stages] = new PipelineLayoutCacheEntry(gd, device, stages, usePd); - } - - return _plce[stages]; - } - - protected virtual unsafe void Dispose(bool disposing) - { - if (disposing) - { - for (int i = 0; i < _plce.Length; i++) - { - _plce[i]?.Dispose(); - } - - foreach (var plce in _plceMinimal) - { - plce.Dispose(); - } - - _plceMinimal.Clear(); - } - } - - public void Dispose() - { - Dispose(true); - } - } -} |
