The biggest problem of the OpenCL/Split kernel now are it’s very often and long compile time. This patch is meant to reduce the number of conditional features and nodes to a minimum, while keeping performance on the same level. Master has 4 node groups, 4 node features, and 13 kernel features, which gives 4*2^17 = more than half a million possible combinations. A great improvement compared to 2.69 which had 64 possible closure numbers on top of that
Anyway, this patch reduces this to a point where you should rarely see a recompile.
Transparent shadows, principled shader, denoising, camera motion blur, 2 node features regarding bump are now in all kernels, so you can use those smoothly in your work.
The number of node groups was reduced to 2, which means that adding nodes to your tree should only trigger one recompile max.
You can test a build of current master with less recompile and faster rendering for the split kernel here:
File-Upload.net - lesscompile.7z
Here is the impact on different scenes from the benchmark pack with some tweaks to compensate the very slight slowdowns due to more features being compiled in all the kernels:
The patch is here https://developer.blender.org/D2939. Note that it’s a big wip, review will start later if you are happy with the changes.
If loosing perf is acceptable to you, I could reduce the number of recompiles even more.