From 03aab63e0320ab8c3097d59ca5c474f6168e48a4 Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Tue, 19 Jan 2021 00:04:38 -0300
Subject: [PATCH] Fix out of range exception when a invalid base lod is used
 (#1931)

---
 Ryujinx.Graphics.Gpu/Image/TexturePool.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
index 065844cb02..dfcd8a528a 100644
--- a/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TexturePool.cs
@@ -223,7 +223,7 @@ namespace Ryujinx.Graphics.Gpu.Image
 
                 layerSize = sizeInfo.LayerSize;
 
-                if (minLod != 0)
+                if (minLod != 0 && minLod < levels)
                 {
                     // If the base level is not zero, we additionally add the mip level offset
                     // to the address, this allows the texture manager to find the base level from the