diff --git a/src/dxvk/dxvk_image.h b/src/dxvk/dxvk_image.h index ac7cf8109..543c311ae 100644 --- a/src/dxvk/dxvk_image.h +++ b/src/dxvk/dxvk_image.h @@ -263,6 +263,15 @@ namespace dxvk { result |= m_viewFormats[i] == format; return result; } + + /** + * \brief Memory size + * + * \returns The memory size of the image + */ + VkDeviceSize memSize() const { + return m_memory.length(); + } private: diff --git a/src/dxvk/dxvk_memory.h b/src/dxvk/dxvk_memory.h index 7a905fa8c..bb2a8aacd 100644 --- a/src/dxvk/dxvk_memory.h +++ b/src/dxvk/dxvk_memory.h @@ -122,6 +122,15 @@ namespace dxvk { return reinterpret_cast(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 *