18 _size = deviceMemory._size;
19 deviceMemory._deviceMemory = VK_NULL_HANDLE;
20 deviceMemory._device =
nullptr;
21 deviceMemory._size = 0;
29 _size = deviceMemory._size;
30 deviceMemory._deviceMemory = VK_NULL_HANDLE;
31 deviceMemory._device =
nullptr;
32 deviceMemory._size = 0;
51 VkResult result = vkMapMemory(static_cast<VkDevice>(*
_device),
_deviceMemory, offset, size, 0, &data);
53 if (result != VK_SUCCESS) {
54 LUG_LOG.error(
"DeviceMemory: Can't map memory: {}", result);
63 LUG_LOG.error(
"DeviceMemory: Can't map memory of a buffer: The buffer uses a different device memory");
69 VkResult result = vkMapMemory(
70 static_cast<VkDevice>(*
_device),
78 if (result != VK_SUCCESS) {
79 LUG_LOG.error(
"DeviceMemory: Can't map memory of a buffer: {}", result);
88 LUG_LOG.error(
"DeviceMemory: Can't map memory of a image: The image uses a different device memory");
94 VkResult result = vkMapMemory(
95 static_cast<VkDevice>(*
_device),
103 if (result != VK_SUCCESS) {
104 LUG_LOG.error(
"DeviceMemory: Can't map memory of an image: {}", result);
VkDeviceSize getDeviceMemoryOffset() const
VkDeviceSize getDeviceMemoryOffset() const
const VkMemoryRequirements & getRequirements() const
VkDeviceMemory _deviceMemory
const VkMemoryRequirements & getRequirements() const
void * mapBuffer(const API::Buffer &buffer, VkDeviceSize size=VK_WHOLE_SIZE, VkDeviceSize offset=0) const
DeviceMemory & operator=(const DeviceMemory &)=delete
void * mapImage(const API::Image &image, VkDeviceSize size=VK_WHOLE_SIZE, VkDeviceSize offset=0) const
const DeviceMemory * getDeviceMemory() const
void * map(VkDeviceSize size=VK_WHOLE_SIZE, VkDeviceSize offset=0) const
const DeviceMemory * getDeviceMemory() const