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:
parent
64e32d4ee1
commit
30f2a8c26b
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user