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:
parent
3063d7fc7c
commit
7c8d03b3e1
@ -263,6 +263,15 @@ namespace dxvk {
|
|||||||
result |= m_viewFormats[i] == format;
|
result |= m_viewFormats[i] == format;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Memory size
|
||||||
|
*
|
||||||
|
* \returns The memory size of the image
|
||||||
|
*/
|
||||||
|
VkDeviceSize memSize() const {
|
||||||
|
return m_memory.length();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -122,6 +122,15 @@ namespace dxvk {
|
|||||||
return reinterpret_cast<char*>(m_mapPtr) + offset;
|
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
|
* \brief Checks whether the memory slice is defined
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user