Small optimizations on texture and sampler pool invalidation
This commit is contained in:
parent
3ac023bb60
commit
b2b2e04669
4 changed files with 68 additions and 22 deletions
|
@ -5,6 +5,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
{
|
||||
class SamplerPool : Pool<Sampler>
|
||||
{
|
||||
private int _sequenceNumber;
|
||||
|
||||
public SamplerPool(GpuContext context, ulong address, int maximumId) : base(context, address, maximumId) { }
|
||||
|
||||
public override Sampler Get(int id)
|
||||
|
@ -14,7 +16,12 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
return null;
|
||||
}
|
||||
|
||||
SynchronizeMemory();
|
||||
if (_sequenceNumber != Context.SequenceNumber)
|
||||
{
|
||||
_sequenceNumber = Context.SequenceNumber;
|
||||
|
||||
SynchronizeMemory();
|
||||
}
|
||||
|
||||
Sampler sampler = Items[id];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue