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
  • WrapSwitchStatementsInBlocks.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Wrap switch statements in blocks in HLSL · f6d242ed
    Olli Etuaho authored Oct 12, 2017
    If variables are declared inside a GLSL switch statement, they are
    scoped until the end of the switch statement. This is not compatible
    with HLSL rules, where the scoping is until the end of the case. To
    work around this, wrap switch statements in a block that declares
    the variables in HLSL.
    
    This is done after most other transformations done to the AST are
    complete, since some of the other transformations may introduce
    temporary variables.
    
    BUG=angleproject:2179
    TEST=angle_end2end_tests
    
    Change-Id: Id0bb89affe103177fd3d6a6b2f3619b5e1ada0a6
    Reviewed-on: https://chromium-review.googlesource.com/716381Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    f6d242ed
WrapSwitchStatementsInBlocks.cpp 4 KB
EditWeb IDE
×

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