BuiltInPointCoord implementation
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:
Chris Forbes <chrisforbes@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Tested-by:
Alexis Hétu <sugoi@google.com>
Showing
Please
register
or
sign in
to comment