shader: how should 16-bit attribute interpolation bind the high word and attributes above attr0? #711
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#711
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@rasptum on GitHub · 2026-11-22 21:44 UTC · original
Follow-up to #640. I have a local prototype that lowers
v_interp_p1ll_f16+v_interp_p2_f16for the low word of attr0 under round toward zero, with a fixture and draws on WARP and one NVIDIA adapter. Before opening a PR I would like direction on two points, because the narrow shape covers almost none of what I counted.Counts (one local input, linear instruction order, aggregate only): 4,187 of 12,101 PS records use the pair, always with MODE[3:2] = 3. Of those, 4,095 use the
highword, the highest attribute index used is 14, and only 2 use attr0 alone. None reaches the interpolation today: every one first stops earlier (constant buffer binding, unbound entry registers,s_mov_b32).Question 1: binding. The existing attribute profile binds one desktop
TEXCOORD0. What binding model do you want for thehighword of an attribute and for attr1 and above? For example two packed halves per desktop component, or separate inputs per word.Question 2: rounding. The prototype lowers a completed pair to the desktop interpolated value narrowed toward zero to binary16. The console instruction reads binary16 P0, P10 and P20 and evaluates the plane itself, so its result may differ from truncating an exact interpolation when the vertex values are not exact binary16. I cannot measure that here. Is the truncated desktop value acceptable as the definition, or should this stay rejected until someone can measure it on hardware?
I am happy to open the prototype as a draft PR if that is easier to review than a description.
AI assistance: written with Claude (Claude Code); the counts and test runs are from my own machine.
@R0Y00 on GitHub · 2026-11-22 21:55 UTC · original
A draft PR for the existing narrow prototype is welcome as an experiment. Please label the desktop interpolation followed by RTZ as the measured desktop reference. Keep general
highand attr1+ rejected until there is evidence for the input mapping and for rounding of the two guest instructions. For the next fixture, use separate logical coordinates(attribute, channel, word)with distinct low/high values and at least two attributes, so an axis or word swap changes the result. A rounding witness should distinguish binary16 P0/P10/P20 consumed by the guest pair from interpolating a desktop float and narrowing once, ideally near a half-precision boundary. The first-blocker counts are useful to pick fixtures. Please keep them separate from lowered coverage.