Implement a fast path for I2M transfers (#2467)
This commit is contained in:
parent
9b08abc644
commit
04dce402ac
4 changed files with 88 additions and 3 deletions
|
@ -127,6 +127,26 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory
|
|||
_finished = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pushes a block of data to the Inline-to-Memory engine.
|
||||
/// </summary>
|
||||
/// <param name="data">Data to push</param>
|
||||
public void LoadInlineData(ReadOnlySpan<int> data)
|
||||
{
|
||||
if (!_finished)
|
||||
{
|
||||
int copySize = Math.Min(data.Length, _buffer.Length - _offset);
|
||||
data.Slice(0, copySize).CopyTo(new Span<int>(_buffer).Slice(_offset, copySize));
|
||||
|
||||
_offset += copySize;
|
||||
|
||||
if (_offset * 4 >= _size)
|
||||
{
|
||||
FinishTransfer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pushes a word of data to the Inline-to-Memory engine.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue