Sfoglia il codice sorgente

Remove unused texture and sampler pool invalidation code (#1648)

gdkchan 5 anni fa
parent
commit
876fa656f6

+ 0 - 40
Ryujinx.Graphics.Gpu/Image/Pool.cs

@@ -86,46 +86,6 @@ namespace Ryujinx.Graphics.Gpu.Image
             });
             });
         }
         }
 
 
-        private void InvalidateRangeInternal(ulong offset, int size)
-        {
-            InvalidateRangeImpl(Address + offset, (ulong)size);
-        }
-
-        /// <summary>
-        /// Invalidates a range of memory of the GPU resource pool.
-        /// Entries that falls inside the speicified range will be invalidated,
-        /// causing all the data to be reloaded from guest memory.
-        /// </summary>
-        /// <param name="address">The start address of the range to invalidate</param>
-        /// <param name="size">The size of the range to invalidate</param>
-        public void InvalidateRange(ulong address, ulong size)
-        {
-            ulong endAddress = address + size;
-
-            ulong texturePoolEndAddress = Address + Size;
-
-            // If the range being invalidated is not overlapping the texture pool range,
-            // then we don't have anything to do, exit early.
-            if (address >= texturePoolEndAddress || endAddress <= Address)
-            {
-                return;
-            }
-
-            if (address < Address)
-            {
-                address = Address;
-            }
-
-            if (endAddress > texturePoolEndAddress)
-            {
-                endAddress = texturePoolEndAddress;
-            }
-
-            size = endAddress - address;
-
-            InvalidateRangeImpl(address, size);
-        }
-
         protected abstract void InvalidateRangeImpl(ulong address, ulong size);
         protected abstract void InvalidateRangeImpl(ulong address, ulong size);
 
 
         protected abstract void Delete(T item);
         protected abstract void Delete(T item);

+ 0 - 12
Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs

@@ -394,18 +394,6 @@ namespace Ryujinx.Graphics.Gpu.Image
             return (packedId >> 20) & 0xfff;
             return (packedId >> 20) & 0xfff;
         }
         }
 
 
-        /// <summary>
-        /// Invalidates a range of memory on all GPU resource pools (both texture and sampler pools).
-        /// </summary>
-        /// <param name="address">Start address of the range to invalidate</param>
-        /// <param name="size">Size of the range to invalidate</param>
-        public void InvalidatePoolRange(ulong address, ulong size)
-        {
-            _samplerPool?.InvalidateRange(address, size);
-
-            _texturePoolCache.InvalidateRange(address, size);
-        }
-
         /// <summary>
         /// <summary>
         /// Force all bound textures and images to be rebound the next time CommitBindings is called.
         /// Force all bound textures and images to be rebound the next time CommitBindings is called.
         /// </summary>
         /// </summary>

+ 0 - 15
Ryujinx.Graphics.Gpu/Image/TexturePoolCache.cs

@@ -72,20 +72,5 @@ namespace Ryujinx.Graphics.Gpu.Image
 
 
             return pool;
             return pool;
         }
         }
-
-        /// <summary>
-        /// Invalidates a memory range of all intersecting texture pools on the cache.
-        /// </summary>
-        /// <param name="address">Start address of the range to invalidate</param>
-        /// <param name="size">Size of the range to invalidate</param>
-        public void InvalidateRange(ulong address, ulong size)
-        {
-            for (LinkedListNode<TexturePool> node = _pools.First; node != null; node = node.Next)
-            {
-                TexturePool pool = node.Value;
-
-                pool.InvalidateRange(address, size);
-            }
-        }
     }
     }
 }
 }