Initial transform feedback support (#1370)
* Initial transform feedback support * Some nits and fixes * Update ReportCounterType and Write method * Can't change shader or TFB bindings while TFB is active * Fix geometry shader input names with new naming
This commit is contained in:
parent
16dafe6316
commit
788ca6a411
23 changed files with 468 additions and 68 deletions
|
@ -61,8 +61,6 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
/// <param name="type">Counter to be written to memory</param>
|
||||
private void ReportCounter(GpuState state, ReportCounterType type)
|
||||
{
|
||||
CounterData counterData = new CounterData();
|
||||
|
||||
var rs = state.Get<SemaphoreState>(MethodOffset.ReportState);
|
||||
|
||||
ulong gpuVa = rs.Address.Pack();
|
||||
|
@ -80,16 +78,14 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
|
||||
EventHandler<ulong> resultHandler = (object evt, ulong result) =>
|
||||
{
|
||||
CounterData counterData = new CounterData();
|
||||
|
||||
counterData.Counter = result;
|
||||
counterData.Timestamp = ticks;
|
||||
|
||||
Span<CounterData> counterDataSpan = MemoryMarshal.CreateSpan(ref counterData, 1);
|
||||
|
||||
Span<byte> data = MemoryMarshal.Cast<CounterData, byte>(counterDataSpan);
|
||||
|
||||
if (counter?.Invalid != true)
|
||||
{
|
||||
_context.MemoryAccessor.Write(gpuVa, data);
|
||||
_context.MemoryAccessor.Write(gpuVa, counterData);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue