On Tue Nov 21 13:32:34 2023 +0000, Petrichor Park wrote:
Further decompilation work has shown that the native compiler shouldn't actually have asin(0)=0, because it uses two different values for pi/2. But constant folding will still replace a literal asin(0) with 0. I'm not really sure what to do here, given that Microsoft's code is so obviously wrong. I also don't know where to get a real machine to test it on ... My instinct is to just implement *something* reasonably correct at this point, given how long I've been hung up on edge cases. I think Wine bug 55154 will be a lot better served by having *some* version of asin that works, even if it's not bit identical to Windows. Any thoughts?
Do you know any application which specifically requires `asin(0) == 0` precisely on constant folding? If not, I'd just ignore it for the time being. Implement whatever formula native is emitting, that's what shaders expect.