aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/BufferManager.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2022-09-09 00:30:19 +0100
committerGitHub <noreply@github.com>2022-09-08 20:30:19 -0300
commitc6d82209abeacd2336cde99e5a02b4596e70da83 (patch)
tree8dc8e1055f402c07e6ed9e4ff247ca420729808c /Ryujinx.Graphics.Vulkan/BufferManager.cs
parentee1825219b8ccca13df7198d4e9ffb966e44c883 (diff)
Restride vertex buffer when stride causes attributes to misalign in Vulkan. (#3679)1.1.254
* Vertex Buffer Alignment part 1 * Update CacheByRange * Add Stride Change compute shader, fix storage buffers in helpers * An AMD exclusive * Reword * Change rules - stride conversion when attrs misalign * Fix stupid mistake * Fix background pipeline compile * Improve a few things. * Fix some feedback * Address Feedback (the shader binary didn't change when i changed the source to use the subgroup size) * Fix bug where rewritten buffer would be disposed instantly.
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/BufferManager.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/BufferManager.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Vulkan/BufferManager.cs b/Ryujinx.Graphics.Vulkan/BufferManager.cs
index 77f60db9..43bd9877 100644
--- a/Ryujinx.Graphics.Vulkan/BufferManager.cs
+++ b/Ryujinx.Graphics.Vulkan/BufferManager.cs
@@ -130,6 +130,16 @@ namespace Ryujinx.Graphics.Vulkan
return null;
}
+ public Auto<DisposableBuffer> GetAlignedVertexBuffer(CommandBufferScoped cbs, BufferHandle handle, int offset, int size, int stride, int alignment)
+ {
+ if (TryGetBuffer(handle, out var holder))
+ {
+ return holder.GetAlignedVertexBuffer(cbs, offset, size, stride, alignment);
+ }
+
+ return null;
+ }
+
public Auto<DisposableBuffer> GetBuffer(CommandBuffer commandBuffer, BufferHandle handle, bool isWrite, out int size)
{
if (TryGetBuffer(handle, out var holder))