Changeset 996dd3e in opengl-game for vulkan-utils.hpp
- Timestamp:
- May 14, 2021, 1:09:34 AM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- a3cefaa
- Parents:
- 9d21aac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-utils.hpp
r9d21aac r996dd3e 117 117 template<class DataType> 118 118 void VulkanUtils::copyDataToBuffer(VkDevice device, VkPhysicalDevice physicalDevice, VkCommandPool commandPool, 119 const vector<DataType>& srcData, VkBuffer dstBuffer, size_t dstVertexOffset, VkQueue graphicsQueue) { 119 const vector<DataType>& srcData, VkBuffer dstBuffer, size_t dstVertexOffset, 120 VkQueue graphicsQueue) { 120 121 VkDeviceSize srcDataSize = srcData.size() * sizeof(DataType); 121 122 … … 140 141 template<class DataType> 141 142 void VulkanUtils::copyDataToMemory(VkDevice device, const DataType& srcData, VkDeviceMemory bufferMemory, 142 VkDeviceSize offset) {143 VkDeviceSize offset) { 143 144 copyDataToMemory(device, srcData, bufferMemory, offset, sizeof(DataType)); 144 145 } 145 146 147 // TODO: This would be used when the GPU memory is host-coherent. If it it not, I also need to use vkFlushMappedMemoryRanges 148 // I should create a variant that supports non-coherent memory 146 149 template<class DataType> 147 150 void VulkanUtils::copyDataToMemory(VkDevice device, const DataType& srcData, VkDeviceMemory bufferMemory,
Note:
See TracChangeset
for help on using the changeset viewer.