Draft: tests: Make ddxddy.shader_test pass for different GPUs.
On my Nvidia GeForce GTX 1050 Ti this test is not passing because of considerably different numeric results.
As Giovanni pointed out, this is because my GPU uses the fine derivate and not the coarse derivate to implement ddx() and ddy().
Testing both ddx_coarse()|ddy_coarse() and ddx_fine()|ddy_fine() on the WARP driver shows that both these derivates are the same in coordinates where both X and Y are even, i.e. the first pixel of each 2x2 quad. So the test was modified to only probe on these coordinates.
The new expected values were obtained from running the test using the WARP driver, and ulps adjusted for my GPU. However, this MR is marked as a draft because I would like to know if the test passes on other GPUs.
Merge request reports
Activity
My feeling is that these tests are more obscure than they need to be. I'd rather have a test for each of the derivative variants (fine, coarse and "unspecified"), and test all four the possible positions in a 2x2 tile in each of the tests. If the results vary wildly, use quantization. The point of these tests, I think, is not checking how precisely the video card is doing derivatives, but rather check that (in both the HLSL compiler and SMx -> SPIR-V compiler) we're correctly passing derivation operations over.
Got it. I did just that in !224 (merged).
Superseded by !224 (merged) .