Code cleanup
This commit is contained in:
parent
4b9f10d644
commit
53846d8b1d
23 changed files with 54 additions and 104 deletions
|
|
@ -410,7 +410,7 @@ public:
|
|||
storageBufferSize);
|
||||
|
||||
// Copy from staging buffer
|
||||
VkCommandBuffer copyCmd = VulkanExampleBase::createCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY, true);
|
||||
VkCommandBuffer copyCmd = vulkanDevice->createCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY, true);
|
||||
VkBufferCopy copyRegion = {};
|
||||
copyRegion.size = storageBufferSize;
|
||||
vkCmdCopyBuffer(copyCmd, stagingBuffer.buffer, compute.storageBuffers.input.buffer, 1, ©Region);
|
||||
|
|
@ -419,7 +419,7 @@ public:
|
|||
// so that when the compute command buffer executes for the first time
|
||||
// it doesn't complain about a lack of a corresponding "release" to its "acquire"
|
||||
addGraphicsToComputeBarriers(copyCmd);
|
||||
VulkanExampleBase::flushCommandBuffer(copyCmd, queue, true);
|
||||
vulkanDevice->flushCommandBuffer(copyCmd, queue, true);
|
||||
|
||||
stagingBuffer.destroy();
|
||||
|
||||
|
|
@ -450,11 +450,11 @@ public:
|
|||
indexBufferSize);
|
||||
|
||||
// Copy from staging buffer
|
||||
copyCmd = VulkanExampleBase::createCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY, true);
|
||||
copyCmd = vulkanDevice->createCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY, true);
|
||||
copyRegion = {};
|
||||
copyRegion.size = indexBufferSize;
|
||||
vkCmdCopyBuffer(copyCmd, stagingBuffer.buffer, graphics.indices.buffer, 1, ©Region);
|
||||
VulkanExampleBase::flushCommandBuffer(copyCmd, queue, true);
|
||||
vulkanDevice->flushCommandBuffer(copyCmd, queue, true);
|
||||
|
||||
stagingBuffer.destroy();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue