mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-08-19 15:18:43 +02:00
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.
This commit is contained in:
parent
f2a7b300c4
commit
97aedc030d
1 changed files with 8 additions and 8 deletions
|
@ -452,13 +452,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
index = handleIndex;
|
index = handleIndex;
|
||||||
baseLevel = 0;
|
baseLevel = 0;
|
||||||
|
|
||||||
int layerLevels = _levels;
|
int levelLayers = _layers;
|
||||||
|
|
||||||
while (handleIndex >= layerLevels)
|
while (handleIndex >= levelLayers)
|
||||||
{
|
{
|
||||||
handleIndex -= layerLevels;
|
handleIndex -= levelLayers;
|
||||||
baseLevel++;
|
baseLevel++;
|
||||||
layerLevels = Math.Max(layerLevels >> 1, 1);
|
levelLayers = Math.Max(levelLayers >> 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
baseLayer = handleIndex;
|
baseLayer = handleIndex;
|
||||||
|
@ -492,13 +492,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
{
|
{
|
||||||
int baseLevel = 0;
|
int baseLevel = 0;
|
||||||
|
|
||||||
int layerLevels = _layers;
|
int levelLayers = _layers;
|
||||||
|
|
||||||
while (index >= layerLevels)
|
while (index >= levelLayers)
|
||||||
{
|
{
|
||||||
index -= layerLevels;
|
index -= levelLayers;
|
||||||
baseLevel++;
|
baseLevel++;
|
||||||
layerLevels = Math.Max(layerLevels >> 1, 1);
|
levelLayers = Math.Max(levelLayers >> 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (index, baseLevel);
|
return (index, baseLevel);
|
||||||
|
|
Loading…
Reference in a new issue