Re:Don't "optimize" conditional moves in shaders with mix()+...
by swiftcoder on Monday February 10, 2025 @04:25AM
(#42998453)
It's all JIT'd based on the specific driver/GPU, but the intermediate assembly language is sufficient to inspect things like branches and loop unrolling.
Re:Don't "optimize" conditional moves in shaders with mix()+...
by grg0 on Monday February 10, 2025 @10:22PM
(#43008573)
Not really. DXIL in particular will still have branches and not care much about unrolling. You need to look at the assembly that is generated. And yes, that depends on the target hardware and compiler/driver.
Re:Don't "optimize" conditional moves in shaders with mix()+...
by account42 on Monday February 10, 2025 @04:32AM
(#42998525)
You will have to check for the different GPUs you are targetting. But GPU vendors don't start from scratch for each hardware generation so you will often see similar results.
(I'm not a grapics programmer, mind you, so please correct any misunderstandings on my end)