using ComputeSharp.Core.Interop; using TerraFX.Interop; namespace ComputeSharp.Graphics.Commands { /// /// A representing a custom pipeline state for a compute operation. /// internal sealed unsafe class PipelineData : NativeObject { /// /// The instance for the current object. /// private ComPtr d3D12RootSignature; /// /// The instance for the current object. /// private ComPtr d3D12PipelineState; /// /// Creates a new instance with the specified parameters. /// /// The to use. /// The value for the current shader. /// The bytecode for the compute shader to run. public PipelineData(ComPtr d3D12RootSignature, ComPtr d3D12PipelineState) { this.d3D12RootSignature = d3D12RootSignature; this.d3D12PipelineState = d3D12PipelineState; } /// /// Gets the instance for the current object. /// public ID3D12RootSignature* D3D12RootSignature => this.d3D12RootSignature; /// /// Gets the instance for the current object. /// public ID3D12PipelineState* D3D12PipelineState => this.d3D12PipelineState; /// protected override void OnDispose() { this.d3D12RootSignature.Dispose(); this.d3D12PipelineState.Dispose(); } } }