aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2024-01-31 22:49:50 +0000
committerGitHub <noreply@github.com>2024-01-31 23:49:50 +0100
commitc94f0fbb8307873f68df982c100d3fb01aa6ccf5 (patch)
tree327a039f016b3e0ae45713e0f5dd413a04d673ae /src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs
parentd1b30fbe08d79ad81167358779d77cf4e7167386 (diff)
Vulkan: Add Render Pass / Framebuffer Cache (#6182)
* Vulkan: Add Render Pass / Framebuffer Cache Cache is owned by each texture view. - Window's way of getting framebuffer cache for swapchain images is really messy - it creates a TextureView out of just a vk image view, with invalid info and no storage. * Clear up limited use of alternate TextureView constructor * Formatting and messages * More formatting and messages I apologize for `_colorsCanonical[index]?.Storage?.InsertReadToWriteBarrier`, the compiler made me do it * Self review, change GetFramebuffer to GetPassAndFramebuffer * Avoid allocations on Remove for HashTableSlim * Member can be readonly * Generate texture create info for swapchain images * Improve hashcode * Remove format, samples, size and isDepthStencil when possible Tested in a number of games, seems fine. * Removed load op barriers These can be introduced later. * Reintroduce UpdateModifications Technically meant to be replaced by load op stuff.
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs b/src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs
index 0a871a5c..dfbf1901 100644
--- a/src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs
+++ b/src/Ryujinx.Graphics.Vulkan/PipelineHelperShader.cs
@@ -9,21 +9,16 @@ namespace Ryujinx.Graphics.Vulkan
{
}
- public void SetRenderTarget(Auto<DisposableImageView> view, uint width, uint height, bool isDepthStencil, VkFormat format)
+ public void SetRenderTarget(TextureView view, uint width, uint height)
{
- SetRenderTarget(view, width, height, 1u, isDepthStencil, format);
- }
-
- public void SetRenderTarget(Auto<DisposableImageView> view, uint width, uint height, uint samples, bool isDepthStencil, VkFormat format)
- {
- CreateFramebuffer(view, width, height, samples, isDepthStencil, format);
+ CreateFramebuffer(view, width, height);
CreateRenderPass();
SignalStateChange();
}
- private void CreateFramebuffer(Auto<DisposableImageView> view, uint width, uint height, uint samples, bool isDepthStencil, VkFormat format)
+ private void CreateFramebuffer(TextureView view, uint width, uint height)
{
- FramebufferParams = new FramebufferParams(Device, view, width, height, samples, isDepthStencil, format);
+ FramebufferParams = new FramebufferParams(Device, view, width, height);
UpdatePipelineAttachmentFormats();
}