News for hackers. Stuff that matters.
Re:Don't "optimize" conditional moves in shaders with mix()+... by chrisjj on Sunday February 09, 2025 @11:30AM (#42991661)
The good way is to inspect the code :)

> it's also concerning that we have syntax where an if is some times a branch and some times not.

It would be more concerning if we didn't. We might get a branch on one GPU and none on another.

Re:Don't "optimize" conditional moves in shaders with mix()+... by phkahler on Sunday February 09, 2025 @12:51PM (#42992170)
>> The good way is to inspect the code :)

The best way is to profile the code. Time is what we are after, so measure that.

Re:Don't "optimize" conditional moves in shaders with mix()+... by chrisjj on Tuesday February 11, 2025 @04:51PM (#43018819)
For sure.