shader: lower pull-model barycentrics (<I/W, J/W, 1/W>) and supply 1/W for pixel POS_W_FLOAT #561
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS#561
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?
@Sheffy007 on GitHub · 2026-11-28 04:24 UTC · original
Refs #258, #410, #525.
Two pixel-shader hardware input bugs remain on
mainnow thatSPI_PS_INPUT_ENA/SPI_PS_INPUT_ADDRis decoded from the register image (1cf0fbc0):Pull-model barycentrics (
Barycentric::PerspectivePullModel,SPI_PS_INPUT_ADDRbit 3) are refused as"barycentrics read directly"(11 pixel shaders in #525).PERSP_PULL_MODEL_ENApopulates three entry VGPRs with pixel-centre<I/W, J/W, 1/W>(AMD LGCLowerInOut::visitEvalIjOffsetSmoothOp), which shaders read as data to evaluate derivatives/offsets and recover perspective(I, J).Lower::barycentriccurrently returnsVal::Missing(BARYCENTRICS_READ)forB::PerspectivePullModel, which is the only path left that emits"barycentrics read directly"on pixel shaders.SV_Position.wis clip-spaceWand perspective-centreSV_Barycentrics.yzare(I, J), so<I/W, J/W, 1/W>can be lowered directly as<SV_Barycentrics.y / SV_Position.w, SV_Barycentrics.z / SV_Position.w, 1.0 / SV_Position.w>(declaringSV_PositioninISG1when the program did not already have one).Input::Position(3)(POS_W_FLOAT,SPI_PS_INPUT_ADDRbit 11) suppliesWinstead of1/W.POS_W_FLOATholds1/W(so console HLSL shaders that readSV_Position.walready emitv_rcp_f32on that entry VGPR, matching AMD LGCLowerInOut'sBuiltInFragCoordlowering when!noReciprocalFragCoordW).Lower::input(Input::Position(3))currently returns DXILloadInputofSV_Position.w(W) without inverting it, causing console pixel shaders'v_rcp_f32to compute1/Winstead ofW(off byW^2wheneverW != 1).@Sheffy007 on GitHub · 2026-11-28 04:24 UTC · original
/claim
@github-actions[bot] on GitHub · 2026-11-28 04:24 UTC · original
Claimed by @Sheffy007. Open a draft pull request with
Refs #557in its description within 24 hours, or the claim expires.github-bot referenced this issue2026-11-28 05:06:09 +00:00