ShaderCache: Fix crash if pipeline from uid cache fails creation
This commit is contained in:
parent
96aa762d1e
commit
c6b45c5ca9
|
@ -641,6 +641,7 @@ const AbstractPipeline* ShaderCache::InsertGXPipeline(const GXPipelineUid& confi
|
||||||
auto& entry = m_gx_pipeline_cache[config];
|
auto& entry = m_gx_pipeline_cache[config];
|
||||||
entry.second = false;
|
entry.second = false;
|
||||||
if (!entry.first && pipeline)
|
if (!entry.first && pipeline)
|
||||||
|
{
|
||||||
entry.first = std::move(pipeline);
|
entry.first = std::move(pipeline);
|
||||||
|
|
||||||
if (g_ActiveConfig.bShaderCache)
|
if (g_ActiveConfig.bShaderCache)
|
||||||
|
@ -654,6 +655,7 @@ const AbstractPipeline* ShaderCache::InsertGXPipeline(const GXPipelineUid& confi
|
||||||
static_cast<u32>(cache_data.size()));
|
static_cast<u32>(cache_data.size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return entry.first.get();
|
return entry.first.get();
|
||||||
}
|
}
|
||||||
|
@ -665,6 +667,7 @@ ShaderCache::InsertGXUberPipeline(const GXUberPipelineUid& config,
|
||||||
auto& entry = m_gx_uber_pipeline_cache[config];
|
auto& entry = m_gx_uber_pipeline_cache[config];
|
||||||
entry.second = false;
|
entry.second = false;
|
||||||
if (!entry.first && pipeline)
|
if (!entry.first && pipeline)
|
||||||
|
{
|
||||||
entry.first = std::move(pipeline);
|
entry.first = std::move(pipeline);
|
||||||
|
|
||||||
if (g_ActiveConfig.bShaderCache)
|
if (g_ActiveConfig.bShaderCache)
|
||||||
|
@ -678,6 +681,7 @@ ShaderCache::InsertGXUberPipeline(const GXUberPipelineUid& config,
|
||||||
static_cast<u32>(cache_data.size()));
|
static_cast<u32>(cache_data.size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return entry.first.get();
|
return entry.first.get();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue