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
  • compiler
  • translator
  • DeferGlobalInitializers.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Fix deferring global array initialization · d4f4c11b
    Olli Etuaho authored Apr 15, 2016
    The initial implementation of DeferGlobalInitializers did not take
    HLSL corner cases into account. In particular, in case there was a
    const-qualified array variable with an initializer that contained
    elements that weren't constant folded, initialization would not be
    deferred and the global scope of HLSL output would contain a call to
    angle_construct_into_*().
    
    On the other hand, deferring global initializers was also done in
    cases where it wasn't necessary. Initializers of non-const qualified
    array variables that could be written as HLSL literals by HLSL output
    were unnecessarily deferred.
    
    This patch fixes both of these issues: Now all global initializers are
    potential candidates for deferral instead of just those where the
    symbol has the EvqGlobal qualifier, and initializers that are
    constructors taking only constant unions as parameters are not
    unnecessarily deferred.
    
    BUG=angleproject:1205
    BUG=541551
    TEST=angle_end2end_tests
    
    Change-Id: I4027059e0e5f39c8a5a48b5c97a3fceaac6b6f8a
    Reviewed-on: https://chromium-review.googlesource.com/339201Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    d4f4c11b
DeferGlobalInitializers.cpp 7.71 KB
EditWeb IDE
×

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