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.
This commit is contained in:
parent
d1b30fbe08
commit
c94f0fbb83
12 changed files with 515 additions and 234 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue