diff options
author | sharmander <saldabain.dev@gmail.com> | 2020-08-31 20:06:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 21:06:27 -0300 |
commit | bc19114bb5a14f4563aa4bee68bda97234a7bcb0 (patch) | |
tree | 4239be72361c1649378effdba4f21c25bf2ff08f /Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs | |
parent | 92f7f163ef0ad3d7a542460a5500074188a9d8b1 (diff) |
Fix: Issue #1475 Texture Compatibility Check methods need to be centralized (#1482)
* Texture Compatibility Check methods need to be centralized #1475
* Fix spacing
* Fix spacing
* Undo removal of .ToString()
* Move isPerfectMatch back to Texture.cs
Rename parameters in TextureCompatibility.cs for consistency
* Add switch from 1474 to TextureCompatibility as requested by mageven.
* Actually add TextureCompatibility changes to the PR (Add DeriveDepthFormat method)
* Alignment corrections + Derive method signature adjustment.
* Removed empty line as erquested
* Remove empty lines
* Remove blank lines, fix alignment
* Fix alignment
* Remove emtpy line
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs index af7ac038..8e92685b 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodCopyTexture.cs @@ -1,4 +1,5 @@ using Ryujinx.Graphics.GAL; +using Ryujinx.Graphics.Gpu.Image; using Ryujinx.Graphics.Gpu.State; using System; @@ -28,16 +29,7 @@ namespace Ryujinx.Graphics.Gpu.Engine // When the source texture that was found has a depth format, // we must enforce the target texture also has a depth format, // as copies between depth and color formats are not allowed. - dstCopyTexture.Format = srcTexture.Format switch - { - Format.S8Uint => RtFormat.S8Uint, - Format.D16Unorm => RtFormat.D16Unorm, - Format.D24X8Unorm => RtFormat.D24Unorm, - Format.D32Float => RtFormat.D32Float, - Format.D24UnormS8Uint => RtFormat.D24UnormS8Uint, - Format.D32FloatS8Uint => RtFormat.D32FloatS8Uint, - _ => dstCopyTexture.Format - }; + dstCopyTexture.Format = TextureCompatibility.DeriveDepthFormat(dstCopyTexture.Format, srcTexture.Format); Texture dstTexture = TextureManager.FindOrCreateTexture(dstCopyTexture, srcTexture.ScaleMode == Image.TextureScaleMode.Scaled); |