Commit f0d258c3 by Courtney Goeltzenleuchter Committed by Commit Bot

Vulkan: Emulate eglSwapBuffersWithDamage with full swap

Android expects to use eglSwapBuffersWithDamage so implement that for Vulkan backend. BUG=angleproject:2464 Change-Id: I8d599e70e6c8fee92b530d472dc97e3996630458 Reviewed-on: https://chromium-review.googlesource.com/1220066 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent f4d429c1
......@@ -171,6 +171,9 @@ void DisplayVk::generateExtensions(egl::DisplayExtensions *outExtensions) const
// TODO(geofflang): Extension is exposed but not implemented so that other aspects of the Vulkan
// backend can be tested in Chrome. http://anglebug.com/2722
outExtensions->robustResourceInitialization = true;
// Vulkan implementation will use regular swap for swapBuffersWithDamage.
outExtensions->swapBuffersWithDamage = true;
}
void DisplayVk::generateCaps(egl::Caps *outCaps) const
......
......@@ -544,6 +544,15 @@ FramebufferImpl *WindowSurfaceVk::createDefaultFramebuffer(const gl::Context *co
return FramebufferVk::CreateDefaultFBO(renderer, state, this);
}
egl::Error WindowSurfaceVk::swapWithDamage(const gl::Context *context,
EGLint * /*rects*/,
EGLint /*n_rects*/)
{
DisplayVk *displayVk = vk::GetImpl(context->getCurrentDisplay());
angle::Result result = swapImpl(displayVk);
return angle::ToEGL(result, displayVk, EGL_BAD_SURFACE);
}
egl::Error WindowSurfaceVk::swap(const gl::Context *context)
{
DisplayVk *displayVk = vk::GetImpl(context->getCurrentDisplay());
......
......@@ -101,6 +101,7 @@ class WindowSurfaceVk : public SurfaceImpl, public vk::CommandGraphResource
FramebufferImpl *createDefaultFramebuffer(const gl::Context *context,
const gl::FramebufferState &state) override;
egl::Error swap(const gl::Context *context) override;
egl::Error swapWithDamage(const gl::Context *context, EGLint *rects, EGLint n_rects) override;
egl::Error postSubBuffer(const gl::Context *context,
EGLint x,
EGLint y,
......
......@@ -179,6 +179,8 @@
2635 WIN VULKAN : dEQP-EGL.functional.resize.surface_size.stretch_width = FAIL
2635 WIN VULKAN : dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_default = FAIL
2716 WIN VULKAN : dEQP-EGL.functional.preserve_swap.no_preserve.* = FAIL
2811 WIN VULKAN : dEQP-EGL.functional.swap_buffers_with_damage.* = SKIP
// Linux failures
2546 LINUX : dEQP-EGL.functional.color_clears.multi_context.gles1.rgba8888_pixmap = SKIP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment