Lines Matching refs:dispatch
157 VulkanDispatch* dispatch = stateBlock->deviceDispatch; in saveImageContent() local
166 _RUN_AND_CHECK(dispatch->vkAllocateCommandBuffers(stateBlock->device, &allocInfo, in saveImageContent()
172 _RUN_AND_CHECK(dispatch->vkCreateFence(stateBlock->device, &fenceCreateInfo, nullptr, &fence)); in saveImageContent()
183 dispatch->vkCreateBuffer(stateBlock->device, &bufferCreateInfo, nullptr, &readbackBuffer)); in saveImageContent()
186 dispatch->vkGetBufferMemoryRequirements(stateBlock->device, readbackBuffer, in saveImageContent()
200 _RUN_AND_CHECK(dispatch->vkAllocateMemory(stateBlock->device, &readbackBufferMemoryAllocateInfo, in saveImageContent()
203 dispatch->vkBindBufferMemory(stateBlock->device, readbackBuffer, readbackMemory, 0)); in saveImageContent()
206 _RUN_AND_CHECK(dispatch->vkMapMemory(stateBlock->device, readbackMemory, 0, VK_WHOLE_SIZE, in saveImageContent()
217 if (dispatch->vkBeginCommandBuffer(commandBuffer, &beginInfo) != VK_SUCCESS) { in saveImageContent()
245 dispatch->vkCmdPipelineBarrier(commandBuffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, in saveImageContent()
264 dispatch->vkCmdCopyImageToBuffer(commandBuffer, image, in saveImageContent()
274 dispatch->vkCmdPipelineBarrier(commandBuffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, in saveImageContent()
278 _RUN_AND_CHECK(dispatch->vkEndCommandBuffer(commandBuffer)); in saveImageContent()
286 _RUN_AND_CHECK(dispatch->vkQueueSubmit(stateBlock->queue, 1, &submitInfo, fence)); in saveImageContent()
288 dispatch->vkWaitForFences(stateBlock->device, 1, &fence, VK_TRUE, 3000000000L)); in saveImageContent()
289 _RUN_AND_CHECK(dispatch->vkResetFences(stateBlock->device, 1, &fence)); in saveImageContent()
296 dispatch->vkDestroyFence(stateBlock->device, fence, nullptr); in saveImageContent()
297 dispatch->vkUnmapMemory(stateBlock->device, readbackMemory); in saveImageContent()
298 dispatch->vkDestroyBuffer(stateBlock->device, readbackBuffer, nullptr); in saveImageContent()
299 dispatch->vkFreeMemory(stateBlock->device, readbackMemory, nullptr); in saveImageContent()
300 dispatch->vkFreeCommandBuffers(stateBlock->device, stateBlock->commandPool, 1, &commandBuffer); in saveImageContent()
308 VulkanDispatch* dispatch = stateBlock->deviceDispatch; in loadImageContent() local
317 _RUN_AND_CHECK(dispatch->vkAllocateCommandBuffers(stateBlock->device, &allocInfo, in loadImageContent()
323 _RUN_AND_CHECK(dispatch->vkCreateFence(stateBlock->device, &fenceCreateInfo, nullptr, &fence)); in loadImageContent()
349 _RUN_AND_CHECK(dispatch->vkBeginCommandBuffer(commandBuffer, &beginInfo) != VK_SUCCESS); in loadImageContent()
351 dispatch->vkCmdPipelineBarrier(commandBuffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, in loadImageContent()
355 _RUN_AND_CHECK(dispatch->vkEndCommandBuffer(commandBuffer)); in loadImageContent()
363 _RUN_AND_CHECK(dispatch->vkQueueSubmit(stateBlock->queue, 1, &submitInfo, fence)); in loadImageContent()
365 dispatch->vkWaitForFences(stateBlock->device, 1, &fence, VK_TRUE, 3000000000L)); in loadImageContent()
366 dispatch->vkDestroyFence(stateBlock->device, fence, nullptr); in loadImageContent()
367 dispatch->vkFreeCommandBuffers(stateBlock->device, stateBlock->commandPool, 1, in loadImageContent()
381 dispatch->vkCreateBuffer(stateBlock->device, &bufferCreateInfo, nullptr, &stagingBuffer)); in loadImageContent()
384 dispatch->vkGetBufferMemoryRequirements(stateBlock->device, stagingBuffer, in loadImageContent()
399 _RUN_AND_CHECK(dispatch->vkAllocateMemory(stateBlock->device, &stagingBufferMemoryAllocateInfo, in loadImageContent()
402 dispatch->vkBindBufferMemory(stateBlock->device, stagingBuffer, stagingMemory, 0)); in loadImageContent()
405 _RUN_AND_CHECK(dispatch->vkMapMemory(stateBlock->device, stagingMemory, 0, VK_WHOLE_SIZE, in loadImageContent()
416 if (dispatch->vkBeginCommandBuffer(commandBuffer, &beginInfo) != VK_SUCCESS) { in loadImageContent()
445 dispatch->vkCmdPipelineBarrier(commandBuffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, in loadImageContent()
465 dispatch->vkCmdCopyBufferToImage(commandBuffer, stagingBuffer, image, in loadImageContent()
474 dispatch->vkCmdPipelineBarrier(commandBuffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, in loadImageContent()
478 _RUN_AND_CHECK(dispatch->vkEndCommandBuffer(commandBuffer)); in loadImageContent()
486 _RUN_AND_CHECK(dispatch->vkQueueSubmit(stateBlock->queue, 1, &submitInfo, fence)); in loadImageContent()
488 dispatch->vkWaitForFences(stateBlock->device, 1, &fence, VK_TRUE, 3000000000L)); in loadImageContent()
489 _RUN_AND_CHECK(dispatch->vkResetFences(stateBlock->device, 1, &fence)); in loadImageContent()
492 dispatch->vkDestroyFence(stateBlock->device, fence, nullptr); in loadImageContent()
493 dispatch->vkUnmapMemory(stateBlock->device, stagingMemory); in loadImageContent()
494 dispatch->vkDestroyBuffer(stateBlock->device, stagingBuffer, nullptr); in loadImageContent()
495 dispatch->vkFreeMemory(stateBlock->device, stagingMemory, nullptr); in loadImageContent()
496 dispatch->vkFreeCommandBuffers(stateBlock->device, stateBlock->commandPool, 1, &commandBuffer); in loadImageContent()
506 VulkanDispatch* dispatch = stateBlock->deviceDispatch; in saveBufferContent() local
514 _RUN_AND_CHECK(dispatch->vkAllocateCommandBuffers(stateBlock->device, &allocInfo, in saveBufferContent()
520 _RUN_AND_CHECK(dispatch->vkCreateFence(stateBlock->device, &fenceCreateInfo, nullptr, &fence)); in saveBufferContent()
529 dispatch->vkCreateBuffer(stateBlock->device, &bufferCreateInfo, nullptr, &readbackBuffer)); in saveBufferContent()
532 dispatch->vkGetBufferMemoryRequirements(stateBlock->device, readbackBuffer, in saveBufferContent()
546 _RUN_AND_CHECK(dispatch->vkAllocateMemory(stateBlock->device, &readbackBufferMemoryAllocateInfo, in saveBufferContent()
549 dispatch->vkBindBufferMemory(stateBlock->device, readbackBuffer, readbackMemory, 0)); in saveBufferContent()
552 _RUN_AND_CHECK(dispatch->vkMapMemory(stateBlock->device, readbackMemory, 0, VK_WHOLE_SIZE, in saveBufferContent()
564 if (dispatch->vkBeginCommandBuffer(commandBuffer, &beginInfo) != VK_SUCCESS) { in saveBufferContent()
568 dispatch->vkCmdCopyBuffer(commandBuffer, buffer, readbackBuffer, 1, &bufferCopy); in saveBufferContent()
578 dispatch->vkCmdPipelineBarrier(commandBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, in saveBufferContent()
588 _RUN_AND_CHECK(dispatch->vkEndCommandBuffer(commandBuffer)); in saveBufferContent()
589 _RUN_AND_CHECK(dispatch->vkQueueSubmit(stateBlock->queue, 1, &submitInfo, fence)); in saveBufferContent()
590 _RUN_AND_CHECK(dispatch->vkWaitForFences(stateBlock->device, 1, &fence, VK_TRUE, 3000000000L)); in saveBufferContent()
591 _RUN_AND_CHECK(dispatch->vkResetFences(stateBlock->device, 1, &fence)); in saveBufferContent()
595 dispatch->vkDestroyFence(stateBlock->device, fence, nullptr); in saveBufferContent()
596 dispatch->vkUnmapMemory(stateBlock->device, readbackMemory); in saveBufferContent()
597 dispatch->vkDestroyBuffer(stateBlock->device, readbackBuffer, nullptr); in saveBufferContent()
598 dispatch->vkFreeMemory(stateBlock->device, readbackMemory, nullptr); in saveBufferContent()
599 dispatch->vkFreeCommandBuffers(stateBlock->device, stateBlock->commandPool, 1, &commandBuffer); in saveBufferContent()
609 VulkanDispatch* dispatch = stateBlock->deviceDispatch; in loadBufferContent() local
617 _RUN_AND_CHECK(dispatch->vkAllocateCommandBuffers(stateBlock->device, &allocInfo, in loadBufferContent()
623 _RUN_AND_CHECK(dispatch->vkCreateFence(stateBlock->device, &fenceCreateInfo, nullptr, &fence)); in loadBufferContent()
632 dispatch->vkCreateBuffer(stateBlock->device, &bufferCreateInfo, nullptr, &stagingBuffer)); in loadBufferContent()
635 dispatch->vkGetBufferMemoryRequirements(stateBlock->device, stagingBuffer, in loadBufferContent()
649 _RUN_AND_CHECK(dispatch->vkAllocateMemory(stateBlock->device, &stagingBufferMemoryAllocateInfo, in loadBufferContent()
652 dispatch->vkBindBufferMemory(stateBlock->device, stagingBuffer, stagingMemory, 0)); in loadBufferContent()
655 _RUN_AND_CHECK(dispatch->vkMapMemory(stateBlock->device, stagingMemory, 0, VK_WHOLE_SIZE, in loadBufferContent()
673 if (dispatch->vkBeginCommandBuffer(commandBuffer, &beginInfo) != VK_SUCCESS) { in loadBufferContent()
677 dispatch->vkCmdCopyBuffer(commandBuffer, stagingBuffer, buffer, 1, &bufferCopy); in loadBufferContent()
687 dispatch->vkCmdPipelineBarrier(commandBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, in loadBufferContent()
697 _RUN_AND_CHECK(dispatch->vkEndCommandBuffer(commandBuffer)); in loadBufferContent()
698 _RUN_AND_CHECK(dispatch->vkQueueSubmit(stateBlock->queue, 1, &submitInfo, fence)); in loadBufferContent()
699 _RUN_AND_CHECK(dispatch->vkWaitForFences(stateBlock->device, 1, &fence, VK_TRUE, 3000000000L)); in loadBufferContent()
700 _RUN_AND_CHECK(dispatch->vkResetFences(stateBlock->device, 1, &fence)); in loadBufferContent()
702 dispatch->vkDestroyFence(stateBlock->device, fence, nullptr); in loadBufferContent()
703 dispatch->vkUnmapMemory(stateBlock->device, stagingMemory); in loadBufferContent()
704 dispatch->vkDestroyBuffer(stateBlock->device, stagingBuffer, nullptr); in loadBufferContent()
705 dispatch->vkFreeMemory(stateBlock->device, stagingMemory, nullptr); in loadBufferContent()
706 dispatch->vkFreeCommandBuffers(stateBlock->device, stateBlock->commandPool, 1, &commandBuffer); in loadBufferContent()