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
  • tests
  • compiler_tests
  • FloatLex_test.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Fix GLSL float parsing corner cases · 99bd5f40
    Olli Etuaho authored Nov 07, 2016
    This fixes parsing floats that are out-of-range, and floats that have
    more digits than the standard library float parsing functions can
    handle. In these cases, we now fall back to a custom implementation of
    float parsing. The custom parsing path can correctly process floats
    with up to hundreds of millions of digits in their mantissa part.
    
    Rounding behavior of the custom float parser may not be entirely
    consistent with the standard parser, but the error should be at most
    a few ULP. This can be considered acceptable since floating point
    operations are not expected to be exact in GLSL in general. Settling
    for lower accuracy also enables the parser to run in constant memory,
    instead of having to store all the significant digits of the decimal
    mantissa being parsed.
    
    BUG=angleproject:1613
    TEST=angle_unittests
    
    Change-Id: I04a5d9ae5aaca48ef14b79cca5b997078614eb1c
    Reviewed-on: https://chromium-review.googlesource.com/412082
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    99bd5f40
FloatLex_test.cpp 4.64 KB
EditWeb IDE
×

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