[D3D12] Prototype multithreaded PSO creation

This commit is contained in:
Triang3l
2019-01-04 00:30:11 +03:00
parent 364cae6cc8
commit 890228b6f3
6 changed files with 255 additions and 59 deletions

View File

@@ -280,6 +280,12 @@ class DeferredCommandList {
arg = pipeline_state;
}
inline void SetPipelineStateHandle(void* pipeline_state_handle) {
auto& arg = *reinterpret_cast<void**>(
WriteCommand(Command::kSetPipelineStateHandle, sizeof(void*)));
arg = pipeline_state_handle;
}
inline void D3DSetSamplePositions(
UINT num_samples_per_pixel, UINT num_pixels,
const D3D12_SAMPLE_POSITION* sample_positions) {
@@ -321,6 +327,7 @@ class DeferredCommandList {
kD3DSetGraphicsRootSignature,
kSetDescriptorHeaps,
kD3DSetPipelineState,
kSetPipelineStateHandle,
kD3DSetSamplePositions,
};
@@ -368,7 +375,7 @@ class DeferredCommandList {
bool rts_single_handle_to_descriptor_range;
bool depth_stencil;
D3D12_CPU_DESCRIPTOR_HANDLE
render_target_descriptors[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
render_target_descriptors[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
D3D12_CPU_DESCRIPTOR_HANDLE depth_stencil_descriptor;
};