diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-05-27 11:07:10 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-27 16:07:10 +0200 |
| commit | 5795bb15282498b3824a5d15fe1ff78b85a18c23 (patch) | |
| tree | 6d4ee54c218e81fc6efaad279a5b1ade3ca8ec59 /Ryujinx.Graphics.Gpu/Engine/Compute.cs | |
| parent | 0b6d206daad7202d4e271118b631feb7dd363bbc (diff) | |
Support separate textures and samplers (#1216)
* Support separate textures and samplers
* Add missing bindless flag, fix SNORM format on buffer textures
* Add missing separation
* Add comments about the new handles
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Compute.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Compute.cs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs index 7b4b1e8a..0386df95 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs @@ -4,7 +4,6 @@ using Ryujinx.Graphics.Gpu.Shader; using Ryujinx.Graphics.Gpu.State; using Ryujinx.Graphics.Shader; using System; -using System.Runtime.InteropServices; namespace Ryujinx.Graphics.Gpu.Engine { @@ -91,9 +90,7 @@ namespace Ryujinx.Graphics.Gpu.Engine cbDescAddress += (ulong)cbDescOffset; - ReadOnlySpan<byte> cbDescriptorData = _context.PhysicalMemory.GetSpan(cbDescAddress, 0x10); - - SbDescriptor cbDescriptor = MemoryMarshal.Cast<byte, SbDescriptor>(cbDescriptorData)[0]; + SbDescriptor cbDescriptor = _context.PhysicalMemory.Read<SbDescriptor>(cbDescAddress); BufferManager.SetComputeUniformBuffer(cb.Slot, cbDescriptor.PackAddress(), (uint)cbDescriptor.Size); } @@ -110,9 +107,7 @@ namespace Ryujinx.Graphics.Gpu.Engine sbDescAddress += (ulong)sbDescOffset; - ReadOnlySpan<byte> sbDescriptorData = _context.PhysicalMemory.GetSpan(sbDescAddress, 0x10); - - SbDescriptor sbDescriptor = MemoryMarshal.Cast<byte, SbDescriptor>(sbDescriptorData)[0]; + SbDescriptor sbDescriptor = _context.PhysicalMemory.Read<SbDescriptor>(sbDescAddress); BufferManager.SetComputeStorageBuffer(sb.Slot, sbDescriptor.PackAddress(), (uint)sbDescriptor.Size); } |
