Compare shader code using a span instead of individual reads. (#917)
* Compare shader code using a span instead of individual reads. * Add comment for new parameter. * Remove unnecessary Math.Min
This commit is contained in:
@ -237,14 +237,19 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||
/// Gets the number of mapped or reserved pages on a given region.
|
||||
/// </summary>
|
||||
/// <param name="gpuVa">Start GPU virtual address of the region</param>
|
||||
/// <param name="maxSize">Maximum size of the data</param>
|
||||
/// <returns>Mapped size in bytes of the specified region</returns>
|
||||
internal ulong GetSubSize(ulong gpuVa)
|
||||
internal ulong GetSubSize(ulong gpuVa, ulong maxSize)
|
||||
{
|
||||
ulong size = 0;
|
||||
|
||||
while (GetPte(gpuVa + size) != PteUnmapped)
|
||||
{
|
||||
size += PageSize;
|
||||
if (size >= maxSize)
|
||||
{
|
||||
return maxSize;
|
||||
}
|
||||
}
|
||||
|
||||
return size;
|
||||
|
Reference in New Issue
Block a user