From 1cca3e99ab04e56aa4b30f3fa83f240f8d0fd29d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 21 Dec 2022 17:35:28 -0300 Subject: [PATCH] GPU: Force rebind when pool changes (#4129) --- Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs index 0787ce3d50..bbfb704d05 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs @@ -320,10 +320,15 @@ namespace Ryujinx.Graphics.Gpu.Image // Check if the texture pool has been modified since bindings were last committed. // If it wasn't, then it's possible to avoid looking up textures again when the handle remains the same. - bool poolModified = _cachedTexturePool != texturePool || _cachedSamplerPool != samplerPool; + if (_cachedTexturePool != texturePool || _cachedSamplerPool != samplerPool) + { + Rebind(); - _cachedTexturePool = texturePool; - _cachedSamplerPool = samplerPool; + _cachedTexturePool = texturePool; + _cachedSamplerPool = samplerPool; + } + + bool poolModified = false; if (texturePool != null) {