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
  • common
  • string_utils.cpp
Find file
BlameHistoryPermalink
  • Shahbaz Youssefi's avatar
    Vulkan: Optimize shader source macro replacement · 62742f9e
    Shahbaz Youssefi authored May 01, 2019
    @@ LAYOUT-xx @@ and @@ QUALIFIER-xx @@ macros are generated by the
    compiler when emitting Vulkan GLSL.  These macros are replaced at link
    time in the Vulkan backend.
    
    Previously, this replacement was done through calls to
    angle::ReplaceSubstring, reiterating over the whole source on every
    replacement.  This CL does a prepass on the input source and chunks it
    up in blocks.  Search is optimized as only blocks of a certain type are
    string-compared (skipping large chunks of shader text).  Replace is
    optimized as the whole shader is not shifted left or right on every
    replacement.
    
    Additionally, this CL modifies the layout macro to the following format:
    
    	@@ LAYOUT-xx(extra, args) @@
    
    This is used in a follow up CL to have the compiler provide additional
    layout qualifiers.
    
    Bug: angleproject:3220
    Change-Id: I6367e781c3304d5f2e0a406e4fb4e6feb4c45f1d
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592070
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
    62742f9e
string_utils.cpp 5.75 KB
EditWeb IDE
×

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