VideoCommon: store the configuration used to create the AbstractPipeline on the pipeline itself, so that it's easy to duplicate pipelines with slightly altered configuration

This commit is contained in:
iwubcode
2023-01-27 18:28:52 -06:00
parent aaad0cd39f
commit d0c6b6c9ed
12 changed files with 45 additions and 38 deletions

View File

@ -496,9 +496,10 @@ Metal::ObjectCache::CreatePipeline(const AbstractPipelineConfig& config)
Internal::StoredPipeline pipeline = m_internal->GetOrCreatePipeline(config);
if (!pipeline.first)
return nullptr;
return std::make_unique<Pipeline>(
std::move(pipeline.first), pipeline.second, Convert(config.rasterization_state.primitive),
Convert(config.rasterization_state.cullmode), config.depth_state, config.usage);
return std::make_unique<Pipeline>(config, std::move(pipeline.first), pipeline.second,
Convert(config.rasterization_state.primitive),
Convert(config.rasterization_state.cullmode),
config.depth_state, config.usage);
}
void Metal::ObjectCache::ShaderDestroyed(const Shader* shader)