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

[d3d11] Use unlikely() for some query code

This is a somewhat hot path in some games, so why not.
This commit is contained in:
Philip Rebohle 2019-07-17 20:35:00 +02:00
parent c4b56b9d8d
commit f16ba4794b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 3 additions and 3 deletions

View File

@ -247,7 +247,7 @@ namespace dxvk {
void STDMETHODCALLTYPE D3D11DeviceContext::Begin(ID3D11Asynchronous *pAsync) {
D3D10DeviceLock lock = LockContext();
if (!pAsync)
if (unlikely(!pAsync))
return;
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
@ -262,7 +262,7 @@ namespace dxvk {
void STDMETHODCALLTYPE D3D11DeviceContext::End(ID3D11Asynchronous *pAsync) {
D3D10DeviceLock lock = LockContext();
if (!pAsync)
if (unlikely(!pAsync))
return;
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));

View File

@ -214,7 +214,7 @@ namespace dxvk {
ctx->endQuery(m_query[0]);
}
if (m_predicate.defined())
if (unlikely(m_predicate.defined()))
ctx->writePredicate(m_predicate, m_query[0]);
m_state = D3D11_VK_QUERY_ENDED;