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
  • ContextVk.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Vulkan: Keep dynamic buffer's free list trimmed · e366e2c3
    Shahbaz Youssefi authored Feb 27, 2021
    ContextVk's staging buffer never gets a chance to free its free buffer
    list. During application load time, a large amount of memory may be
    allocated from this buffer to stage texture updates and they would
    remain throughout the life of the application.
    
    This change ensures that the free buffer list doesn't grow unbounded. In
    the Manhattan trace, this saves >1GB of memory on Linux.
    
    There are now three policies for vk::DynamicBuffer:
    
    - Always reuse buffers: This is useful for dynamic buffers that make
      frequent small allocations, such as default uniforms, driver uniforms,
      default vertex attributes and UBO updates.
    - Never reuse buffers: This is for situations where the buffer is
      unlikely to be used after some initial usage, such as texture data
      upload or vertex format emulation (as the conversion result is cached,
      so it's never redone).
    - Limited reuse of buffers: For the staging buffer in the context which
      is shared by all immutable texture data uploads, it's useful to keep a
      limited number of buffers (1 in this change) to support future texture
      streaming while allowing a large number of buffers allocated in a
      burst to be discarded.
    
    Bug: angleproject:5690
    Change-Id: Ic39ce61e6beb3165dbce4b668e1d3984a2b35986
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2725499
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
    Reviewed-by: 's avatarCharlie Lao <cclao@google.com>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    e366e2c3
ContextVk.cpp 229 KB
EditWeb IDE
×

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