diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-11-02 18:17:19 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 18:17:19 -0300 |
commit | f82309fa2dd46d4339e0709ab835d927fd25361b (patch) | |
tree | f864424c938b289780f07a12dc2e52db49721da6 /Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs | |
parent | 7d8e198c33b7ad283db53315129209a2bd310f23 (diff) |
Vulkan: Implement multisample <-> non-multisample copies and depth-stencil resolve (#3723)1.1.337
* Vulkan: Implement multisample <-> non-multisample copies and depth-stencil resolve
* FramebufferParams is no longer required there
* Implement Specialization Constants and merge CopyMS Shaders (#15)
* Vulkan: Initial Specialization Constants
* Replace with specialized helper shader
* Reimplement everything
Fix nonexistant interaction with Ryu pipeline caching
Decouple specialization info from data and relocate them
Generalize mapping and add type enum to better match spv types
Use local fixed scopes instead of global unmanaged allocs
* Fix misses in initial implementation
Use correct info variable in Create2DLayerView
Add ShaderStorageImageMultisample to required feature set
* Use texture for source image
* No point in using ReadOnlyMemory
* Apply formatting feedback
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Apply formatting suggestions on shader source
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Support conversion with samples count that does not match the requested count, other minor changes
Co-authored-by: mageven <62494521+mageven@users.noreply.github.com>
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs b/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs index 5ea9ee2f..91a1a728 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureCompatibility.cs @@ -710,7 +710,12 @@ namespace Ryujinx.Graphics.Gpu.Image break; case Target.Texture2DMultisample: case Target.Texture2DMultisampleArray: - if (rhs.Target == Target.Texture2D || rhs.Target == Target.Texture2DArray) + // We don't support copy between multisample and non-multisample depth-stencil textures + // because there's no way to emulate that since most GPUs don't support writing a + // custom stencil value into the texture, among several other API limitations. + + if ((rhs.Target == Target.Texture2D || rhs.Target == Target.Texture2DArray) && + !rhs.FormatInfo.Format.IsDepthOrStencil()) { return TextureViewCompatibility.CopyOnly; } |