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

[dxvk] Add helper to get size of memory/image in bytes

This commit is contained in:
Joshua Ashton 2019-07-18 18:05:01 +01:00 committed by Philip Rebohle
parent 3063d7fc7c
commit 7c8d03b3e1
2 changed files with 18 additions and 0 deletions

View File

@ -264,6 +264,15 @@ namespace dxvk {
return result;
}
/**
* \brief Memory size
*
* \returns The memory size of the image
*/
VkDeviceSize memSize() const {
return m_memory.length();
}
private:
Rc<vk::DeviceFn> m_vkd;

View File

@ -122,6 +122,15 @@ namespace dxvk {
return reinterpret_cast<char*>(m_mapPtr) + offset;
}
/**
* \brief Returns length of memory allocated
*
* \returns Memory size
*/
VkDeviceSize length() const {
return m_length;
}
/**
* \brief Checks whether the memory slice is defined
*