diff options
author | gdkchan <gab.dark.100@gmail.com> | 2020-07-15 00:01:10 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 13:01:10 +1000 |
commit | 788ca6a411762035a6a7a88100c4b582b47ee82d (patch) | |
tree | d48bfb91aecaead2906ec2d390357546f8c0611f /Ryujinx.Graphics.Gpu/Engine/MethodReport.cs | |
parent | 16dafe63166d065f40b57a9b7cf8017a6ba0b1ef (diff) |
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
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodReport.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/MethodReport.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs b/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs index 224a4da1..fcea4389 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodReport.cs @@ -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); } }; |