diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TexturePool.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/TexturePool.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs index bcce443c..5b5c5ab0 100644 --- a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs +++ b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs @@ -85,8 +85,9 @@ namespace Ryujinx.Graphics.Gpu.Image TextureDescriptor descriptor = GetDescriptor(id); - int width = descriptor.UnpackWidth(); - int height = descriptor.UnpackHeight(); + int baseLevel = descriptor.UnpackBaseLevel(); + int width = Math.Max(1, descriptor.UnpackWidth() >> baseLevel); + int height = Math.Max(1, descriptor.UnpackHeight() >> baseLevel); if (texture.Info.Width != width || texture.Info.Height != height) { |