[d3d11] Submit stalling event queries before flushing

Otherwise, instead of preventing syncs, this would actually
have the opposite effect.
This commit is contained in:
Philip Rebohle 2019-11-14 22:57:30 +01:00
parent 3457e312b0
commit a6483e02fe
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 8 additions and 8 deletions

View File

@ -104,12 +104,12 @@ namespace dxvk {
if (unlikely(!pAsync))
return;
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
auto query = static_cast<D3D11Query*>(pAsync);
if (unlikely(!query->DoBegin()))
return;
EmitCs([cQuery = std::move(query)]
EmitCs([cQuery = Com<D3D11Query, false>(query)]
(DxvkContext* ctx) {
cQuery->Begin(ctx);
});
@ -122,22 +122,22 @@ namespace dxvk {
if (unlikely(!pAsync))
return;
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
auto query = static_cast<D3D11Query*>(pAsync);
if (unlikely(!query->DoEnd()))
return;
EmitCs([cQuery = Com<D3D11Query, false>(query)]
(DxvkContext* ctx) {
cQuery->End(ctx);
});
if (unlikely(query->IsEvent())) {
query->NotifyEnd();
query->IsStalling()
? Flush()
: FlushImplicit(TRUE);
}
EmitCs([cQuery = std::move(query)]
(DxvkContext* ctx) {
cQuery->End(ctx);
});
}