Archived
1
0
Fork 0
forked from Mirror/Ryujinx

Share texture pool cache between graphics and compute

This commit is contained in:
gdk 2019-11-22 14:17:06 -03:00 committed by Thog
parent 2437ccca0e
commit 79de8fd490
2 changed files with 8 additions and 7 deletions

View file

@ -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; _context = context;
_isCompute = isCompute; _texturePoolCache = texturePoolCache;
_isCompute = isCompute;
_texturePoolCache = new TexturePoolCache(context);
int stages = isCompute ? 1 : Constants.TotalShaderStages; int stages = isCompute ? 1 : Constants.TotalShaderStages;

View file

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