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
  • EmulatePrecision.h
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Add mediump and lowp precision emulation support for GLSL output · 853dc1ab
    Olli Etuaho authored Nov 06, 2014
    This implements the rounding as specified in WEBGL_debug_shader_precision
    extension proposal for desktop GLSL and ESSL output. The bulk of the new
    functionality is added in the form of a new EmulatePrecision AST
    traverser, which inserts calls to the rounding routines angle_frm and
    angle_frl in the appropriate places, and writes the rounding routines
    themselves to the shader.
    
    Compound assignments which are subject to emulation are transformed from
    "x op= y" to "angle_compound_op_frm(x, y)", a call to a function which
    does the appropriate rounding and places the result of the operation to
    x.
    
    The angle_ prefixed names should not clash with user-defined names if
    name hashing is on. If name hashing is not on, the precision emulation
    can only be used if the angle_ prefix is reserved for use by ANGLE.
    
    To support the rounding routines in output, a new operator type is added
    for internal helper function calls, which are not subject to name
    hashing.
    
    In ESSL output, all variables are forced to highp when precision
    emulation is on to ensure consistency with how precision emulation
    performs on desktop.
    
    Comprehensive tests for the added code generation are included.
    
    BUG=angle:787
    
    Change-Id: I0d0ad9327888f803a32e79b64b08763c654c913b
    Reviewed-on: https://chromium-review.googlesource.com/229631Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
    853dc1ab
EmulatePrecision.h 2.32 KB
EditWeb IDE
×

Replace EmulatePrecision.h

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.