Cycles: Support "precompiled" headers in include expansion algorithm
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 2 Aug 2017 18:10:36 +0000 (20:10 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 2 Aug 2017 18:59:19 +0000 (20:59 +0200)
commita280697e77be984021cdf3181a396f34529f933d
tree3c1bd48ffb3380230a3ca03868335f9e924f53c1
parent4ad39964fd2f7e27ecc42946b421c22794e8f75f
Cycles: Support "precompiled" headers in include expansion algorithm

The idea here is that it is possible to mark certain include statements
as "precompiled" which means all subsequent includes of that file will
be replaced with an empty string.

This is a way to deal with tricky include pattern happening in single
program OpenCL split kernel which was including bunch of headers about
10 times.

This brings preprocessing time from ~1sec to ~0.1sec on my laptop.
intern/cycles/kernel/kernels/opencl/kernel_split.cl
intern/cycles/util/util_path.cpp