1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 23:52:10 +01:00

[d3d11] Add methods to discard direct-mapped images

This commit is contained in:
Philip Rebohle 2024-10-31 21:03:07 +01:00 committed by Philip Rebohle
parent 64e32d4ee1
commit 30f2a8c26b

View File

@ -303,6 +303,26 @@ namespace dxvk {
}
}
/**
* \brief Allocates new backing storage
* \returns New backing storage for the image
*/
Rc<DxvkResourceAllocation> AllocStorage() {
return m_image->allocateStorage();
}
/**
* \brief Discards backing storage
*
* Also updates the mapped pointer if the image is mapped.
* \returns New backing storage for the image
*/
Rc<DxvkResourceAllocation> DiscardStorage() {
auto storage = m_image->allocateStorage();
m_mapPtr = storage->mapPtr();
return storage;
}
/**
* \brief Queries map pointer of the raw image
*