aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/BufferManager.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2023-01-13 07:04:59 +0100
committerGitHub <noreply@github.com>2023-01-13 06:04:59 +0000
commit85faa9d8fa1f8d5b1a80f3506717186f7a7e26c9 (patch)
treec6a9bfe24c089f1c748dcc6ef34aa2e5262c5b8e /Ryujinx.Graphics.Vulkan/BufferManager.cs
parentdca5b14493e730960ed5cd67906278ecea969b3a (diff)
Revert "Relax Vulkan requirements (#4228)" (#4279)
This reverts commit dca5b14493e730960ed5cd67906278ecea969b3a.
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/BufferManager.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/BufferManager.cs22
1 files changed, 2 insertions, 20 deletions
diff --git a/Ryujinx.Graphics.Vulkan/BufferManager.cs b/Ryujinx.Graphics.Vulkan/BufferManager.cs
index 9c50e6ff..f3240371 100644
--- a/Ryujinx.Graphics.Vulkan/BufferManager.cs
+++ b/Ryujinx.Graphics.Vulkan/BufferManager.cs
@@ -14,12 +14,6 @@ namespace Ryujinx.Graphics.Vulkan
MemoryPropertyFlags.HostCoherentBit |
MemoryPropertyFlags.HostCachedBit;
- // Some drivers don't expose a "HostCached" memory type,
- // so we need those alternative flags for the allocation to succeed there.
- private const MemoryPropertyFlags DefaultBufferMemoryAltFlags =
- MemoryPropertyFlags.HostVisibleBit |
- MemoryPropertyFlags.HostCoherentBit;
-
private const MemoryPropertyFlags DeviceLocalBufferMemoryFlags =
MemoryPropertyFlags.DeviceLocalBit;
@@ -100,21 +94,9 @@ namespace Ryujinx.Graphics.Vulkan
gd.Api.CreateBuffer(_device, in bufferCreateInfo, null, out var buffer).ThrowOnError();
gd.Api.GetBufferMemoryRequirements(_device, buffer, out var requirements);
- MemoryPropertyFlags allocateFlags;
- MemoryPropertyFlags allocateFlagsAlt;
-
- if (deviceLocal)
- {
- allocateFlags = DeviceLocalBufferMemoryFlags;
- allocateFlagsAlt = DeviceLocalBufferMemoryFlags;
- }
- else
- {
- allocateFlags = DefaultBufferMemoryFlags;
- allocateFlagsAlt = DefaultBufferMemoryAltFlags;
- }
+ var allocateFlags = deviceLocal ? DeviceLocalBufferMemoryFlags : DefaultBufferMemoryFlags;
- var allocation = gd.MemoryAllocator.AllocateDeviceMemory(_physicalDevice, requirements, allocateFlags, allocateFlagsAlt);
+ var allocation = gd.MemoryAllocator.AllocateDeviceMemory(_physicalDevice, requirements, allocateFlags);
if (allocation.Memory.Handle == 0UL)
{