Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • 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
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • src
  • OpenGL
  • compiler
  • IntermTraverse.cpp
Find file
BlameHistoryPermalink
  • Alexis Hetu's avatar
    Switch implementation · 9aa83a93
    Alexis Hetu authored May 02, 2016
    Implemented switch/case for glsl in OpenGL ES 3.0.
    For simplicity, it is implemented as a loop without a condition,
    so break statements work properly like so:
    
    begin switch
      if(...) // 1st case
      ...
      else if(...) // other cases
      ...
      else // default case
      ...
    end switch // Anchor point for break statements
    
    All related dEQP tests pass, except 7 tests where vertex shaders
    contain a switch or a loop within another switch. These 7 failures
    have only about 5% of bad pixel and seem to be related to an issue
    with int(floor(...)), since the equivalent tests inside the fragment
    shader pass.
    
    KNOWN ISSUE: If a switch is within a loop and one of the cases
                 contains a "continue" statement, this will not be
                 handled correctly at the moment. There are no dEQP
                 tests for this at the moment, AFAIK.
    
    Change-Id: I3ba34ab06a759d07e8520f6a87d75036a5cdaef5
    Reviewed-on: https://swiftshader-review.googlesource.com/5272Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
    Reviewed-by: 's avatarNicolas Capens <capn@google.com>
    9aa83a93
IntermTraverse.cpp 5.97 KB
EditWeb IDE
×

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