[D3D12] Rewrite pipeline cache for compact storage of pipeline descriptions

This commit is contained in:
Triang3l
2019-01-01 22:20:50 +03:00
parent 317e5c3ce2
commit 1cea4062c0
3 changed files with 698 additions and 673 deletions

View File

@@ -1310,11 +1310,10 @@ bool D3D12CommandProcessor::IssueDraw(PrimitiveType primitive_type,
// Create the pipeline if needed and bind it.
ID3D12PipelineState* pipeline;
ID3D12RootSignature* root_signature;
auto pipeline_status = pipeline_cache_->ConfigurePipeline(
vertex_shader, pixel_shader, primitive_type_converted,
indexed ? index_buffer_info->format : IndexFormat::kInt16,
pipeline_render_targets, &pipeline, &root_signature);
if (pipeline_status == PipelineCache::UpdateStatus::kError) {
if (!pipeline_cache_->ConfigurePipeline(
vertex_shader, pixel_shader, primitive_type_converted,
indexed ? index_buffer_info->format : IndexFormat::kInt16,
pipeline_render_targets, &pipeline, &root_signature)) {
return false;
}
if (current_pipeline_ != pipeline) {