Kaynağa Gözat

Share texture pool cache between graphics and compute

gdk 6 yıl önce
ebeveyn
işleme
79de8fd490

+ 4 - 5
Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs

@@ -33,12 +33,11 @@ namespace Ryujinx.Graphics.Gpu.Image
 
 
         private bool _rebind;
         private bool _rebind;
 
 
-        public TextureBindingsManager(GpuContext context, bool isCompute)
+        public TextureBindingsManager(GpuContext context, TexturePoolCache texturePoolCache, bool isCompute)
         {
         {
-            _context   = context;
-            _isCompute = isCompute;
-
-            _texturePoolCache = new TexturePoolCache(context);
+            _context          = context;
+            _texturePoolCache = texturePoolCache;
+            _isCompute        = isCompute;
 
 
             int stages = isCompute ? 1 : Constants.TotalShaderStages;
             int stages = isCompute ? 1 : Constants.TotalShaderStages;
 
 

+ 4 - 2
Ryujinx.Graphics.Gpu/Image/TextureManager.cs

@@ -30,8 +30,10 @@ namespace Ryujinx.Graphics.Gpu.Image
         {
         {
             _context = context;
             _context = context;
 
 
-            _cpBindingsManager = new TextureBindingsManager(context, isCompute: true);
-            _gpBindingsManager = new TextureBindingsManager(context, isCompute: false);
+            TexturePoolCache texturePoolCache = new TexturePoolCache(context);
+
+            _cpBindingsManager = new TextureBindingsManager(context, texturePoolCache, isCompute: true);
+            _gpBindingsManager = new TextureBindingsManager(context, texturePoolCache, isCompute: false);
 
 
             _rtColors = new Texture[Constants.TotalRenderTargets];
             _rtColors = new Texture[Constants.TotalRenderTargets];