Commit e8c5525c by Tim Van Patten Committed by Commit Bot

Vulkan: flushCommandsAndEndRenderPass during glFenceSync()

The description for glFenceSync states: glFenceSync — create a new sync object and insert it into the GL command stream ANGLE needs to break the render pass and flush any prior commands to ensure that the newly created Fence object lands with the correct ordering. This will be done by calling ContextVk::flushCommandsAndEndRenderPass() before creating the Vulkan Event object. Bug: angleproject:5306 Change-Id: I3a460bb559acf8eb4b3041065ec743938d44d823 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2582199Reviewed-by: 's avatarCharlie Lao <cclao@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
parent cbc1220e
......@@ -87,6 +87,10 @@ angle::Result SyncHelper::initialize(ContextVk *contextVk)
{
ASSERT(!mEvent.valid());
// Break the current render pass to ensure the proper ordering of the sync object in the
// commands.
ANGLE_TRY(contextVk->flushCommandsAndEndRenderPass());
RendererVk *renderer = contextVk->getRenderer();
VkDevice device = renderer->getDevice();
......
......@@ -292,8 +292,6 @@ TEST_P(FenceSyncTest, MultipleFenceDraw)
{
GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
ASSERT_GL_NO_ERROR();
// Force the fence to be created
glFlush();
drawGreen = !drawGreen;
GLuint program = 0;
......
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