3 #include "util/unordered_map.h" 4 #include "util/string.h" 6 #include "renderer/root_signature.h" 75 void SetBlendState(
const D3D12_BLEND_DESC& blend_desc);
81 void SetRasterizerState(
const D3D12_RASTERIZER_DESC& rasterizer_desc);
87 void SetDepthStencilState(
const D3D12_DEPTH_STENCIL_DESC& depth_stencil_desc);
93 void SetSampleMask(UINT sample_mask);
99 void SetPrimitiveTopologyType(D3D12_PRIMITIVE_TOPOLOGY_TYPE topology_type);
108 void SetRenderTargetFormat(DXGI_FORMAT rtv_format, DXGI_FORMAT dsv_format, UINT msaa_count = 1, UINT msaa_quality = 0);
118 void SetRenderTargetFormats(UINT num_rtvs,
const DXGI_FORMAT* rtv_formats, DXGI_FORMAT dsv_format, UINT msaa_count = 1, UINT msaa_quality = 0);
125 void SetInputLayout(UINT num_elements,
const D3D12_INPUT_ELEMENT_DESC* input_element_descs);
131 void SetPrimitiveRestart(D3D12_INDEX_BUFFER_STRIP_CUT_VALUE ib_props);
143 void SetPixelShader(
const D3D12_SHADER_BYTECODE& binary) { pso_desc_.PS = binary; }
155 void SetHullShader(
const D3D12_SHADER_BYTECODE& binary) { pso_desc_.HS = binary; }
167 D3D12_INPUT_ELEMENT_DESC input_element_descs_[16];
193 void SetComputeShader(
const void* binary,
size_t size) { pso_desc_.CS = CD3DX12_SHADER_BYTECODE(binary, size); }
ID3D12PipelineState * operator->()
Pointer operator overload which returns the underlying PSO.
Definition: pipeline_state.h:36
RootSignature & GetRootSignature()
Definition: pipeline_state.h:33
The base PipelineStateObject.
Definition: pipeline_state.h:20
void SetComputeShader(const void *binary, size_t size)
Sets the compute shader on this ComputePSO.
Definition: pipeline_state.h:193
D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc_
The PSO description.
Definition: pipeline_state.h:166
void SetRootSignature(RootSignature &root_signature)
Sets the root signature in the PSO.
Definition: pipeline_state.h:30
Wraps the PipelineStateObject for graphics pipelines.
Definition: pipeline_state.h:61
void SetGeometryShader(const D3D12_SHADER_BYTECODE &binary)
Sets this PSO's geometry shader.
Definition: pipeline_state.h:149
PSO()
Constructs the PSO.
Definition: pipeline_state.h:24
Wraps the ID3D12RootSignature object.
Definition: root_signature.h:121
void Destroy()
Destroys the PSO.
Definition: pipeline_state.cc:10
void SetDomainShader(const D3D12_SHADER_BYTECODE &binary)
Sets this PSO's domain shader.
Definition: pipeline_state.h:161
Manages the PipelineStateObject for compute pipelines.
Definition: pipeline_state.h:179
virtual void Finalize()=0
Finalizes the PSO - it actually makes it ready for use.
The main Blowbox namespace.
Definition: image.cc:8
void SetPixelShader(const D3D12_SHADER_BYTECODE &binary)
Sets this PSO's pixel shader.
Definition: pipeline_state.h:143
ID3D12PipelineState * GetPSO() const
Definition: pipeline_state.h:45
void SetComputeShader(const D3D12_SHADER_BYTECODE &binary)
Sets the compute shader on this ComputePSO.
Definition: pipeline_state.h:199
ID3D12PipelineState * pso_
The underlying PSO object.
Definition: pipeline_state.h:48
RootSignature * root_signature_
The root signature that is bound to this PSO.
Definition: pipeline_state.h:49
void SetHullShader(const D3D12_SHADER_BYTECODE &binary)
Sets this PSO's hull shader.
Definition: pipeline_state.h:155
void SetVertexShader(const D3D12_SHADER_BYTECODE &binary)
Sets this PSO's vertex shader.
Definition: pipeline_state.h:137
D3D12_COMPUTE_PIPELINE_STATE_DESC pso_desc_
The PSO description.
Definition: pipeline_state.h:204