agc_driver_pixel_sample_iteration fails on RADV without fragmentShaderBarycentric: InterpolateAtOffset of perspective barycentrics is extrapolated #7825
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?
Imported from boykopovar/AnyPS5. Originally posted by root-over on 2026-10-19T09:08:16Z.
What
agc_driver_pixel_sample_iterationfails onmain(6b8228b2b) on RADV with an AMD Vega iGPU and passes on lavapipe on the same machine:The test allows 1e-5; the error is about 5e-4.
Cause
RADV evaluates the
GLSLstd450InterpolateAtOffsetthe recompiler emits for an offset barycentric (EmitOffsetBarycentricU32inSpirvModuleEmitter.cpp) as the value at the pixel center plus the one-pixel quad differences times the offset. Using the test's triangle (Barycentrics,Corners, 64x16):The model reproduces the measurement to six digits. That extrapolation is exact for linear barycentrics and not for perspective-correct ones: with the
PERSP_SAMPLEandPERSP_CENTERpasses skipped locally, theLINEAR_SAMPLEpass passes on RADV and the next failure is the upper-left-position pass, which also reads perspective barycentrics, with the same numbers.This device has no
fragmentShaderBarycentric(agc_driver_interpolation_f16skips for that reason), so the pixel shader takes the barycentric emulation path. On RADV with an RX 9070 XT the full suite passed exceptagc_driver_tessellation(#6877 comment, 2026-10-17, after this test was added ina61c30bff), so devices with native barycentrics look unaffected; I have no such device to check.Options
Environment
BUILD_TESTING=ONagc_driver_image_table_vouched_lookupsalso fails on this device with the same message as #7766 and passes on lavapipe, so #7766 is not specific to RDNA 4.