Blender Git Commit Log

Git Commits -> Revision 7e7a9d1

Revision 7e7a9d1 by Lukas Stockner (master)
September 7, 2016, 23:33 (GMT)
Cycles: Fix OpenCL speed regression introduced with the improved bump mapping

The two SVM nodes added with e7ea1ae78c caused a slowdown on AMD cards when rendering with OpenCL, whether displacement was used or not.
In the Barcelona Pavillon scene on a RX480, this would cause a 12% slowdown.

Therefore, this commit adds a additional flag for feature-adaptive compilation so that the new SVM nodes are only enabled when they are needed (Node tree connected to the Displacement output and Displacement type set to Both).

Also, the nodes were also added to shaders when the Displacement Type was set to Bump (the default), which was unneccessary and is fixed now.

Thanks to linda2 on IRC for reporting and testing and to maiself for help with the displacement shader code.

This fix might be relevant for 2.78, but it should be tested further before including it.

Commit Details:

Full Hash: 7e7a9d146ca631f3e71d35bb71add041570eab23
Parent Commit: afd3a55
Lines Changed: +10, -3

4 Modified Paths:

/intern/cycles/kernel/svm/svm.h (+2, -0) (Diff)
/intern/cycles/kernel/svm/svm_types.h (+2, -1) (Diff)
/intern/cycles/render/shader.cpp (+3, -0) (Diff)
/intern/cycles/render/svm.cpp (+3, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021