mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Only execute Begin for scoped queries
This commit is contained in:
parent
1459f0e852
commit
0671007437
@ -251,6 +251,9 @@ namespace dxvk {
|
||||
|
||||
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
|
||||
|
||||
if (unlikely(!query->IsScoped()))
|
||||
return;
|
||||
|
||||
EmitCs([cQuery = std::move(query)]
|
||||
(DxvkContext* ctx) {
|
||||
cQuery->Begin(ctx);
|
||||
|
@ -49,6 +49,11 @@ namespace dxvk {
|
||||
|
||||
DxvkBufferSlice GetPredicate(DxvkContext* ctx);
|
||||
|
||||
bool IsScoped() const {
|
||||
return m_desc.Query != D3D11_QUERY_EVENT
|
||||
&& m_desc.Query != D3D11_QUERY_TIMESTAMP;
|
||||
}
|
||||
|
||||
bool IsEvent() const {
|
||||
return m_desc.Query == D3D11_QUERY_EVENT;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user