On Mon Jan 30 18:56:13 2023 +0000, Zebediah Figura wrote:
What Giovanni said, although it's kind of a mix of both reasons. We don't want to match native compiler output exactly, but it's also useful to test the lower level compilers (for our purposes, dxbc -> spirv/glsl, but Mesa has also expressed interest in running our tests.)
At least for rsqrt() results depend on shader model, for d3d9 input is going through abs() equivalent when executed, so it's never invalid. For d3d11 output contains NaNs. Detecting that with isnan() won't work, because that's not compiled reliably. We could probably use some inline isnan() logic, but still there is no way currently to pick different test result. I understand the importance of getting a good coverage, but that goes beyond implementing builtin functions. I don't think one that should block another.