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
  • System
  • Half.cpp
Find file
BlameHistoryPermalink
  • Nicolas Capens's avatar
    Fix float-to-half conversion · fd8f0e2f
    Nicolas Capens authored Jul 01, 2020
    The Reactor code in floatToHalfBits() did not match the reference
    implementation of the sw::half type, leading to failures in dEQP tests
    which are enabled by the shaderStorageImageExtendedFormats feature.
    
    The previous code was based on https://gist.github.com/rygorous/2156668.
    It doesn't round to nearest even in case of a tie, but that's not
    demanded by Vulkan. It merits a closer look to see whether there was a
    bug, or whether dEQP-VK is too strict. Dawn also found the previous
    implementation to not handle infinity correctly, so a bug seems likely.
    
    In any case, it's good to use a reference implementation for now, and
    look for optimization opportunities later.
    
    Bug: b/147900455
    Bug: swiftshader:147
    Tests: dEQP-VK.image.format_reinterpret.buffer.*_b10g11r11_ufloat_pack32
    Change-Id: Id817a012ff38af814907c2de2914ec24565622f3
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46148
    Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
    Kokoro-Result: kokoro <noreply+kokoro@google.com>
    Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    fd8f0e2f
Half.cpp 1.83 KB
EditWeb IDE
×

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