diff --git a/src/dxvk/dxvk_cmdlist.h b/src/dxvk/dxvk_cmdlist.h index 1eadf5d7..25246865 100644 --- a/src/dxvk/dxvk_cmdlist.h +++ b/src/dxvk/dxvk_cmdlist.h @@ -131,8 +131,8 @@ namespace dxvk { * the device can guarantee that the submission has * completed. */ - void trackResource(const Rc& rc) { - m_resources.trackResource(rc); + void trackResource(Rc rc) { + m_resources.trackResource(std::move(rc)); } /** diff --git a/src/dxvk/dxvk_lifetime.h b/src/dxvk/dxvk_lifetime.h index 4534fe4f..2b141e90 100644 --- a/src/dxvk/dxvk_lifetime.h +++ b/src/dxvk/dxvk_lifetime.h @@ -25,9 +25,9 @@ namespace dxvk { * \brief Adds a resource to track * \param [in] rc The resource to track */ - void trackResource(const Rc& rc) { - m_resources.push_back(rc); + void trackResource(Rc&& rc) { rc->acquire(); + m_resources.emplace_back(std::move(rc)); } /**