| Index: tools/vulkan/VulkanTestContext.cpp
|
| diff --git a/tools/vulkan/VulkanTestContext.cpp b/tools/vulkan/VulkanTestContext.cpp
|
| index b940656357bb5c53dbc66218ae8f4b8ea6c88e28..8273e4cd8799cfa7c8f0de8acdf69b6250eacbf7 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;
|
|
|