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
  • vk_helpers.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Vulkan: Optimize glMemoryBarrier · e96d1744
    Shahbaz Youssefi authored Feb 12, 2021
    Previous to this change, glMemoryBarrier was processed as it is issued.
    This made it impossible to know whether a draw call would follow or a
    dispatch call, and what resources it would use.  The render pass was
    conservatively broken due to this limitation.  To address this
    limitation, handling of glMemoryBarrier is deferred until the next
    draw or dispatch call.
    
    Note that glMemoryBarrier acts as two barriers:
    
    - An execution+memory barrier: shader writes are made visible to
      subsequent accesses
    - Another execution barrier: shader accesses are finished before
      subsequent writes
    
    An important observation is that for most resources, ANGLE actually
    necessarily has to issue memory barriers automatically to conform with
    Vulkan.  In terms of memory barrier thus, ANGLE already does the right
    thing except for when there's no binding change.  This means WaW hazards
    (i.e. storage buffer and image writes) with no binding change require a
    memory barrier as a result of glMemoryBarrier.  In all other cases, it's
    enough for glMemoryBarrier to break the render pass if necessary and
    ensure that corresponding bindings are marked dirty (for the execution
    or memory barriers to happen automatically later).
    
    Bug: angleproject:5070
    Change-Id: Ide359c43362f8a78805ecf797a91de7aa79221f9
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2693473Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    e96d1744
vk_helpers.cpp 289 KB
EditWeb IDE
×

Replace vk_helpers.cpp

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.