Looking for help to identify a regression when using Clang-based OpenCL platform with LuxMark/LuxCore

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Looking for help to identify a compiler bug in Clang uncovered by LuxMark/LuxCore

Post by Dade »

In C99, fminf() of a number and NaN alaways returns the number: https://en.cppreference.com/w/c/numeric/math/fmin

If it is the same in OpenCL C, LuxMark v3.1 code is correct.
Support LuxCoreRender project with salts and bounties
illwieckz
Posts: 19
Joined: Tue May 17, 2022 11:41 pm

Re: Looking for help to identify a regression when using Clang-based OpenCL platform with LuxMark/LuxCore

Post by illwieckz »

That's also what Karol Herbst told me, that he expected that `min(1.0, infinty)` should return `1.0`… I believe it makes sense but I'm not a compiler wizard.

Here are some talks about it: https://github.com/llvm/llvm-project/issues/54947#issuecomment-1280119445
Post Reply