From 788ca6a411762035a6a7a88100c4b582b47ee82d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 15 Jul 2020 00:01:10 -0300 Subject: 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 --- Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs') diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs index 5cc8ec24..2c53f699 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs @@ -63,11 +63,11 @@ namespace Ryujinx.Graphics.Gpu.Memory /// /// GPU virtual address to write the value into /// The value to be written - public void Write(ulong gpuVa, int value) + public void Write(ulong gpuVa, T value) where T : unmanaged { ulong processVa = _context.MemoryManager.Translate(gpuVa); - _context.PhysicalMemory.Write(processVa, BitConverter.GetBytes(value)); + _context.PhysicalMemory.Write(processVa, MemoryMarshal.Cast(MemoryMarshal.CreateSpan(ref value, 1))); } /// -- cgit v1.2.3