New GPFifo and fast guest constant buffer updates (#1400)
* Add new structures from official docs, start migrating GPFifo * Finish migration to new GPFifo processor * Implement fast constant buffer data upload * Migrate to new GPFifo class * XML docs
This commit is contained in:
parent
3c1f220c5e
commit
5a7df48975
20 changed files with 958 additions and 702 deletions
|
@ -1,4 +1,6 @@
|
|||
using Ryujinx.Graphics.Gpu.State;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu.Engine
|
||||
{
|
||||
|
@ -19,5 +21,21 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
|
||||
_context.AdvanceSequence();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the uniform buffer data with inline data.
|
||||
/// </summary>
|
||||
/// <param name="state">Current GPU state</param>
|
||||
/// <param name="data">Data to be written to the uniform buffer</param>
|
||||
public void UniformBufferUpdate(GpuState state, ReadOnlySpan<int> data)
|
||||
{
|
||||
var uniformBuffer = state.Get<UniformBufferState>(MethodOffset.UniformBufferState);
|
||||
|
||||
_context.MemoryAccessor.Write(uniformBuffer.Address.Pack() + (uint)uniformBuffer.Offset, MemoryMarshal.Cast<int, byte>(data));
|
||||
|
||||
state.SetUniformBufferOffset(uniformBuffer.Offset + data.Length * 4);
|
||||
|
||||
_context.AdvanceSequence();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue