1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 19:24:12 +01:00

[dxvk] Minor

This commit is contained in:
Philip Rebohle 2018-03-22 11:01:54 +01:00
parent 5c2144b55d
commit 9215cfdcf2
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 6 additions and 7 deletions

View File

@ -7,8 +7,8 @@ namespace dxvk {
void DxvkLifetimeTracker::reset() { void DxvkLifetimeTracker::reset() {
for (auto i = m_resources.cbegin(); i != m_resources.cend(); i++) for (const auto& resource : m_resources)
(*i)->release(); resource->release();
m_resources.clear(); m_resources.clear();
} }

View File

@ -30,10 +30,9 @@ namespace dxvk {
}); });
m_entries.push({ fence, cmdList }); m_entries.push({ fence, cmdList });
}
m_condOnAdd.notify_one(); m_condOnAdd.notify_one();
} }
}
void DxvkSubmissionQueue::threadFunc() { void DxvkSubmissionQueue::threadFunc() {
@ -50,9 +49,9 @@ namespace dxvk {
entry = std::move(m_entries.front()); entry = std::move(m_entries.front());
m_entries.pop(); m_entries.pop();
} }
}
m_condOnTake.notify_one(); m_condOnTake.notify_one();
}
if (entry.fence != nullptr) { if (entry.fence != nullptr) {
while (!entry.fence->wait(1'000'000'000ull)) while (!entry.fence->wait(1'000'000'000ull))

View File

@ -25,7 +25,7 @@ namespace dxvk {
virtual ~DxvkResource(); virtual ~DxvkResource();
bool isInUse() const { bool isInUse() const {
return m_useCount != 0; return m_useCount.load() != 0;
} }
void acquire() { m_useCount += 1; } void acquire() { m_useCount += 1; }