Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: tools/vulkan/VulkanTestContext.cpp

Issue 1906623002: Update min Vulkan version to 1.0.8.0, and fix various bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/vulkan/VulkanTestContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/vulkan/VulkanTestContext.cpp
diff --git a/tools/vulkan/VulkanTestContext.cpp b/tools/vulkan/VulkanTestContext.cpp
index b940656357bb5c53dbc66218ae8f4b8ea6c88e28..03b740796c79e2042a9e031ab864bfee15146bb8 100644
--- a/tools/vulkan/VulkanTestContext.cpp
+++ b/tools/vulkan/VulkanTestContext.cpp
@@ -240,14 +240,14 @@ bool VulkanTestContext::createSwapchain(uint32_t width, uint32_t height)
nullptr));
}
- GrVkFormatToPixelConfig(swapchainCreateInfo.imageFormat, &fPixelConfig);
-
- this->createBuffers();
+ this->createBuffers(swapchainCreateInfo.imageFormat);
return true;
}
-void VulkanTestContext::createBuffers() {
+void VulkanTestContext::createBuffers(VkFormat format) {
+ GrVkFormatToPixelConfig(format, &fPixelConfig);
+
GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, GetSwapchainImagesKHR(fBackendContext->fDevice,
fSwapchain,
&fImageCount,
@@ -271,6 +271,7 @@ void VulkanTestContext::createBuffers() {
info.fAlloc = nullptr;
info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
info.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
+ info.fFormat = format;
desc.fWidth = fWidth;
desc.fHeight = fHeight;
desc.fConfig = fPixelConfig;
@@ -511,13 +512,14 @@ SkSurface* VulkanTestContext::getBackbufferSurface() {
GR_VK_CALL_ERRCHECK(fBackendContext->fInterface,
EndCommandBuffer(backbuffer->fTransitionCmdBuffers[0]));
+ VkPipelineStageFlags waitDstStageFlags = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
// insert the layout transfer into the queue and wait on the acquire
VkSubmitInfo submitInfo;
memset(&submitInfo, 0, sizeof(VkSubmitInfo));
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submitInfo.waitSemaphoreCount = 1;
submitInfo.pWaitSemaphores = &backbuffer->fAcquireSemaphore;
- submitInfo.pWaitDstStageMask = 0;
+ submitInfo.pWaitDstStageMask = &waitDstStageFlags;
submitInfo.commandBufferCount = 1;
submitInfo.pCommandBuffers = &backbuffer->fTransitionCmdBuffers[0];
submitInfo.signalSemaphoreCount = 0;
« no previous file with comments | « tools/vulkan/VulkanTestContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698