Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • libANGLE
  • renderer
  • vulkan
  • SyncVk.h
Find file
BlameHistoryPermalink
  • Tim Van Patten's avatar
    Reland "Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9" · 909ea88b
    Tim Van Patten authored Nov 20, 2020
    This is a reland of 5cf7472d
    
    The ShareGroupVk::mResourceUseLists was not being cleared each call to
    RendererVk::submitFrame(), so it was growing indefinitely. Each
    vk::ResourceUseList within it was cleared, so it was holding an
    essentially "infinite" list of empty lists, but that caused the loop in
    RendererVk::submitFrame() to take more and more time until the tests
    timed out.
    
    The fix is to do 'resourceUseLists.clear()' once the loop to release all
    resources has completed, like releaseResourceUsesAndUpdateSerials() does
    for each individual list.   Additionally, ASSERTs are added to guarantee
    that the lists are empty when the ContextVk and ShareGroupVk are
    destroyed.
    
    Original change's description:
    > Vulkan: Ignore glFlush to reduce vkQueueSubmits in Asphalt 9
    >
    > Multithreaded apps can use the following pattern:
    >
    >   glDrawElements()
    >   glFenceSync()
    >   glFlush()
    >   glWaitSync()
    >
    > This currently results in a vkQueueSubmit for every glFlush() to ensure
    > that the work has landed in the command queue in the correct order.
    > However, ANGLE can instead avoid the vkQueueSubmit during the glFlush()
    > in this situation by instead flushing the ContextVk's commands and
    > ending the render pass to ensure the commands are submitted in the
    > correct order to the renderer. This improves performance for Asphalt 9
    > by reducing frame times from 150-200msec to 35-55msec.
    >
    > Specifically, ANGLE will call flushCommandsAndEndRenderPass() when
    > there is a sync object pending a flush or if the ContextVk is currently
    > shared.
    >
    > Additionally, on all devices except Qualcomm, ANGLE can ignore all other
    > glFlush() calls entirely and return immediately. For Qualcomm devices,
    > ANGLE is still required to perform a full flush (resulting in a
    > vkQueueSubmit), since ignoring the glFlush() reduces the Manhattan 3.0
    > offscreen score by ~3%.
    >
    > Bug: angleproject:5306
    > Bug: angleproject:5425
    > Change-Id: I9d747caf5bf306166be0fec630a78caf41208c27
    > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552718
    > Commit-Queue: Tim Van Patten <timvp@google.com>
    > Reviewed-by: Charlie Lao <cclao@google.com>
    > Reviewed-by: Jamie Madill <jmadill@chromium.org>
    
    Bug: angleproject:5306
    Bug: angleproject:5425
    Bug: angleproject:5470
    Change-Id: I14ee424d032f22e5285d67accbec078ad1955dd0
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2595811
    Commit-Queue: Tim Van Patten <timvp@google.com>
    Reviewed-by: 's avatarCharlie Lao <cclao@google.com>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    909ea88b
SyncVk.h 4.61 KB
EditWeb IDE
×

Replace SyncVk.h

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.