mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-23 02:42:20 +00:00
Protect m_storage.find(key) to fix a race
This commit is contained in:
parent
0a2874405d
commit
7f4e546f19
1 changed files with 7 additions and 4 deletions
|
@ -455,12 +455,15 @@ public:
|
||||||
backend_traits::validate_pipeline_properties(vertex_program, fragment_program, pipelineProperties);
|
backend_traits::validate_pipeline_properties(vertex_program, fragment_program, pipelineProperties);
|
||||||
pipeline_key key = { vertex_program.id, fragment_program.id, pipelineProperties };
|
pipeline_key key = { vertex_program.id, fragment_program.id, pipelineProperties };
|
||||||
|
|
||||||
|
{
|
||||||
|
reader_lock lock(m_pipeline_mutex);
|
||||||
const auto I = m_storage.find(key);
|
const auto I = m_storage.find(key);
|
||||||
if (I != m_storage.end())
|
if (I != m_storage.end())
|
||||||
{
|
{
|
||||||
m_cache_miss_flag = false;
|
m_cache_miss_flag = false;
|
||||||
return I->second;
|
return I->second;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (allow_async)
|
if (allow_async)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue