Lines Matching refs:fBackendContext
43 fBackendContext.reset(GrVkBackendContext::Create(&fPresentQueueIndex, canPresent)); in VulkanWindowContext()
45 if (!(fBackendContext->fExtensions & kKHR_surface_GrVkExtensionFlag) || in VulkanWindowContext()
46 !(fBackendContext->fExtensions & kKHR_swapchain_GrVkExtensionFlag)) { in VulkanWindowContext()
47 fBackendContext.reset(nullptr); in VulkanWindowContext()
51 VkInstance instance = fBackendContext->fInstance; in VulkanWindowContext()
52 VkDevice device = fBackendContext->fDevice; in VulkanWindowContext()
64 fContext = GrContext::Create(kVulkan_GrBackend, (GrBackendContext) fBackendContext.get(), in VulkanWindowContext()
69 fBackendContext.reset(nullptr); in VulkanWindowContext()
74 VkResult res = fGetPhysicalDeviceSurfaceSupportKHR(fBackendContext->fPhysicalDevice, in VulkanWindowContext()
88 vkGetDeviceQueue(fBackendContext->fDevice, fPresentQueueIndex, 0, &fPresentQueue); in VulkanWindowContext()
95 VkResult res = fGetPhysicalDeviceSurfaceCapabilitiesKHR(fBackendContext->fPhysicalDevice, in createSwapchain()
102 res = fGetPhysicalDeviceSurfaceFormatsKHR(fBackendContext->fPhysicalDevice, fSurface, in createSwapchain()
110 res = fGetPhysicalDeviceSurfaceFormatsKHR(fBackendContext->fPhysicalDevice, fSurface, in createSwapchain()
117 res = fGetPhysicalDeviceSurfacePresentModesKHR(fBackendContext->fPhysicalDevice, fSurface, in createSwapchain()
125 res = fGetPhysicalDeviceSurfacePresentModesKHR(fBackendContext->fPhysicalDevice, fSurface, in createSwapchain()
216 uint32_t queueFamilies[] = { fBackendContext->fGraphicsQueueIndex, fPresentQueueIndex }; in createSwapchain()
217 if (fBackendContext->fGraphicsQueueIndex != fPresentQueueIndex) { in createSwapchain()
233 res = fCreateSwapchainKHR(fBackendContext->fDevice, &swapchainCreateInfo, nullptr, &fSwapchain); in createSwapchain()
240 GR_VK_CALL(fBackendContext->fInterface, DeviceWaitIdle(fBackendContext->fDevice)); in createSwapchain()
244 fDestroySwapchainKHR(fBackendContext->fDevice, swapchainCreateInfo.oldSwapchain, nullptr); in createSwapchain()
255 fGetSwapchainImagesKHR(fBackendContext->fDevice, fSwapchain, &fImageCount, nullptr); in createBuffers()
258 fGetSwapchainImagesKHR(fBackendContext->fDevice, fSwapchain, &fImageCount, fImages); in createBuffers()
293 commandPoolInfo.queueFamilyIndex = fBackendContext->fGraphicsQueueIndex; in createBuffers()
295 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in createBuffers()
296 CreateCommandPool(fBackendContext->fDevice, &commandPoolInfo, in createBuffers()
324 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in createBuffers()
325 CreateSemaphore(fBackendContext->fDevice, &semaphoreInfo, in createBuffers()
327 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in createBuffers()
328 CreateSemaphore(fBackendContext->fDevice, &semaphoreInfo, in createBuffers()
330 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in createBuffers()
331 AllocateCommandBuffers(fBackendContext->fDevice, &commandBuffersInfo, in createBuffers()
333 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in createBuffers()
334 CreateFence(fBackendContext->fDevice, &fenceInfo, nullptr, in createBuffers()
336 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in createBuffers()
337 CreateFence(fBackendContext->fDevice, &fenceInfo, nullptr, in createBuffers()
347 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in destroyBuffers()
348 WaitForFences(fBackendContext->fDevice, 2, in destroyBuffers()
352 GR_VK_CALL(fBackendContext->fInterface, in destroyBuffers()
353 DestroySemaphore(fBackendContext->fDevice, in destroyBuffers()
356 GR_VK_CALL(fBackendContext->fInterface, in destroyBuffers()
357 DestroySemaphore(fBackendContext->fDevice, in destroyBuffers()
360 GR_VK_CALL(fBackendContext->fInterface, in destroyBuffers()
361 FreeCommandBuffers(fBackendContext->fDevice, fCommandPool, 2, in destroyBuffers()
363 GR_VK_CALL(fBackendContext->fInterface, in destroyBuffers()
364 DestroyFence(fBackendContext->fDevice, fBackbuffers[i].fUsageFences[0], 0)); in destroyBuffers()
365 GR_VK_CALL(fBackendContext->fInterface, in destroyBuffers()
366 DestroyFence(fBackendContext->fDevice, fBackbuffers[i].fUsageFences[1], 0)); in destroyBuffers()
387 if (!fBackendContext.get()) { in destroyContext()
391 GR_VK_CALL(fBackendContext->fInterface, QueueWaitIdle(fPresentQueue)); in destroyContext()
392 GR_VK_CALL(fBackendContext->fInterface, DeviceWaitIdle(fBackendContext->fDevice)); in destroyContext()
397 GR_VK_CALL(fBackendContext->fInterface, DestroyCommandPool(fBackendContext->fDevice, in destroyContext()
403 fDestroySwapchainKHR(fBackendContext->fDevice, fSwapchain, nullptr); in destroyContext()
408 fDestroySurfaceKHR(fBackendContext->fInstance, fSurface, nullptr); in destroyContext()
414 fBackendContext.reset(nullptr); in destroyContext()
426 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in getAvailableBackbuffer()
427 WaitForFences(fBackendContext->fDevice, 2, backbuffer->fUsageFences, in getAvailableBackbuffer()
437 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in getBackbufferSurface()
438 ResetFences(fBackendContext->fDevice, 2, backbuffer->fUsageFences)); in getBackbufferSurface()
442 VkResult res = fAcquireNextImageKHR(fBackendContext->fDevice, fSwapchain, UINT64_MAX, in getBackbufferSurface()
456 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in getBackbufferSurface()
457 ResetFences(fBackendContext->fDevice, 2, backbuffer->fUsageFences)); in getBackbufferSurface()
460 res = fAcquireNextImageKHR(fBackendContext->fDevice, fSwapchain, UINT64_MAX, in getBackbufferSurface()
488 fBackendContext->fGraphicsQueueIndex, // dstQueueFamilyIndex in getBackbufferSurface()
492 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in getBackbufferSurface()
498 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in getBackbufferSurface()
501 GR_VK_CALL(fBackendContext->fInterface, in getBackbufferSurface()
508 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in getBackbufferSurface()
523 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in getBackbufferSurface()
524 QueueSubmit(fBackendContext->fQueue, 1, &submitInfo, in getBackbufferSurface()
559 fBackendContext->fGraphicsQueueIndex, // srcQueueFamilyIndex in swapBuffers()
564 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in swapBuffers()
570 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in swapBuffers()
572 GR_VK_CALL(fBackendContext->fInterface, in swapBuffers()
578 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in swapBuffers()
594 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, in swapBuffers()
595 QueueSubmit(fBackendContext->fQueue, 1, &submitInfo, in swapBuffers()