Re:Don't "optimize" conditional moves in shaders with mix()+...
by plagiarist on Sunday February 09, 2025 @11:34AM
(#42991686)
I think that capability in the shader language would be interesting to have. One might even want it to two-color all functions in the code. Anything annotated nonbranching must have if statements compile down to conditional moves and must only call nonbranching functions.
[ Parent
| on HN ]
Re:Don't "optimize" conditional moves in shaders with mix()+...
by catlifeonmars on Sunday February 09, 2025 @12:36PM
(#42992078)
This is also very relevant for cryptography use cases, where branching is a potential side channel for leaking secret information.