New OpenCL textures and materials evaluation code
Posted: Fri Feb 21, 2020 11:28 am
Introduction
The new OpenCL code for evaluating textures and materials is finished. Its major feature is to not require dynamic kernel compilation anymore. So there is just one kernel compilation for each render engine and that is it.
For v2.4
The code is available on "for_v2.4" branch and will be included in v2.4 related releases.
Compile once
The OpenCL is now compiled once (for each render engine and for each new release) and cached. However it is a lot code to compile, it takes about 90secs with NVIDIA drivers and a AMD 3900x CPU. AMD GPU driver is likely to take more.
The most logic step would be compile the kernels at installation time. It is easy to do, it is just one LuxCore API call (KernelCacheFill()) however I have the impression Blender doesn't call anything after having installed a new plugin
It may be done the first time you run the Blender with the plugin enabled
The situation requires to be extra-careful because it will give the feeling at first-time users that everything is just frozen the moment they do the very first rendering: there must be some big informational note about what is going on.
RTPATHOCL
Thanks to this change, for the first time, it should be viable to use GPU rendering for view-port interactive rendering/editing.
P.S. can someone test this stuff with AMD GPUs. I don't have anymore an AMD GPU installed in my main PC.
The new OpenCL code for evaluating textures and materials is finished. Its major feature is to not require dynamic kernel compilation anymore. So there is just one kernel compilation for each render engine and that is it.
For v2.4
The code is available on "for_v2.4" branch and will be included in v2.4 related releases.
Compile once
The OpenCL is now compiled once (for each render engine and for each new release) and cached. However it is a lot code to compile, it takes about 90secs with NVIDIA drivers and a AMD 3900x CPU. AMD GPU driver is likely to take more.
The most logic step would be compile the kernels at installation time. It is easy to do, it is just one LuxCore API call (KernelCacheFill()) however I have the impression Blender doesn't call anything after having installed a new plugin
It may be done the first time you run the Blender with the plugin enabled
The situation requires to be extra-careful because it will give the feeling at first-time users that everything is just frozen the moment they do the very first rendering: there must be some big informational note about what is going on.
RTPATHOCL
Thanks to this change, for the first time, it should be viable to use GPU rendering for view-port interactive rendering/editing.
P.S. can someone test this stuff with AMD GPUs. I don't have anymore an AMD GPU installed in my main PC.