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
  • Compiler.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Remove empty switch statements from translated shaders · c1f14fbe
    Olli Etuaho authored Oct 28, 2017
    The native HLSL compiler does not accept switch statements with an
    empty statement list. The simplest way to accommodate this is to
    simply remove them from the AST after parsing and some initial
    pruning.
    
    This is done by the new RemoveEmptySwitchStatements traverser. It
    preserves init statements of switch statements in case they have side
    effects. So for example
    
    switch(++i) {}
    
    gets translated to
    
    ++i;
    
    BUG=angleproject:2206
    TEST=angle_end2end_tests
    
    Change-Id: I550a3c9b010a3566016bdfd93344ac30fd860604
    Reviewed-on: https://chromium-review.googlesource.com/742922Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    c1f14fbe
Compiler.cpp 40.8 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.