소스 검색

GPU: Force rebind when pool changes (#4129)

gdkchan 3 년 전
부모
커밋
1cca3e99ab
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs

+ 8 - 3
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)
             {