2018-03-20 11:18:25 -04:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2018-03-20 16:00:00 -04:00
|
|
|
namespace Ryujinx.Core.OsHle.Services.Nv
|
2018-03-20 11:18:25 -04:00
|
|
|
{
|
|
|
|
class NvMapFb
|
|
|
|
{
|
|
|
|
private List<long> BufferOffs;
|
|
|
|
|
|
|
|
public NvMapFb()
|
|
|
|
{
|
|
|
|
BufferOffs = new List<long>();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void AddBufferOffset(long Offset)
|
|
|
|
{
|
|
|
|
BufferOffs.Add(Offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool HasBufferOffset(int Index)
|
|
|
|
{
|
|
|
|
if ((uint)Index >= BufferOffs.Count)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long GetBufferOffset(int Index)
|
|
|
|
{
|
|
|
|
if ((uint)Index >= BufferOffs.Count)
|
|
|
|
{
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(Index));
|
|
|
|
}
|
|
|
|
|
|
|
|
return BufferOffs[Index];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|