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

[d3d11] Use private temporary references for queries

Like the previous commit, just with queries.
This commit is contained in:
Philip Rebohle 2019-07-17 20:08:14 +02:00
parent 7225674088
commit c4b56b9d8d
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -250,10 +250,11 @@ namespace dxvk {
if (!pAsync) if (!pAsync)
return; return;
Com<D3D11Query> queryPtr = static_cast<D3D11Query*>(pAsync); Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
EmitCs([queryPtr] (DxvkContext* ctx) { EmitCs([cQuery = std::move(query)]
queryPtr->Begin(ctx); (DxvkContext* ctx) {
cQuery->Begin(ctx);
}); });
} }
@ -264,10 +265,11 @@ namespace dxvk {
if (!pAsync) if (!pAsync)
return; return;
Com<D3D11Query> queryPtr = static_cast<D3D11Query*>(pAsync); Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
EmitCs([queryPtr] (DxvkContext* ctx) { EmitCs([cQuery = std::move(query)]
queryPtr->End(ctx); (DxvkContext* ctx) {
cQuery->End(ctx);
}); });
} }
@ -291,7 +293,7 @@ namespace dxvk {
// return; // return;
// EmitCs([ // EmitCs([
// cPredicate = Com<D3D11Query>(predicate), // cPredicate = Com<D3D11Query, false>(predicate),
// cValue = PredicateValue // cValue = PredicateValue
// ] (DxvkContext* ctx) { // ] (DxvkContext* ctx) {
// DxvkBufferSlice predSlice; // DxvkBufferSlice predSlice;