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/Image/SamplerPool.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/Image/SamplerPool.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Image/SamplerPool.cs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs b/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs index 2abf96de..ca13a7d6 100644 --- a/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs +++ b/Ryujinx.Graphics.Gpu/Image/SamplerPool.cs @@ -1,6 +1,3 @@ -using System; -using System.Runtime.InteropServices; - namespace Ryujinx.Graphics.Gpu.Image { /// <summary> @@ -41,11 +38,7 @@ namespace Ryujinx.Graphics.Gpu.Image if (sampler == null) { - ulong address = Address + (ulong)(uint)id * DescriptorSize; - - ReadOnlySpan<byte> data = Context.PhysicalMemory.GetSpan(address, DescriptorSize); - - SamplerDescriptor descriptor = MemoryMarshal.Cast<byte, SamplerDescriptor>(data)[0]; + SamplerDescriptor descriptor = Context.PhysicalMemory.Read<SamplerDescriptor>(Address + (ulong)id * DescriptorSize); sampler = new Sampler(Context, descriptor); |
