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
  • Device
  • Primitive.hpp
Find file
BlameHistoryPermalink
  • Alexis Hetu's avatar
    BuiltInPointCoord implementation · 95b1db96
    Alexis Hetu authored May 27, 2019
    BuiltInPointCoord is defined as:
    
    "The following formulas are used to evaluate s and t:
    
    s = 1/2 + (xp - xf) / size
    t = 1/2 + (yp - yf) / size
    
    where size is the point’s size; (xp,yp) is the location at which the
    point sprite coordinates are evaluated - this may be the framebuffer
    coordinates of the fragment center, or the location of a sample; and
    (xf,yf) is the exact, unrounded framebuffer coordinate of the vertex
    for the point."
    
    So it was implemented by writing (xf,yf) in SetupRoutine, where this
    information is present and using the fragment's x and y coordinates
    as (xp,yp), which passes the test.
    
    Tests: dEQP-VK.glsl.builtin_var.simple.pointcoord
    
    Change-Id: I9146349bcce0f7c31dd0464c0f210a7306d5d033
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31992
    Presubmit-Ready: Alexis Hétu <sugoi@google.com>
    Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
    Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
    95b1db96
Primitive.hpp 1.55 KB
EditWeb IDE
×

Replace Primitive.hpp

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.