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
  • ConstantUnion.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Handle negative float to uint conversion robustly · f827123d
    Olli Etuaho authored Apr 25, 2018
    Converting a negative float to uint is undefined in the GLSL ES 3.00.6
    spec.
    
    However, it improves portability if we don't trigger undefined results
    in C++ in this case. To do this, we cast negative floats first to
    signed integer before casting them to unsigned integer.
    
    We also issue a warning about an undefined conversion in case a
    negative float was converted to uint.
    
    BUG=chromium:835868
    TEST=angle_unittests
    
    Change-Id: I9835a739ec80699d420a4f91a3bfa112c9a13604
    Reviewed-on: https://chromium-review.googlesource.com/1026681Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    f827123d
ConstantUnion.cpp 19.4 KB
EditWeb IDE
×

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