From ddd7c0070d7cac41700593e984bfe70ad303da3c Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 12 Nov 2024 12:23:12 -0800 Subject: [PATCH 1/2] Fix the alignment of the `CD3DX12_PIPELINE_STATE_STREAM_*` structs --- samples/DirectX/D3D12/HelloConstBuffer12.cs | 16 ++++-- samples/DirectX/D3D12/Shared/DX12Sample.cs | 10 ++-- samples/DirectX/Shared/DXSample.cs | 16 +++--- .../CD3DX12FeatureSupport.Manual.cs | 2 +- ...3DX12_PIPELINE_MESH_STATE_STREAM.Manual.cs | 1 - ...CD3DX12_PIPELINE_STATE_STREAM_AS.Manual.cs | 22 +++++++- ...PIPELINE_STATE_STREAM_BLEND_DESC.Manual.cs | 22 +++++++- ...PIPELINE_STATE_STREAM_CACHED_PSO.Manual.cs | 22 +++++++- ...CD3DX12_PIPELINE_STATE_STREAM_CS.Manual.cs | 22 +++++++- ...ELINE_STATE_STREAM_DEPTH_STENCIL.Manual.cs | 22 +++++++- ...LINE_STATE_STREAM_DEPTH_STENCIL1.Manual.cs | 22 +++++++- ...LINE_STATE_STREAM_DEPTH_STENCIL2.Manual.cs | 22 +++++++- ...TATE_STREAM_DEPTH_STENCIL_FORMAT.Manual.cs | 22 +++++++- ...CD3DX12_PIPELINE_STATE_STREAM_DS.Manual.cs | 22 +++++++- ...DX12_PIPELINE_STATE_STREAM_FLAGS.Manual.cs | 22 +++++++- ...CD3DX12_PIPELINE_STATE_STREAM_GS.Manual.cs | 22 +++++++- ...CD3DX12_PIPELINE_STATE_STREAM_HS.Manual.cs | 22 +++++++- ..._STATE_STREAM_IB_STRIP_CUT_VALUE.Manual.cs | 22 +++++++- ...PELINE_STATE_STREAM_INPUT_LAYOUT.Manual.cs | 22 +++++++- ...CD3DX12_PIPELINE_STATE_STREAM_MS.Manual.cs | 22 +++++++- ..._PIPELINE_STATE_STREAM_NODE_MASK.Manual.cs | 22 +++++++- ..._STATE_STREAM_PRIMITIVE_TOPOLOGY.Manual.cs | 22 +++++++- ...CD3DX12_PIPELINE_STATE_STREAM_PS.Manual.cs | 22 +++++++- ...PIPELINE_STATE_STREAM_RASTERIZER.Manual.cs | 22 +++++++- ...IPELINE_STATE_STREAM_RASTERIZER1.Manual.cs | 22 +++++++- ...IPELINE_STATE_STREAM_RASTERIZER2.Manual.cs | 22 +++++++- ...ATE_STREAM_RENDER_TARGET_FORMATS.Manual.cs | 22 +++++++- ...LINE_STATE_STREAM_ROOT_SIGNATURE.Manual.cs | 22 +++++++- ...IPELINE_STATE_STREAM_SAMPLE_DESC.Manual.cs | 22 +++++++- ...IPELINE_STATE_STREAM_SAMPLE_MASK.Manual.cs | 22 +++++++- ...ELINE_STATE_STREAM_STREAM_OUTPUT.Manual.cs | 22 +++++++- ...INE_STATE_STREAM_VIEW_INSTANCING.Manual.cs | 22 +++++++- ...CD3DX12_PIPELINE_STATE_STREAM_VS.Manual.cs | 22 +++++++- .../DirectX.Manual.cs | 56 +++++++++---------- 34 files changed, 614 insertions(+), 103 deletions(-) diff --git a/samples/DirectX/D3D12/HelloConstBuffer12.cs b/samples/DirectX/D3D12/HelloConstBuffer12.cs index 7dfcf648c3..cf5115323d 100644 --- a/samples/DirectX/D3D12/HelloConstBuffer12.cs +++ b/samples/DirectX/D3D12/HelloConstBuffer12.cs @@ -17,6 +17,7 @@ using static TerraFX.Interop.DirectX.D3D12_HEAP_FLAGS; using static TerraFX.Interop.DirectX.D3D12_HEAP_TYPE; using static TerraFX.Interop.DirectX.D3D12_INPUT_CLASSIFICATION; +using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; using static TerraFX.Interop.DirectX.D3D12_PRIMITIVE_TOPOLOGY_TYPE; using static TerraFX.Interop.DirectX.D3D12_RESOURCE_STATES; using static TerraFX.Interop.DirectX.D3D12_ROOT_SIGNATURE_FLAGS; @@ -158,7 +159,7 @@ protected override void CreateDescriptorHeaps() }; // Describe and create the graphics pipeline state object (PSO). - var psoDesc = new D3D12_GRAPHICS_PIPELINE_STATE_DESC { + var gpsoDesc = new D3D12_GRAPHICS_PIPELINE_STATE_DESC { InputLayout = new D3D12_INPUT_LAYOUT_DESC { pInputElementDescs = inputElementDescs, NumElements = InputElementDescsCount, @@ -174,11 +175,18 @@ protected override void CreateDescriptorHeaps() NumRenderTargets = 1, SampleDesc = new DXGI_SAMPLE_DESC(count: 1, quality: 0), }; - psoDesc.DepthStencilState.DepthEnable = FALSE; - psoDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM; + gpsoDesc.DepthStencilState.DepthEnable = FALSE; + gpsoDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM; + + var pssDesc = new CD3DX12_PIPELINE_STATE_STREAM(gpsoDesc); + + var psoDesc = new D3D12_PIPELINE_STATE_STREAM_DESC { + SizeInBytes = (uint)sizeof(CD3DX12_PIPELINE_STATE_STREAM), + pPipelineStateSubobjectStream = &pssDesc + }; ID3D12PipelineState* pipelineState; - ThrowIfFailed(D3DDevice->CreateGraphicsPipelineState(&psoDesc, __uuidof(), (void**)&pipelineState)); + ThrowIfFailed(D3DDevice->CreatePipelineState(&psoDesc, __uuidof(), (void**)&pipelineState)); return pipelineState; } diff --git a/samples/DirectX/D3D12/Shared/DX12Sample.cs b/samples/DirectX/D3D12/Shared/DX12Sample.cs index 813856af47..62472176b8 100644 --- a/samples/DirectX/D3D12/Shared/DX12Sample.cs +++ b/samples/DirectX/D3D12/Shared/DX12Sample.cs @@ -29,7 +29,7 @@ public abstract unsafe class DX12Sample : DXSample { private readonly ID3D12CommandAllocator*[] _commandAllocators; - private ID3D12Device* _d3dDevice; + private ID3D12Device2* _d3dDevice; private IDXGIAdapter1* _dxgiAdapter; private IDXGIFactory4* _dxgiFactory; private IDXGISwapChain3* _swapChain; @@ -62,7 +62,7 @@ protected DX12Sample(string name) : base(name) public ID3D12CommandQueue* CommandQueue => _commandQueue; - public ID3D12Device* D3DDevice => _d3dDevice; + public ID3D12Device2* D3DDevice => _d3dDevice; public ID3D12Resource* DepthStencil => _depthStencil; @@ -243,10 +243,10 @@ protected override void CreateDeviceDependentResources() return commandQueue; } - ID3D12Device* CreateD3DDevice() + ID3D12Device2* CreateD3DDevice() { - ID3D12Device* d3dDevice; - ThrowIfFailed(D3D12CreateDevice((IUnknown*)_dxgiAdapter, D3D_FEATURE_LEVEL_11_0, __uuidof(), (void**)&d3dDevice)); + ID3D12Device2* d3dDevice; + ThrowIfFailed(D3D12CreateDevice((IUnknown*)_dxgiAdapter, D3D_FEATURE_LEVEL_11_0, __uuidof(), (void**)&d3dDevice)); return d3dDevice; } diff --git a/samples/DirectX/Shared/DXSample.cs b/samples/DirectX/Shared/DXSample.cs index 8c5d15a784..32d407a243 100644 --- a/samples/DirectX/Shared/DXSample.cs +++ b/samples/DirectX/Shared/DXSample.cs @@ -107,18 +107,18 @@ private static TimeSpan GetCurrentTimestamp() private static DXSample[] GetSamples() { var samples = new List(8) { - new HelloWindow11("D3D11.HelloWindow") - }; + // new HelloWindow11("D3D11.HelloWindow") + }; if (OperatingSystem.IsWindowsVersionAtLeast(10)) { - samples.Add(new HelloTriangle11("D3D11.HelloTriangle")); - samples.Add(new HelloWindow12("D3D12.HelloWindow")); - samples.Add(new HelloTriangle12("D3D12.HelloTriangle")); + // samples.Add(new HelloTriangle11("D3D11.HelloTriangle")); + // samples.Add(new HelloWindow12("D3D12.HelloWindow")); + // samples.Add(new HelloTriangle12("D3D12.HelloTriangle")); samples.Add(new HelloConstBuffer12("D3D12.HelloConstBuffer")); - samples.Add(new HelloTexture12("D3D12.HelloTexture")); - samples.Add(new HelloBundles12("D3D12.HelloBundles")); - samples.Add(new HelloMultiSampling12("D3D12.HelloMultiSampling")); + // samples.Add(new HelloTexture12("D3D12.HelloTexture")); + // samples.Add(new HelloBundles12("D3D12.HelloBundles")); + // samples.Add(new HelloMultiSampling12("D3D12.HelloMultiSampling")); } return samples.ToArray(); diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs index b40625d446..cb425848a6 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_check_feature_support/CD3DX12FeatureSupport.Manual.cs @@ -347,7 +347,7 @@ public HRESULT Init(ID3D12Device* pDevice) // Special procedure to initialize local protected resource session types structs // Must wait until session type count initialized - QueryProtectedResourceSessionTypes(NodeIndex, m_dProtectedResourceSessionTypeCount[NodeIndex].Count); + _ = QueryProtectedResourceSessionTypes(NodeIndex, m_dProtectedResourceSessionTypeCount[NodeIndex].Count); } // Initialize features that requires highest version check diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_MESH_STATE_STREAM.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_MESH_STATE_STREAM.Manual.cs index e39c19d9cb..7c278f68f8 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_MESH_STATE_STREAM.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_MESH_STATE_STREAM.Manual.cs @@ -39,7 +39,6 @@ public unsafe struct CD3DX12_PIPELINE_MESH_STATE_STREAM public CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING ViewInstancingDesc; - public CD3DX12_PIPELINE_MESH_STATE_STREAM([NativeTypeName("const D3DX12_MESH_SHADER_PIPELINE_STATE_DESC &")] in D3DX12_MESH_SHADER_PIPELINE_STATE_DESC Desc) { Flags = Desc.Flags; diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_AS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_AS.Manual.cs index ca258bbc37..39af5dd6b0 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_AS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_AS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_AS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_AS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_AS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_AS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_AS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_AS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC.Manual.cs index 5ab0b46ab0..f20c8be1ed 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_BLEND_DESC pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_BLEND_DESC pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC([NativeTypeName("D3D12_BLEND_DES public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC(in D3D12_BLEND_DESC value) => new CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC(value); public static implicit operator D3D12_BLEND_DESC(in CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_BLEND_DESC pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO.Manual.cs index ac223b9cea..4ea0577f89 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_CACHED_PIPELINE_STATE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_CACHED_PIPELINE_STATE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO([NativeTypeName("D3D12_CACHED_PI public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO(in D3D12_CACHED_PIPELINE_STATE value) => new CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO(value); public static implicit operator D3D12_CACHED_PIPELINE_STATE(in CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_CACHED_PIPELINE_STATE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CS.Manual.cs index d9a681bbab..4f84408c84 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_CS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_CS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_CS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_CS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_CS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_CS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_CS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL.Manual.cs index a2a3b40d7d..d6de0257cd 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_DEPTH_STENCIL_DESC pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_DEPTH_STENCIL_DESC pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL([NativeTypeName("D3D12_DEPTH_ public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL(in D3D12_DEPTH_STENCIL_DESC value) => new CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL(value); public static implicit operator D3D12_DEPTH_STENCIL_DESC(in CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_DEPTH_STENCIL_DESC pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1.Manual.cs index af448c6b61..3fd6c9aba8 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1 { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_DEPTH_STENCIL_DESC1 pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_DEPTH_STENCIL_DESC1 pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1([NativeTypeName("D3D12_DEPTH public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1(in D3D12_DEPTH_STENCIL_DESC1 value) => new CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1(value); public static implicit operator D3D12_DEPTH_STENCIL_DESC1(in CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1 value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_DEPTH_STENCIL_DESC1 pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2.Manual.cs index b88addc7b5..783031972d 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2 { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_DEPTH_STENCIL_DESC2 pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_DEPTH_STENCIL_DESC2 pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2([NativeTypeName("D3D12_DEPTH public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2(in D3D12_DEPTH_STENCIL_DESC2 value) => new CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2(value); public static implicit operator D3D12_DEPTH_STENCIL_DESC2(in CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2 value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_DEPTH_STENCIL_DESC2 pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT.Manual.cs index 78584f4305..1bf4292cd7 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public DXGI_FORMAT pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref DXGI_FORMAT pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT([NativeTypeName("DXGI_ public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT(in DXGI_FORMAT value) => new CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT(value); public static implicit operator DXGI_FORMAT(in CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public DXGI_FORMAT pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DS.Manual.cs index 68bda106a5..cdc6fbb8cb 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_DS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_DS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_DS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_DS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_DS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_DS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_DS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_FLAGS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_FLAGS.Manual.cs index dc64385932..b69988c5b1 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_FLAGS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_FLAGS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_FLAGS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_PIPELINE_STATE_FLAGS pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_FLAGS pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_FLAGS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_FLAGS([NativeTypeName("D3D12_PIPELINE_STATE public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_FLAGS(in D3D12_PIPELINE_STATE_FLAGS value) => new CD3DX12_PIPELINE_STATE_STREAM_FLAGS(value); public static implicit operator D3D12_PIPELINE_STATE_FLAGS(in CD3DX12_PIPELINE_STATE_STREAM_FLAGS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_PIPELINE_STATE_FLAGS pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_GS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_GS.Manual.cs index 04aa50a354..fb06dd196f 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_GS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_GS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_GS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_GS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_GS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_GS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_GS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_GS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_HS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_HS.Manual.cs index beb0565ccb..7a25c9e079 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_HS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_HS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_HS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_HS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_HS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_HS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_HS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_HS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE.Manual.cs index 6223ff66d8..f2d19a3e4c 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_INDEX_BUFFER_STRIP_CUT_VALUE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_INDEX_BUFFER_STRIP_CUT_VALUE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE([NativeTypeName("D3D12_I public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE(in D3D12_INDEX_BUFFER_STRIP_CUT_VALUE value) => new CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE(value); public static implicit operator D3D12_INDEX_BUFFER_STRIP_CUT_VALUE(in CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_INDEX_BUFFER_STRIP_CUT_VALUE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT.Manual.cs index cfe121c838..5b83ef40c1 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_INPUT_LAYOUT_DESC pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_INPUT_LAYOUT_DESC pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT([NativeTypeName("D3D12_INPUT_L public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT(in D3D12_INPUT_LAYOUT_DESC value) => new CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT(value); public static implicit operator D3D12_INPUT_LAYOUT_DESC(in CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_INPUT_LAYOUT_DESC pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_MS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_MS.Manual.cs index 9013ce4dd0..056aa2034d 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_MS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_MS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_MS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_MS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_MS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_MS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_MS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_MS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK.Manual.cs index 9e0d047d1f..c2a09833a3 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public uint pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref uint pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK([NativeTypeName("uint const &")] public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK(in uint value) => new CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK(value); public static implicit operator uint(in CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public uint pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY.Manual.cs index a22ab22abc..8bccd24eaf 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_PRIMITIVE_TOPOLOGY_TYPE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_PRIMITIVE_TOPOLOGY_TYPE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY([NativeTypeName("D3D12_P public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY(in D3D12_PRIMITIVE_TOPOLOGY_TYPE value) => new CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY(value); public static implicit operator D3D12_PRIMITIVE_TOPOLOGY_TYPE(in CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_PRIMITIVE_TOPOLOGY_TYPE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PS.Manual.cs index b4ac7c5902..64c52ec94f 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_PS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_PS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_PS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_PS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_PS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_PS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_PS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER.Manual.cs index 649945fd94..399dc76cc8 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_RASTERIZER_DESC pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_RASTERIZER_DESC pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER([NativeTypeName("D3D12_RASTERIZE public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER(in D3D12_RASTERIZER_DESC value) => new CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER(value); public static implicit operator D3D12_RASTERIZER_DESC(in CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_RASTERIZER_DESC pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1.Manual.cs index a94041f3b0..bd6c2407b5 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1 { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_RASTERIZER_DESC1 pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_RASTERIZER_DESC1 pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1([NativeTypeName("D3D12_RASTERIZ public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1(in D3D12_RASTERIZER_DESC1 value) => new CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1(value); public static implicit operator D3D12_RASTERIZER_DESC1(in CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1 value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_RASTERIZER_DESC1 pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2.Manual.cs index 5979596aed..387a89af42 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2 { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_RASTERIZER_DESC2 pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_RASTERIZER_DESC2 pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2([NativeTypeName("D3D12_RASTERIZ public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2(in D3D12_RASTERIZER_DESC2 value) => new CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2(value); public static implicit operator D3D12_RASTERIZER_DESC2(in CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2 value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_RASTERIZER_DESC2 pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS.Manual.cs index 1d97935aae..8b6e1caedd 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_RT_FORMAT_ARRAY pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_RT_FORMAT_ARRAY pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS([NativeTypeName("D3D1 public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS(in D3D12_RT_FORMAT_ARRAY value) => new CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS(value); public static implicit operator D3D12_RT_FORMAT_ARRAY(in CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_RT_FORMAT_ARRAY pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE.Manual.cs index bce2620b00..6f91376ec3 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public unsafe struct CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public ID3D12RootSignature* pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref ID3D12RootSignature* pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE([NativeTypeName("ID3D12RootS public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE(in ID3D12RootSignature* value) => new CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE(value); public static implicit operator ID3D12RootSignature*(in CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public ID3D12RootSignature* pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC.Manual.cs index 2c80450a97..3c4650bf9e 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public DXGI_SAMPLE_DESC pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref DXGI_SAMPLE_DESC pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC([NativeTypeName("DXGI_SAMPLE_DE public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC(in DXGI_SAMPLE_DESC value) => new CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC(value); public static implicit operator DXGI_SAMPLE_DESC(in CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public DXGI_SAMPLE_DESC pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK.Manual.cs index 22f57f183f..11742d9109 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public uint pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref uint pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK([NativeTypeName("uint const &") public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK(in uint value) => new CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK(value); public static implicit operator uint(in CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public uint pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT.Manual.cs index fc14ba711a..3ccc04417b 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_STREAM_OUTPUT_DESC pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_STREAM_OUTPUT_DESC pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT([NativeTypeName("D3D12_STREAM public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT(in D3D12_STREAM_OUTPUT_DESC value) => new CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT(value); public static implicit operator D3D12_STREAM_OUTPUT_DESC(in CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_STREAM_OUTPUT_DESC pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING.Manual.cs index 8d8c22fb59..06c5c3dfd2 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_VIEW_INSTANCING_DESC pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_VIEW_INSTANCING_DESC pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING([NativeTypeName("D3D12_VIEW public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING(in D3D12_VIEW_INSTANCING_DESC value) => new CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING(value); public static implicit operator D3D12_VIEW_INSTANCING_DESC(in CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_VIEW_INSTANCING_DESC pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VS.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VS.Manual.cs index 149f061a73..91618601a3 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VS.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/CD3DX12_PIPELINE_STATE_STREAM_VS.Manual.cs @@ -3,15 +3,26 @@ // Ported from d3dx12_pipeline_state_stream.h in microsoft/DirectX-Headers tag v1.614.0 // Original source is Copyright © Microsoft. Licensed under the MIT license +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; using static TerraFX.Interop.DirectX.D3D12_PIPELINE_STATE_SUBOBJECT_TYPE; namespace TerraFX.Interop.DirectX; +[StructLayout(LayoutKind.Explicit)] public struct CD3DX12_PIPELINE_STATE_STREAM_VS { - public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + [FieldOffset(0)] + private readonly unsafe void* _Anonymous_e__Alignment; - public D3D12_SHADER_BYTECODE pssInner; + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType => ref Anonymous.pssType; + + [UnscopedRef] + public ref D3D12_SHADER_BYTECODE pssInner => ref Anonymous.pssInner; public CD3DX12_PIPELINE_STATE_STREAM_VS() { @@ -28,4 +39,11 @@ public CD3DX12_PIPELINE_STATE_STREAM_VS([NativeTypeName("D3D12_SHADER_BYTECODE c public static implicit operator CD3DX12_PIPELINE_STATE_STREAM_VS(in D3D12_SHADER_BYTECODE value) => new CD3DX12_PIPELINE_STATE_STREAM_VS(value); public static implicit operator D3D12_SHADER_BYTECODE(in CD3DX12_PIPELINE_STATE_STREAM_VS value) => value.pssInner; + + public struct _Anonymous_e__Struct + { + public D3D12_PIPELINE_STATE_SUBOBJECT_TYPE pssType; + + public D3D12_SHADER_BYTECODE pssInner; + } } diff --git a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs index 2589f182f4..c5582eac1a 100644 --- a/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs +++ b/sources/Interop/Windows/DirectX/d3dx12/d3dx12_pipeline_state_stream/DirectX.Manual.cs @@ -49,196 +49,196 @@ public static HRESULT D3DX12ParsePipelineStream([NativeTypeName("const D3D12_PIP { case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE: { - pCallbacks->RootSignatureCb(((CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE*)(pStream))->pssInner); + pCallbacks->RootSignatureCb(((CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS: { - pCallbacks->VSCb(&((CD3DX12_PIPELINE_STATE_STREAM_VS*)(pStream))->pssInner); + pCallbacks->VSCb(&((CD3DX12_PIPELINE_STATE_STREAM_VS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_VS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS: { - pCallbacks->PSCb(&((CD3DX12_PIPELINE_STATE_STREAM_PS*)(pStream))->pssInner); + pCallbacks->PSCb(&((CD3DX12_PIPELINE_STATE_STREAM_PS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_PS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS: { - pCallbacks->DSCb(&((CD3DX12_PIPELINE_STATE_STREAM_DS*)(pStream))->pssInner); + pCallbacks->DSCb(&((CD3DX12_PIPELINE_STATE_STREAM_DS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_DS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS: { - pCallbacks->HSCb(&((CD3DX12_PIPELINE_STATE_STREAM_HS*)(pStream))->pssInner); + pCallbacks->HSCb(&((CD3DX12_PIPELINE_STATE_STREAM_HS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_HS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS: { - pCallbacks->GSCb(&((CD3DX12_PIPELINE_STATE_STREAM_GS*)(pStream))->pssInner); + pCallbacks->GSCb(&((CD3DX12_PIPELINE_STATE_STREAM_GS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_GS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS: { - pCallbacks->CSCb(&((CD3DX12_PIPELINE_STATE_STREAM_CS*)(pStream))->pssInner); + pCallbacks->CSCb(&((CD3DX12_PIPELINE_STATE_STREAM_CS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_CS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_AS: { - pCallbacks->ASCb(&((CD3DX12_PIPELINE_STATE_STREAM_AS*)(pStream))->pssInner); + pCallbacks->ASCb(&((CD3DX12_PIPELINE_STATE_STREAM_AS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_AS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS: { - pCallbacks->MSCb(&((CD3DX12_PIPELINE_STATE_STREAM_MS*)(pStream))->pssInner); + pCallbacks->MSCb(&((CD3DX12_PIPELINE_STATE_STREAM_MS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_MS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT: { - pCallbacks->StreamOutputCb(&((CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT*)(pStream))->pssInner); + pCallbacks->StreamOutputCb(&((CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND: { - pCallbacks->BlendStateCb(&((CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC*)(pStream))->pssInner); + pCallbacks->BlendStateCb(&((CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK: { - pCallbacks->SampleMaskCb(((CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK*)(pStream))->pssInner); + pCallbacks->SampleMaskCb(((CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER: { - pCallbacks->RasterizerStateCb(&((CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER*)(pStream))->pssInner); + pCallbacks->RasterizerStateCb(&((CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER1: { - pCallbacks->RasterizerState1Cb(&((CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1*)(pStream))->pssInner); + pCallbacks->RasterizerState1Cb(&((CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER1)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER2: { - pCallbacks->RasterizerState2Cb(&((CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2*)(pStream))->pssInner); + pCallbacks->RasterizerState2Cb(&((CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER2)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL: { - pCallbacks->DepthStencilStateCb(&((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL*)(pStream))->pssInner); + pCallbacks->DepthStencilStateCb(&((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1: { - pCallbacks->DepthStencilState1Cb(&((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1*)(pStream))->pssInner); + pCallbacks->DepthStencilState1Cb(&((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL2: { - pCallbacks->DepthStencilState2Cb(&((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2*)(pStream))->pssInner); + pCallbacks->DepthStencilState2Cb(&((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL2)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT: { - pCallbacks->InputLayoutCb(&((CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT*)(pStream))->pssInner); + pCallbacks->InputLayoutCb(&((CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE: { - pCallbacks->IBStripCutValueCb(((CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE*)(pStream))->pssInner); + pCallbacks->IBStripCutValueCb(((CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY: { - pCallbacks->PrimitiveTopologyTypeCb(((CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY*)(pStream))->pssInner); + pCallbacks->PrimitiveTopologyTypeCb(((CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS: { - pCallbacks->RTVFormatsCb(&((CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS*)(pStream))->pssInner); + pCallbacks->RTVFormatsCb(&((CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT: { - pCallbacks->DSVFormatCb(((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT*)(pStream))->pssInner); + pCallbacks->DSVFormatCb(((CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC: { - pCallbacks->SampleDescCb(&((CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC*)(pStream))->pssInner); + pCallbacks->SampleDescCb(&((CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK: { - pCallbacks->NodeMaskCb(((CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK*)(pStream))->pssInner); + pCallbacks->NodeMaskCb(((CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO: { - pCallbacks->CachedPSOCb(&((CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO*)(pStream))->pssInner); + pCallbacks->CachedPSOCb(&((CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS: { - pCallbacks->FlagsCb(((CD3DX12_PIPELINE_STATE_STREAM_FLAGS*)(pStream))->pssInner); + pCallbacks->FlagsCb(((CD3DX12_PIPELINE_STATE_STREAM_FLAGS*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_FLAGS)); break; } case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING: { - pCallbacks->ViewInstancingCb(&((CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING*)(pStream))->pssInner); + pCallbacks->ViewInstancingCb(&((CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING*)(pStream))->Anonymous.pssInner); SizeOfSubobject = (uint)(sizeof(CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING)); break; } From 2f78f130a5532948146f6f963ccce5fe45a6030a Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 12 Nov 2024 12:30:31 -0800 Subject: [PATCH 2/2] Add support for .NET 9 --- Directory.Build.props | 2 +- global.json | 2 +- samples/DirectX/TerraFX.Samples.DirectX.csproj | 2 +- samples/WinForms/DXPanel.cs | 3 +++ samples/WinForms/TerraFX.Samples.WinForms.csproj | 2 +- scripts/build.ps1 | 1 + sources/Interop/Windows/TerraFX.Interop.Windows.csproj | 2 +- tests/Interop/Windows/TerraFX.Interop.Windows.UnitTests.csproj | 2 +- 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index b341823df7..67efd7f1a5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -47,7 +47,7 @@ $(BaseArtifactsPath)pkg/$(Configuration)/ TerraFX.Interop.Windows TerraFX.Interop - 10.0.26100.0 + 10.0.26100.1 rc1 pr diff --git a/global.json b/global.json index d8833ada81..b3db90e61e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100-preview", + "version": "9.0.100", "allowPrerelease": true, "rollForward": "latestFeature" } diff --git a/samples/DirectX/TerraFX.Samples.DirectX.csproj b/samples/DirectX/TerraFX.Samples.DirectX.csproj index d1aeb21cce..50b3799aa8 100644 --- a/samples/DirectX/TerraFX.Samples.DirectX.csproj +++ b/samples/DirectX/TerraFX.Samples.DirectX.csproj @@ -3,7 +3,7 @@ - net8.0 + net8.0;net9.0 diff --git a/samples/WinForms/DXPanel.cs b/samples/WinForms/DXPanel.cs index f59620cca3..b5f6ce6f25 100644 --- a/samples/WinForms/DXPanel.cs +++ b/samples/WinForms/DXPanel.cs @@ -1,6 +1,7 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. using System; +using System.ComponentModel; using System.Numerics; using System.Windows.Forms; using TerraFX.Interop.Windows; @@ -19,6 +20,7 @@ public DXPanel() InitializeComponent(); } + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public DXSample? DXSample { get @@ -46,6 +48,7 @@ public DXSample? DXSample } } + [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] public bool UseWarpDevice { get diff --git a/samples/WinForms/TerraFX.Samples.WinForms.csproj b/samples/WinForms/TerraFX.Samples.WinForms.csproj index 5c35761414..77b2bbe658 100644 --- a/samples/WinForms/TerraFX.Samples.WinForms.csproj +++ b/samples/WinForms/TerraFX.Samples.WinForms.csproj @@ -3,7 +3,7 @@ - net8.0-windows + net8.0-windows;net9.0-windows WinExe true diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 45944a4aef..91b116a3f0 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -134,6 +134,7 @@ try { Create-Directory -Path $DotNetInstallDirectory & $DotNetInstallScript -Channel 8.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture + & $DotNetInstallScript -Channel 9.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture $env:PATH="$DotNetInstallDirectory;$env:PATH" } diff --git a/sources/Interop/Windows/TerraFX.Interop.Windows.csproj b/sources/Interop/Windows/TerraFX.Interop.Windows.csproj index 12a00bb0ab..4e60cd88c2 100644 --- a/sources/Interop/Windows/TerraFX.Interop.Windows.csproj +++ b/sources/Interop/Windows/TerraFX.Interop.Windows.csproj @@ -4,7 +4,7 @@ TerraFX.Interop - net8.0 + net8.0;net9.0 diff --git a/tests/Interop/Windows/TerraFX.Interop.Windows.UnitTests.csproj b/tests/Interop/Windows/TerraFX.Interop.Windows.UnitTests.csproj index 55796d3a74..bfa06cc5bc 100644 --- a/tests/Interop/Windows/TerraFX.Interop.Windows.UnitTests.csproj +++ b/tests/Interop/Windows/TerraFX.Interop.Windows.UnitTests.csproj @@ -4,7 +4,7 @@ TerraFX.Interop.UnitTests - net8.0 + net8.0;net9.0