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:
parent
c4b56b9d8d
commit
f16ba4794b
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user