diff --git a/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.projitems b/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.projitems index c73e175d..62c4d520 100644 --- a/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.projitems +++ b/src/ComputeSharp.Core.NetStandard/ComputeSharp.Core.NetStandard.projitems @@ -9,7 +9,6 @@ ComputeSharp.Core.NetStandard - diff --git a/src/ComputeSharp.Core.NetStandard/System/InteropServices/MemoryMarshal.cs b/src/ComputeSharp.Core.NetStandard/System/InteropServices/MemoryMarshal.cs deleted file mode 100644 index 86710490..00000000 --- a/src/ComputeSharp.Core.NetStandard/System/InteropServices/MemoryMarshal.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Runtime.CompilerServices; - -namespace ComputeSharp.Core.NetStandard.System.Runtime.InteropServices; - -/// -/// A polyfill type that mirrors some methods from on .NET 6. -/// -internal static class MemoryMarshal -{ - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T GetReference(Span span) - { - return ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(span); - } - - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T GetReference(ReadOnlySpan span) - { - return ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(span); - } - - /// - /// Creates a new from a given reference. - /// - /// The type of reference to wrap. - /// The target reference. - /// The length of the to create. - /// A new wrapping . - public static unsafe Span CreateSpan(ref T value, int length) - { - return new(Unsafe.AsPointer(ref value), length); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs b/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs index 0c781495..bb7c704d 100644 --- a/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs +++ b/src/ComputeSharp.NetStandard/System/Runtime/InteropServices/MemoryMarshal.cs @@ -8,20 +8,6 @@ namespace ComputeSharp.NetStandard.System.Runtime.InteropServices; /// internal static class MemoryMarshal { - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T GetReference(Span span) - { - return ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(span); - } - - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ref T GetReference(ReadOnlySpan span) - { - return ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(span); - } - /// /// Returns a reference to the 0th element of . If the array is empty, returns a reference /// to where the 0th element would have been stored. Such a reference may be used for pinning but must never be dereferenced. @@ -32,16 +18,4 @@ internal static class MemoryMarshal { return ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(array.AsSpan()); } - - /// - /// Creates a new from a given reference. - /// - /// The type of reference to wrap. - /// The target reference. - /// The length of the to create. - /// A new wrapping . - public static unsafe Span CreateSpan(ref T value, int length) - { - return new(Unsafe.AsPointer(ref value), length); - } } \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CLEAR_VALUE.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CLEAR_VALUE.cs index 6d279e72..dc47dedd 100644 --- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CLEAR_VALUE.cs +++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_CLEAR_VALUE.cs @@ -3,10 +3,7 @@ // Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. -using System; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal; namespace TerraFX.Interop.DirectX { @@ -17,15 +14,6 @@ namespace TerraFX.Interop.DirectX [NativeTypeName("D3D12_CLEAR_VALUE::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:2710:5)")] public _Anonymous_e__Union Anonymous; - public Span Color - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - return MemoryMarshal.CreateSpan(ref Anonymous.Color[0], 4); - } - } - [StructLayout(LayoutKind.Explicit)] internal unsafe partial struct _Anonymous_e__Union {