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
  • ProgramLinkedResources.h
Find file
BlameHistoryPermalink
  • Jamie Madill's avatar
    Use visitor pattern for Shader Variable APIs. · 8c78ce4b
    Jamie Madill authored Dec 16, 2018
    In many places in ANGLE we need to traverse a ShaderVariable tree. We
    do this to store uniform offset and other information, to flatten the
    tree of uniforms for the front-end, or to produce active variable lists
    for uniform and shader storage blocks. In each case, we would write
    separate tree traversal code.
    
    This patch introduces a shared visitor pattern for all of the shader
    variable tree traversal instances. With that get more common code. Also
    it is easier to write new variable traversals. ProgramD3D and
    ProgramLinkedResources in particular get nice simplificiations.
    
    The visitor object recieves callbacks from the traversal when entering
    structs, array elements, and new variables. The visitor can treat these
    differently depending on the use case. A common visitor that constructs
    full variable names is used as a base class in several places.
    
    Also moves the 'isRowMajorLayout' from sh::InterfaceBlockField to
    sh::ShaderVariable. This allows us to forgo using templates in several
    call sites.
    
    Bug: angleproject:3024
    Change-Id: I472d81ec775e2eee92fb3d2eb0ca83860221ba2e
    Reviewed-on: https://chromium-review.googlesource.com/c/1358722
    Commit-Queue: Jamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
    8c78ce4b
ProgramLinkedResources.h 7.44 KB
EditWeb IDE
×

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