• Home
  • Raw
  • Download

Lines Matching refs:anbInfo

364 void teardownAndroidNativeBufferImage(VulkanDispatch* vk, AndroidNativeBufferInfo* anbInfo) {  in teardownAndroidNativeBufferImage()  argument
365 auto device = anbInfo->device; in teardownAndroidNativeBufferImage()
367 auto image = anbInfo->image; in teardownAndroidNativeBufferImage()
368 auto imageMemory = anbInfo->imageMemory; in teardownAndroidNativeBufferImage()
370 auto stagingBuffer = anbInfo->stagingBuffer; in teardownAndroidNativeBufferImage()
371 auto mappedPtr = anbInfo->mappedStagingPtr; in teardownAndroidNativeBufferImage()
372 auto stagingMemory = anbInfo->stagingMemory; in teardownAndroidNativeBufferImage()
380 for (auto queueState : anbInfo->queueStates) { in teardownAndroidNativeBufferImage()
384 anbInfo->queueStates.clear(); in teardownAndroidNativeBufferImage()
386 anbInfo->acquireQueueState.teardown(vk, device); in teardownAndroidNativeBufferImage()
388 anbInfo->vk = nullptr; in teardownAndroidNativeBufferImage()
389 anbInfo->device = VK_NULL_HANDLE; in teardownAndroidNativeBufferImage()
390 anbInfo->image = VK_NULL_HANDLE; in teardownAndroidNativeBufferImage()
391 anbInfo->imageMemory = VK_NULL_HANDLE; in teardownAndroidNativeBufferImage()
392 anbInfo->stagingBuffer = VK_NULL_HANDLE; in teardownAndroidNativeBufferImage()
393 anbInfo->mappedStagingPtr = nullptr; in teardownAndroidNativeBufferImage()
394 anbInfo->stagingMemory = VK_NULL_HANDLE; in teardownAndroidNativeBufferImage()
396 anbInfo->qsriWaitFencePool = nullptr; in teardownAndroidNativeBufferImage()
504 VkFence fence, AndroidNativeBufferInfo* anbInfo) { in setAndroidNativeImageSemaphoreSignaled() argument
508 bool firstTimeSetup = !anbInfo->everSynced && !anbInfo->everAcquired; in setAndroidNativeImageSemaphoreSignaled()
510 anbInfo->everAcquired = true; in setAndroidNativeImageSemaphoreSignaled()
528 auto queueFamilyIndex = anbInfo->lastUsedQueueFamilyIndex; in setAndroidNativeImageSemaphoreSignaled()
529 if (queueFamilyIndex >= anbInfo->queueStates.size()) { in setAndroidNativeImageSemaphoreSignaled()
530 anbInfo->queueStates.resize(queueFamilyIndex + 1); in setAndroidNativeImageSemaphoreSignaled()
533 anbInfo->queueStates[queueFamilyIndex]; in setAndroidNativeImageSemaphoreSignaled()
535 queueState.setup(vk, anbInfo->device, defaultQueue, queueFamilyIndex, defaultQueueLock); in setAndroidNativeImageSemaphoreSignaled()
540 if (anbInfo->useVulkanNativeImage) { in setAndroidNativeImageSemaphoreSignaled()
552 anbInfo->colorBufferHandle); in setAndroidNativeImageSemaphoreSignaled()
561 .dstQueueFamilyIndex = anbInfo->lastUsedQueueFamilyIndex, in setAndroidNativeImageSemaphoreSignaled()
562 .image = anbInfo->image, in setAndroidNativeImageSemaphoreSignaled()
597 anbInfo->queueStates[anbInfo->lastUsedQueueFamilyIndex]; in setAndroidNativeImageSemaphoreSignaled()
622 std::shared_ptr<AndroidNativeBufferInfo> anbInfo) { in syncImageToColorBuffer() argument
623 auto anbInfoPtr = anbInfo.get(); in syncImageToColorBuffer()
630 anbInfo->everSynced = true; in syncImageToColorBuffer()
631 anbInfo->lastUsedQueueFamilyIndex = queueFamilyIndex; in syncImageToColorBuffer()
634 if (queueFamilyIndex >= anbInfo->queueStates.size()) { in syncImageToColorBuffer()
635 anbInfo->queueStates.resize(queueFamilyIndex + 1); in syncImageToColorBuffer()
638 auto& queueState = anbInfo->queueStates[queueFamilyIndex]; in syncImageToColorBuffer()
641 queueState.setup(vk, anbInfo->device, queue, queueFamilyIndex, queueLock); in syncImageToColorBuffer()
658 anbInfo->colorBufferHandle); in syncImageToColorBuffer()
662 if (anbInfo->useVulkanNativeImage) { in syncImageToColorBuffer()
671 .image = anbInfo->image, in syncImageToColorBuffer()
702 anbInfo->image, in syncImageToColorBuffer()
718 anbInfo->extent.width, in syncImageToColorBuffer()
719 anbInfo->extent.height, in syncImageToColorBuffer()
727 anbInfo->extent, in syncImageToColorBuffer()
730 vk->vkCmdCopyImageToBuffer(queueState.cb, anbInfo->image, in syncImageToColorBuffer()
731 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, anbInfo->stagingBuffer, 1, in syncImageToColorBuffer()
744 anbInfo->image, in syncImageToColorBuffer()
779 VkFence qsriFence = anbInfo->qsriWaitFencePool->getFenceFromPool(); in syncImageToColorBuffer()
782 auto waitForQsriFenceTask = [anbInfoPtr, anbInfo, vk, device = anbInfo->device, qsriFence] { in syncImageToColorBuffer()
798 anbInfo->qsriWaitFencePool->returnFence(qsriFence); in syncImageToColorBuffer()
802 if (anbInfo->useVulkanNativeImage) { in syncImageToColorBuffer()
807 [waitForQsriFenceTask = std::move(waitForQsriFenceTask), anbInfo]() mutable { in syncImageToColorBuffer()
809 anbInfo->qsriTimeline->signalNextPresentAndPoll(); in syncImageToColorBuffer()
817 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, 0, anbInfo->stagingMemory, 0, VK_WHOLE_SIZE, in syncImageToColorBuffer()
820 vk->vkInvalidateMappedMemoryRanges(anbInfo->device, 1, &toInvalidate); in syncImageToColorBuffer()
822 uint32_t colorBufferHandle = anbInfo->colorBufferHandle; in syncImageToColorBuffer()
826 switch (anbInfo->vkFormat) { in syncImageToColorBuffer()
841 colorBufferHandle, anbInfo->mappedStagingPtr, in syncImageToColorBuffer()
842 bpp * anbInfo->extent.width * anbInfo->extent.height); in syncImageToColorBuffer()
843 anbInfo->qsriTimeline->signalNextPresentAndPoll(); in syncImageToColorBuffer()