diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-10-31 19:00:39 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-31 19:00:39 -0300 |
| commit | 841dd56f4ce850693aee5980cd750791624e47be (patch) | |
| tree | 585a5a581e78c5c6d64244e148097b57788cb9c6 /src/Ryujinx.Graphics.Vulkan | |
| parent | a16d582a105a6f9218e5f50fafd2670c64c1244c (diff) | |
Implement copy dependency for depth and color textures (#4365)
* Implement copy dependency for depth and color textures
* Revert changes added because R32 <-> D32 copies were illegal
* Restore depth alias matches
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan')
| -rw-r--r-- | src/Ryujinx.Graphics.Vulkan/TextureView.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/TextureView.cs b/src/Ryujinx.Graphics.Vulkan/TextureView.cs index 09128f00..05dbd15c 100644 --- a/src/Ryujinx.Graphics.Vulkan/TextureView.cs +++ b/src/Ryujinx.Graphics.Vulkan/TextureView.cs @@ -211,6 +211,13 @@ namespace Ryujinx.Graphics.Vulkan int levels = Math.Min(Info.Levels, dst.Info.Levels - firstLevel); _gd.HelperShader.CopyIncompatibleFormats(_gd, cbs, src, dst, 0, firstLayer, 0, firstLevel, layers, levels); } + else if (src.Info.Format.IsDepthOrStencil() != dst.Info.Format.IsDepthOrStencil()) + { + int layers = Math.Min(Info.GetLayers(), dst.Info.GetLayers() - firstLayer); + int levels = Math.Min(Info.Levels, dst.Info.Levels - firstLevel); + + _gd.HelperShader.CopyColor(_gd, cbs, src, dst, 0, firstLayer, 0, FirstLevel, layers, levels); + } else { TextureCopy.Copy( @@ -260,6 +267,10 @@ namespace Ryujinx.Graphics.Vulkan { _gd.HelperShader.CopyIncompatibleFormats(_gd, cbs, src, dst, srcLayer, dstLayer, srcLevel, dstLevel, 1, 1); } + else if (src.Info.Format.IsDepthOrStencil() != dst.Info.Format.IsDepthOrStencil()) + { + _gd.HelperShader.CopyColor(_gd, cbs, src, dst, srcLayer, dstLayer, srcLevel, dstLevel, 1, 1); + } else { TextureCopy.Copy( |
