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
  • tests
  • gl_tests
  • ComputeShaderTest.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Vulkan: noop glMemoryBarrier(CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT) · d7037aa2
    Shahbaz Youssefi authored Feb 11, 2021
    CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT requires a memory barrier: shader
    buffer write -> host read.  According to the spec, the data is only
    available after a call to glFinish or wait on sync:
    
    > The application must call MemoryBarrier with the
    > CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT set and then call FenceSync with
    > SYNC_GPU_COMMANDS_COMPLETE (or Finish). Then the CPU will see the
    > writes after the sync is complete.
    
    When a buffer is written to by the GPU, ANGLE calls
    onHostVisibleBufferWrite(), which ensures a "memory write -> host read"
    barrier is issued at the end of the command buffer.
    
    Additionally, persistently mapped buffers use
    VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, so there's no need for a call to
    vkInvalidateMappedMemoryRanges.
    
    As a result, there's nothing necessary in ANGLE to do for this barrier
    bit.  Note that should persistenly mapped buffers start using
    non-coherent memory, this barrier should imply a call to
    vkInvalidateMappedMemoryRanges for the persistently mapped buffers.
    
    Bug: angleproject:5070
    Change-Id: Iaeae019dadfa659a47d2dac41c0c09f1c15e584b
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2689380
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    Reviewed-by: 's avatarMohan Maiya <m.maiya@samsung.com>
    Reviewed-by: 's avatarCharlie Lao <cclao@google.com>
    d7037aa2
ComputeShaderTest.cpp 152 KB
EditWeb IDE
×

Replace ComputeShaderTest.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.