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 88bdb9f7..6d279e72 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
@@ -26,15 +26,6 @@ namespace TerraFX.Interop.DirectX
}
}
- public ref D3D12_DEPTH_STENCIL_VALUE DepthStencil
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.DepthStencil, 1));
- }
- }
-
[StructLayout(LayoutKind.Explicit)]
internal unsafe partial struct _Anonymous_e__Union
{
diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RESOURCE_BARRIER.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RESOURCE_BARRIER.cs
index 390cf36b..5daf7b8f 100644
--- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RESOURCE_BARRIER.cs
+++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_RESOURCE_BARRIER.cs
@@ -3,9 +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.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.DirectX
{
@@ -18,33 +16,6 @@ namespace TerraFX.Interop.DirectX
[NativeTypeName("D3D12_RESOURCE_BARRIER::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:2883:5)")]
public _Anonymous_e__Union Anonymous;
- public ref D3D12_RESOURCE_TRANSITION_BARRIER Transition
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Transition, 1));
- }
- }
-
- public ref D3D12_RESOURCE_ALIASING_BARRIER Aliasing
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Aliasing, 1));
- }
- }
-
- public ref D3D12_RESOURCE_UAV_BARRIER UAV
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.UAV, 1));
- }
- }
-
[StructLayout(LayoutKind.Explicit)]
internal partial struct _Anonymous_e__Union
{
diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER.cs
index 06fb5a7d..67b3a313 100644
--- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER.cs
+++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER.cs
@@ -3,9 +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.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.DirectX
{
@@ -18,33 +16,6 @@ namespace TerraFX.Interop.DirectX
public D3D12_SHADER_VISIBILITY ShaderVisibility;
- public ref D3D12_ROOT_DESCRIPTOR_TABLE DescriptorTable
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.DescriptorTable, 1));
- }
- }
-
- public ref D3D12_ROOT_CONSTANTS Constants
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Constants, 1));
- }
- }
-
- public ref D3D12_ROOT_DESCRIPTOR Descriptor
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Descriptor, 1));
- }
- }
-
[StructLayout(LayoutKind.Explicit)]
internal partial struct _Anonymous_e__Union
{
diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER1.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER1.cs
index 60fae9d7..5bfcbdd3 100644
--- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER1.cs
+++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_ROOT_PARAMETER1.cs
@@ -3,9 +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.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.DirectX
{
@@ -18,33 +16,6 @@ namespace TerraFX.Interop.DirectX
public D3D12_SHADER_VISIBILITY ShaderVisibility;
- public ref D3D12_ROOT_DESCRIPTOR_TABLE1 DescriptorTable
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.DescriptorTable, 1));
- }
- }
-
- public ref D3D12_ROOT_CONSTANTS Constants
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Constants, 1));
- }
- }
-
- public ref D3D12_ROOT_DESCRIPTOR1 Descriptor
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Descriptor, 1));
- }
- }
-
[StructLayout(LayoutKind.Explicit)]
internal partial struct _Anonymous_e__Union
{
diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SHADER_RESOURCE_VIEW_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SHADER_RESOURCE_VIEW_DESC.cs
index 91e25fa1..7178e92b 100644
--- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SHADER_RESOURCE_VIEW_DESC.cs
+++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_SHADER_RESOURCE_VIEW_DESC.cs
@@ -3,9 +3,9 @@
// 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.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.DirectX
{
@@ -20,102 +20,23 @@ namespace TerraFX.Interop.DirectX
[NativeTypeName("D3D12_SHADER_RESOURCE_VIEW_DESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:3094:5)")]
public _Anonymous_e__Union Anonymous;
+ [UnscopedRef]
public ref D3D12_BUFFER_SRV Buffer
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Buffer, 1));
- }
- }
-
- public ref D3D12_TEX1D_SRV Texture1D
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1D, 1));
- }
- }
-
- public ref D3D12_TEX1D_ARRAY_SRV Texture1DArray
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1DArray, 1));
+ return ref Anonymous.Buffer;
}
}
+ [UnscopedRef]
public ref D3D12_TEX2D_SRV Texture2D
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2D, 1));
- }
- }
-
- public ref D3D12_TEX2D_ARRAY_SRV Texture2DArray
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DArray, 1));
- }
- }
-
- public ref D3D12_TEX2DMS_SRV Texture2DMS
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DMS, 1));
- }
- }
-
- public ref D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DMSArray, 1));
- }
- }
-
- public ref D3D12_TEX3D_SRV Texture3D
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture3D, 1));
- }
- }
-
- public ref D3D12_TEXCUBE_SRV TextureCube
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.TextureCube, 1));
- }
- }
-
- public ref D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.TextureCubeArray, 1));
- }
- }
-
- public ref D3D12_RAYTRACING_ACCELERATION_STRUCTURE_SRV RaytracingAccelerationStructure
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.RaytracingAccelerationStructure, 1));
+ return ref Anonymous.Texture2D;
}
}
diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEXTURE_COPY_LOCATION.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEXTURE_COPY_LOCATION.cs
index 20a1be47..460d4699 100644
--- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEXTURE_COPY_LOCATION.cs
+++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_TEXTURE_COPY_LOCATION.cs
@@ -3,9 +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.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.DirectX
{
@@ -18,24 +16,6 @@ namespace TerraFX.Interop.DirectX
[NativeTypeName("D3D12_TEXTURE_COPY_LOCATION::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:2917:5)")]
public _Anonymous_e__Union Anonymous;
- public ref D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.PlacedFootprint, 1));
- }
- }
-
- public ref uint SubresourceIndex
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.SubresourceIndex, 1));
- }
- }
-
[StructLayout(LayoutKind.Explicit)]
internal partial struct _Anonymous_e__Union
{
diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_UNORDERED_ACCESS_VIEW_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_UNORDERED_ACCESS_VIEW_DESC.cs
index dc46052e..3dc4a7fd 100644
--- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_UNORDERED_ACCESS_VIEW_DESC.cs
+++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_UNORDERED_ACCESS_VIEW_DESC.cs
@@ -3,9 +3,9 @@
// 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.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.DirectX
{
@@ -18,57 +18,23 @@ namespace TerraFX.Interop.DirectX
[NativeTypeName("D3D12_UNORDERED_ACCESS_VIEW_DESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:3309:5)")]
public _Anonymous_e__Union Anonymous;
+ [UnscopedRef]
public ref D3D12_BUFFER_UAV Buffer
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Buffer, 1));
- }
- }
-
- public ref D3D12_TEX1D_UAV Texture1D
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1D, 1));
- }
- }
-
- public ref D3D12_TEX1D_ARRAY_UAV Texture1DArray
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture1DArray, 1));
- }
- }
-
- public ref D3D12_TEX2D_UAV Texture2D
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2D, 1));
- }
- }
-
- public ref D3D12_TEX2D_ARRAY_UAV Texture2DArray
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture2DArray, 1));
+ return ref Anonymous.Buffer;
}
}
+ [UnscopedRef]
public ref D3D12_TEX3D_UAV Texture3D
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Texture3D, 1));
+ return ref Anonymous.Texture3D;
}
}
diff --git a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VERSIONED_ROOT_SIGNATURE_DESC.cs b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VERSIONED_ROOT_SIGNATURE_DESC.cs
index 40fcba2b..f15832d8 100644
--- a/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VERSIONED_ROOT_SIGNATURE_DESC.cs
+++ b/src/TerraFX.Interop.Windows/DirectX/um/d3d12/D3D12_VERSIONED_ROOT_SIGNATURE_DESC.cs
@@ -3,9 +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.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.DirectX
{
@@ -16,24 +14,6 @@ namespace TerraFX.Interop.DirectX
[NativeTypeName("D3D12_VERSIONED_ROOT_SIGNATURE_DESC::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/d3d12.h:3711:5)")]
public _Anonymous_e__Union Anonymous;
- public ref D3D12_ROOT_SIGNATURE_DESC Desc_1_0
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Desc_1_0, 1));
- }
- }
-
- public ref D3D12_ROOT_SIGNATURE_DESC1 Desc_1_1
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Desc_1_1, 1));
- }
- }
-
[StructLayout(LayoutKind.Explicit)]
internal partial struct _Anonymous_e__Union
{
diff --git a/src/TerraFX.Interop.Windows/Windows/um/winnt/LARGE_INTEGER.cs b/src/TerraFX.Interop.Windows/Windows/um/winnt/LARGE_INTEGER.cs
index faceb30d..190fad7f 100644
--- a/src/TerraFX.Interop.Windows/Windows/um/winnt/LARGE_INTEGER.cs
+++ b/src/TerraFX.Interop.Windows/Windows/um/winnt/LARGE_INTEGER.cs
@@ -3,9 +3,7 @@
// Ported from um/winnt.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.Windows
{
@@ -24,24 +22,6 @@ namespace TerraFX.Interop.Windows
[NativeTypeName("LONGLONG")]
public long QuadPart;
- public ref uint LowPart
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.LowPart, 1));
- }
- }
-
- public ref int HighPart
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.HighPart, 1));
- }
- }
-
internal partial struct _Anonymous_e__Struct
{
[NativeTypeName("DWORD")]
diff --git a/src/TerraFX.Interop.Windows/Windows/um/winnt/ULARGE_INTEGER.cs b/src/TerraFX.Interop.Windows/Windows/um/winnt/ULARGE_INTEGER.cs
index 62cdb895..9aa28922 100644
--- a/src/TerraFX.Interop.Windows/Windows/um/winnt/ULARGE_INTEGER.cs
+++ b/src/TerraFX.Interop.Windows/Windows/um/winnt/ULARGE_INTEGER.cs
@@ -3,9 +3,7 @@
// Ported from um/winnt.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using MemoryMarshal = ComputeSharp.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
namespace TerraFX.Interop.Windows
{
@@ -24,24 +22,6 @@ namespace TerraFX.Interop.Windows
[NativeTypeName("ULONGLONG")]
public ulong QuadPart;
- public ref uint LowPart
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.LowPart, 1));
- }
- }
-
- public ref uint HighPart
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.HighPart, 1));
- }
- }
-
internal partial struct _Anonymous_e__Struct
{
[NativeTypeName("DWORD")]
diff --git a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj
index 9bec5f56..f2e3cde4 100644
--- a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj
+++ b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj
@@ -30,6 +30,7 @@
+
diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj
index 93866d1d..68745c0c 100644
--- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj
+++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj
@@ -40,6 +40,7 @@
+