1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 01:24:11 +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)
return;
Com<D3D11Query> queryPtr = static_cast<D3D11Query*>(pAsync);
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
EmitCs([queryPtr] (DxvkContext* ctx) {
queryPtr->Begin(ctx);
EmitCs([cQuery = std::move(query)]
(DxvkContext* ctx) {
cQuery->Begin(ctx);
});
}
@ -264,10 +265,11 @@ namespace dxvk {
if (!pAsync)
return;
Com<D3D11Query> queryPtr = static_cast<D3D11Query*>(pAsync);
EmitCs([queryPtr] (DxvkContext* ctx) {
queryPtr->End(ctx);
Com<D3D11Query, false> query(static_cast<D3D11Query*>(pAsync));
EmitCs([cQuery = std::move(query)]
(DxvkContext* ctx) {
cQuery->End(ctx);
});
}
@ -291,7 +293,7 @@ namespace dxvk {
// return;
// EmitCs([
// cPredicate = Com<D3D11Query>(predicate),
// cPredicate = Com<D3D11Query, false>(predicate),
// cValue = PredicateValue
// ] (DxvkContext* ctx) {
// DxvkBufferSlice predSlice;