Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 349c064

Browse files
authored
[Impeller] Flip the viewport on vulkan (#36421)
1 parent e9ddd8d commit 349c064

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

impeller/renderer/backend/vulkan/context_vk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ ContextVK::ContextVK(
272272

273273
vk::ApplicationInfo application_info;
274274
application_info.setApplicationVersion(VK_API_VERSION_1_0);
275-
application_info.setApiVersion(VK_API_VERSION_1_0);
275+
application_info.setApiVersion(VK_API_VERSION_1_1);
276276
application_info.setEngineVersion(VK_API_VERSION_1_0);
277277
application_info.setPEngineName("Impeller");
278278
application_info.setPApplicationName("Impeller");

impeller/renderer/backend/vulkan/render_pass_vk.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ void RenderPassVK::SetViewportAndScissor(const Command& command) const {
342342
{.rect = Rect::MakeSize(GetRenderTargetSize())});
343343
vk::Viewport viewport = vk::Viewport()
344344
.setWidth(vp.rect.size.width)
345-
.setHeight(vp.rect.size.height)
345+
.setHeight(-vp.rect.size.height)
346+
.setY(vp.rect.size.height)
346347
.setMinDepth(0.0f)
347348
.setMaxDepth(1.0f);
348349
command_buffer_->setViewport(0, 1, &viewport);

0 commit comments

Comments
 (0)