diff --git a/src/ComputeSharp.Graphics/Commands/CommandList2.cs b/src/ComputeSharp.Graphics/Commands/CommandList2.cs
index 2bdbed00..9fe49507 100644
--- a/src/ComputeSharp.Graphics/Commands/CommandList2.cs
+++ b/src/ComputeSharp.Graphics/Commands/CommandList2.cs
@@ -85,10 +85,10 @@ namespace ComputeSharp.Graphics.Commands
/// Sets a given object ready to be executed.
///
/// The input to setup.
- public void SetPipelineState(PipelineState pipelineState)
+ public void SetPipelineData(PipelineData pipelineData)
{
- // TODO: D3D12GraphicsCommandList->SetComputeRootSignature()
- // TODO: D3D12GraphicsCommandList->SetPipelineState()
+ D3D12GraphicsCommandList->SetComputeRootSignature(pipelineData.D3D12RootSignature);
+ D3D12GraphicsCommandList->SetPipelineState(pipelineData.D3D12PipelineState);
}
///
diff --git a/src/ComputeSharp.Graphics/Commands/PipelineData.cs b/src/ComputeSharp.Graphics/Commands/PipelineData.cs
new file mode 100644
index 00000000..a63f677c
--- /dev/null
+++ b/src/ComputeSharp.Graphics/Commands/PipelineData.cs
@@ -0,0 +1,56 @@
+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
+ {
+ get => this.d3D12RootSignature;
+ }
+
+ ///
+ /// Gets the instance for the current object.
+ ///
+ public ID3D12PipelineState* D3D12PipelineState
+ {
+ get => this.d3D12PipelineState;
+ }
+
+ ///
+ protected override void Dispose(bool disposing)
+ {
+ this.d3D12RootSignature.Dispose();
+ this.d3D12PipelineState.Dispose();
+ }
+ }
+}