mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Queue unique models for compilation immediately.
This commit is contained in:
parent
23297c73a6
commit
172bc6683e
2 changed files with 8 additions and 2 deletions
|
|
@ -69,7 +69,12 @@ namespace boost
|
|||
|
||||
uint32_t use_count() const
|
||||
{
|
||||
return use_count_;
|
||||
return std::byteswap(static_cast<uint32_t const volatile &>(use_count_.value));
|
||||
}
|
||||
|
||||
bool unique() const
|
||||
{
|
||||
return use_count() == 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -158,6 +163,7 @@ namespace boost
|
|||
explicit operator bool() const { return px != nullptr; }
|
||||
|
||||
size_t use_count() const { return pn ? pn->use_count() : 0; }
|
||||
bool unique() const { return !pn || pn->unique(); }
|
||||
};
|
||||
|
||||
using anonymous_shared_ptr = shared_ptr<void>;
|
||||
|
|
|
|||
|
|
@ -4668,7 +4668,7 @@ static void ModelConsumerThread()
|
|||
else
|
||||
ready = CheckMadeAll(*reinterpret_cast<Hedgehog::Mirage::CModelData*>(pendingModel.get()));
|
||||
|
||||
if (ready)
|
||||
if (ready || pendingModel.unique())
|
||||
{
|
||||
g_compilingModelQueue.enqueue(std::move(pendingModel));
|
||||
--g_pendingModelCount;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue