aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2021-08-20 18:59:39 +0100
committerGitHub <noreply@github.com>2021-08-20 14:59:39 -0300
commit97aedc030d24bc5e32fa95a297155f2df2ecfcc2 (patch)
tree056812d712b17b930278d61b5f84a5b9d811d2b4 /Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
parentf2a7b300c471ee7ad9a925f1085ad86537f68154 (diff)
Fix GetHandleInformation for mipmapped 3d textures (#2569)
Got this the wrong way round - was causing games to try synchronize mipmap levels of like 52 on a 3d texture with 6 levels. Also, corrected the variable name in the method that _was_ working.
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureGroup.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureGroup.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
index a43eccd6..c4be1cec 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
@@ -452,13 +452,13 @@ namespace Ryujinx.Graphics.Gpu.Image
index = handleIndex;
baseLevel = 0;
- int layerLevels = _levels;
+ int levelLayers = _layers;
- while (handleIndex >= layerLevels)
+ while (handleIndex >= levelLayers)
{
- handleIndex -= layerLevels;
+ handleIndex -= levelLayers;
baseLevel++;
- layerLevels = Math.Max(layerLevels >> 1, 1);
+ levelLayers = Math.Max(levelLayers >> 1, 1);
}
baseLayer = handleIndex;
@@ -492,13 +492,13 @@ namespace Ryujinx.Graphics.Gpu.Image
{
int baseLevel = 0;
- int layerLevels = _layers;
+ int levelLayers = _layers;
- while (index >= layerLevels)
+ while (index >= levelLayers)
{
- index -= layerLevels;
+ index -= levelLayers;
baseLevel++;
- layerLevels = Math.Max(layerLevels >> 1, 1);
+ levelLayers = Math.Max(levelLayers >> 1, 1);
}
return (index, baseLevel);