[Impeller] Flip the viewport on vulkan (flutter/engine#36421)

This commit is contained in:
Kaushik Iska 2022-09-26 16:57:57 -04:00 committed by GitHub
parent 0f46ddf8ba
commit a91ebca07c
2 changed files with 3 additions and 2 deletions

View File

@ -272,7 +272,7 @@ ContextVK::ContextVK(
vk::ApplicationInfo application_info;
application_info.setApplicationVersion(VK_API_VERSION_1_0);
application_info.setApiVersion(VK_API_VERSION_1_0);
application_info.setApiVersion(VK_API_VERSION_1_1);
application_info.setEngineVersion(VK_API_VERSION_1_0);
application_info.setPEngineName("Impeller");
application_info.setPApplicationName("Impeller");

View File

@ -342,7 +342,8 @@ void RenderPassVK::SetViewportAndScissor(const Command& command) const {
{.rect = Rect::MakeSize(GetRenderTargetSize())});
vk::Viewport viewport = vk::Viewport()
.setWidth(vp.rect.size.width)
.setHeight(vp.rect.size.height)
.setHeight(-vp.rect.size.height)
.setY(vp.rect.size.height)
.setMinDepth(0.0f)
.setMaxDepth(1.0f);
command_buffer_->setViewport(0, 1, &viewport);