aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-08-25 23:16:41 -0300
committerGitHub <noreply@github.com>2022-08-26 02:16:41 +0000
commit923089a29825cad8159a63616d14dcbd7161cb3c (patch)
tree99c7e39baba29a743dcccbdb046b2db3d5148d45 /Ryujinx.Graphics.Gpu/Image/TextureCache.cs
parentd9aa15eb243bc1b40892c9fcfcbb0e9ef66cfa63 (diff)
Fast path for Inline-to-Memory texture data transfers (#3610)1.1.233
* Fast path for Inline-to-Memory texture data transfers * Only do it for block linear textures to be on the safe side
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureCache.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureCache.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
index dcac9f64..d76879eb 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs
@@ -905,7 +905,8 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <param name="xCount">Number of pixels to be copied per line</param>
/// <param name="yCount">Number of lines to be copied</param>
/// <param name="linear">True if the texture has a linear layout, false otherwise</param>
- /// <param name="memoryLayout">If <paramref name="linear"/> is false, should have the memory layout, otherwise ignored</param>
+ /// <param name="gobBlocksInY">If <paramref name="linear"/> is false, the amount of GOB blocks in the Y axis</param>
+ /// <param name="gobBlocksInZ">If <paramref name="linear"/> is false, the amount of GOB blocks in the Z axis</param>
/// <returns>A matching texture, or null if there is no match</returns>
public Texture FindTexture(
MemoryManager memoryManager,
@@ -916,7 +917,8 @@ namespace Ryujinx.Graphics.Gpu.Image
int xCount,
int yCount,
bool linear,
- MemoryLayout memoryLayout)
+ int gobBlocksInY,
+ int gobBlocksInZ)
{
ulong address = memoryManager.Translate(gpuVa);
@@ -955,8 +957,8 @@ namespace Ryujinx.Graphics.Gpu.Image
bool sizeMatch = xCount * bpp == texture.Info.Width * format.BytesPerPixel && height == texture.Info.Height;
bool formatMatch = !texture.Info.IsLinear &&
- texture.Info.GobBlocksInY == memoryLayout.UnpackGobBlocksInY() &&
- texture.Info.GobBlocksInZ == memoryLayout.UnpackGobBlocksInZ();
+ texture.Info.GobBlocksInY == gobBlocksInY &&
+ texture.Info.GobBlocksInZ == gobBlocksInZ;
match = sizeMatch && formatMatch;
}