mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 03:38:38 +12:00
rsx: Avoid race conditions in unsynchronized unprotect
This commit is contained in:
parent
af62c92b7f
commit
dd4c13b625
1 changed files with 8 additions and 4 deletions
|
@ -679,13 +679,17 @@ namespace rsx
|
||||||
m_unreleased_texture_objects++;
|
m_unreleased_texture_objects++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Only unsynchronized (no-flush) sections should reach here, and only if the rendering thread is the caller
|
// Only unsynchronized (no-flush) sections should reach here, and only if the rendering thread is the caller
|
||||||
if (discard_only)
|
if (discard_only)
|
||||||
|
{
|
||||||
obj.first->discard();
|
obj.first->discard();
|
||||||
|
obj.second->remove_one();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
obj.first->unprotect();
|
{
|
||||||
|
// Delay unprotect in case there are sections to flush
|
||||||
obj.second->remove_one();
|
result.sections_to_unprotect.push_back(obj.first);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deferred_flush && result.sections_to_flush.size())
|
if (deferred_flush && result.sections_to_flush.size())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue