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
  • Compiler.cpp
Find file
BlameHistoryPermalink
  • Jamie Madill's avatar
    Make gl::Compiler reference-counted. · 2f348d2a
    Jamie Madill authored Jun 05, 2017
    This is helpful for implementing program binary caching in ANGLE.
    
    in order to maintain the current behaviour in Chrome, we will need
    to defer shader compilation until link time. Since WebGL allows the
    app layer to enable and disable extensions explicitly, the app can
    enable or disable an extension between the calls to glCompileShader
    and glLinkProgram. Then, if we're deferring shader compilation, we
    will have to preserve the extension settings at the time of the call
    to compile, not the current settings at the time of link. Making the
    compiler reference-counted gives us a pretty simple and robust
    solution.
    
    This also changes the Context class to lazily init the shader
    compiler. Lazy init prevents any unexpected nulls, and also ensures
    the releaseShaderCompiler does exactly that: just releases the shader
    compiler, and does not immediately re-initialize it.
    
    BUG=angleproject:2044
    
    Change-Id: I0f0eeb4eb94dc4eee238f92482804a0921c77df0
    Reviewed-on: https://chromium-review.googlesource.com/522868Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    Commit-Queue: Jamie Madill <jmadill@chromium.org>
    2f348d2a
Compiler.cpp 6.7 KB
EditWeb IDE
×

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