Initial support for GPU channels (#2372)
* Ground work for separate GPU channels * Rename TextureManager to TextureCache * Decouple texture bindings management from the texture cache * Rename BufferManager to BufferCache * Decouple buffer bindings management from the buffer cache * More comments and proper disposal * PR feedback * Force host state update on channel switch * Typo * PR feedback * Missing using
This commit is contained in:
parent
12a7a2ead8
commit
a10b2c5ff2
24 changed files with 1745 additions and 1456 deletions
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu.Image
|
||||
|
@ -7,7 +8,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
/// This can keep multiple texture pools, and return the current one as needed.
|
||||
/// It is useful for applications that uses multiple texture pools.
|
||||
/// </summary>
|
||||
class TexturePoolCache
|
||||
class TexturePoolCache : IDisposable
|
||||
{
|
||||
private const int MaxCapacity = 4;
|
||||
|
||||
|
@ -72,5 +73,19 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
|
||||
return pool;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes the texture pool cache.
|
||||
/// It's an error to use the texture pool cache after disposal.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (TexturePool pool in _pools)
|
||||
{
|
||||
pool.Dispose();
|
||||
}
|
||||
|
||||
_pools.Clear();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue