4 ms·
GPUs suck at things like e.g. data driven branches. What looks like one shader at a high level ends up creating many separate compiled blobs, because you really
by tsukikage 1y ago
GPUs suck at things like e.g. data driven branches. What looks like one shader at a high level ends up creating many separate compiled blobs, because you really want some of the parameters baked in at compile time to avoid the performance tanking, and this means you need to compile a version of the shader for every combination of values those parameters can take.
- tubs 1y agoUniform branches are free pretty much The main issue is that gpr allocation is static and worse case. So on the majority of hardware you hose your occupancy.
- viraptor 1y agoSometimes it pays off to have an ubershader with all the options though https://dolphin-emu.org/blog/2017/07/30/ubershaders/ https://dolphin-emu.org/blog/2017/07/30/ubershaders/