diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureCache.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/TextureCache.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs index fed89770..203a3a12 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs @@ -194,6 +194,7 @@ namespace Ryujinx.Graphics.Gpu.Image TwodTexture copyTexture, ulong offset, FormatInfo formatInfo, + bool shouldCreate, bool preferScaling = true, Size? sizeHint = null) { @@ -234,6 +235,11 @@ namespace Ryujinx.Graphics.Gpu.Image flags |= TextureSearchFlags.WithUpscale; } + if (!shouldCreate) + { + flags |= TextureSearchFlags.NoCreate; + } + Texture texture = FindOrCreateTexture(memoryManager, flags, info, 0, sizeHint); texture?.SynchronizeMemory(); @@ -480,6 +486,10 @@ namespace Ryujinx.Graphics.Gpu.Image return texture; } + else if (flags.HasFlag(TextureSearchFlags.NoCreate)) + { + return null; + } // Calculate texture sizes, used to find all overlapping textures. SizeInfo sizeInfo = info.CalculateSizeInfo(layerSize); |