Changeset 2f4ff8c in opengl-game for vulkan-utils.hpp
- Timestamp:
- Jun 20, 2021, 7:05:14 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- b01b50c
- Parents:
- 90880fb
- git-author:
- Dmitry Portnoy <dportnoy@…> (06/18/21 16:39:49)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (06/20/21 19:05:14)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-utils.hpp
r90880fb r2f4ff8c 169 169 memoryRange.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; 170 170 memoryRange.memory = bufferMemory; 171 memoryRange.size = size; 171 memoryRange.size = VK_WHOLE_SIZE; // memoryRange.size = size; 172 173 // TODO: Think about the best approach here, and when creating a Vulka buffer. 174 // The issue arises when calling vkMapMemory, because the size passed to it needs to be 175 // VK_WHOLE_SIZE or a multiple of some Vulkan constant. When I create a buffer and matching memory, 176 // the memory size (I believe) needs to be a multiple of the same or a similar constant, while 177 // the buffer can bind to only a part of the memory and I don't think has a size restriction. 178 // As long as I save the actual zize of the allocated memory, I can use that for things 179 // like vkMapMemory, but still continue to use the buffer's size for most operations 172 180 173 181 vkFlushMappedMemoryRanges(device, 1, &memoryRange);
Note:
See TracChangeset
for help on using the changeset viewer.