diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-06-05 14:06:47 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-05 14:06:47 -0300 |
commit | a3e7bb8eb40b66e61a5a3bfef0b780d0c76a31c1 (patch) | |
tree | 4484bdd53aae7c5b6a0668cd584fafc5e0bd0bc4 /Ryujinx.Graphics.Gpu/Image/Texture.cs | |
parent | 2073ba29197be4fcdcd750db7e7b8a36110efd71 (diff) |
Copy dependency for multisample and non-multisample textures (#3382)1.1.139
* Use copy dependency for textures that differs in multisample but are otherwise compatible
* Remove allowMs flag as it's no longer required for correctness, it's just an optimization now
* Dispose intermmediate pool
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/Texture.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/Texture.cs | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index cfb7a3b7..aadb4260 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -1136,32 +1136,22 @@ namespace Ryujinx.Graphics.Gpu.Image /// <param name="range">Texture view physical memory ranges</param> /// <param name="layerSize">Layer size on the given texture</param> /// <param name="caps">Host GPU capabilities</param> - /// <param name="allowMs">Indicates that multisample textures are allowed to match non-multisample requested textures</param> /// <param name="firstLayer">Texture view initial layer on this texture</param> /// <param name="firstLevel">Texture view first mipmap level on this texture</param> /// <returns>The level of compatiblilty a view with the given parameters created from this texture has</returns> - public TextureViewCompatibility IsViewCompatible(TextureInfo info, MultiRange range, int layerSize, Capabilities caps, bool allowMs, out int firstLayer, out int firstLevel) + public TextureViewCompatibility IsViewCompatible(TextureInfo info, MultiRange range, int layerSize, Capabilities caps, out int firstLayer, out int firstLevel) { TextureViewCompatibility result = TextureViewCompatibility.Full; result = TextureCompatibility.PropagateViewCompatibility(result, TextureCompatibility.ViewFormatCompatible(Info, info, caps)); if (result != TextureViewCompatibility.Incompatible) { - bool msTargetCompatible = false; + result = TextureCompatibility.PropagateViewCompatibility(result, TextureCompatibility.ViewTargetCompatible(Info, info)); - if (allowMs) + bool bothMs = Info.Target.IsMultisample() && info.Target.IsMultisample(); + if (bothMs && (Info.SamplesInX != info.SamplesInX || Info.SamplesInY != info.SamplesInY)) { - msTargetCompatible = Info.Target == Target.Texture2DMultisample && info.Target == Target.Texture2D; - } - - if (!msTargetCompatible) - { - result = TextureCompatibility.PropagateViewCompatibility(result, TextureCompatibility.ViewTargetCompatible(Info, info)); - - if (Info.SamplesInX != info.SamplesInX || Info.SamplesInY != info.SamplesInY) - { - result = TextureViewCompatibility.Incompatible; - } + result = TextureViewCompatibility.Incompatible; } if (result == TextureViewCompatibility.Full && Info.FormatInfo.Format != info.FormatInfo.Format && !_context.Capabilities.SupportsMismatchingViewFormat) |