New OpenCL textures and materials evaluation code

Discussion related to the LuxCore functionality, implementations and API.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: New OpenCL textures and materials evaluation code

Post by B.Y.O.B. »

Thanks!

I would like to use KernelCacheFill() to compile the kernels for viewport and final render in one go, however KernelCacheFill() currently does not support to pass in the values of min. and max. epsilon.

The easiest way to support this would be to allow to pass in config properties to KernelCacheFill() by changing this line:
https://github.com/LuxCoreRender/LuxCor ... l.cpp#L284
from

Code: Select all

Properties cfgProps;
to

Code: Select all

Properties cfgProps = config;
Would that be OK for you? Or do you want to keep the kernelcachefill properties separate from any passed-in properties?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: New OpenCL textures and materials evaluation code

Post by Dade »

B.Y.O.B. wrote: Thu Apr 09, 2020 7:25 pm I would like to use KernelCacheFill() to compile the kernels for viewport and final render in one go, however KernelCacheFill() currently does not support to pass in the values of min. and max. epsilon.
Button when are you going to call KernelCacheFill() ? After an explicit user command ?
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: New OpenCL textures and materials evaluation code

Post by B.Y.O.B. »

No, before the render starts, after checking if HasCachedKernels() returned false.
But I want to compile both kernels on that occasion, so the user only has to wait once after installation.
(I want pathocl and RTpathocl, tilepath is so rarely used that i don't include it here)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: New OpenCL textures and materials evaluation code

Post by Dade »

B.Y.O.B. wrote: Thu Apr 09, 2020 9:27 pm No, before the render starts, after checking if HasCachedKernels() returned false.
But I want to compile both kernels on that occasion, so the user only has to wait once after installation.
(I want pathocl and RTpathocl, tilepath is so rarely used that i don't include it here)
KernelCacheFill() was intended to be run at installation time, running it while you are starting a rendering (and doubling the compilation time by compiling 2 sets of kernels) doesn't sound like a good idea to me :?:

Can you pop up a dialog at installation time or when LuxCore render engine is selected for the first time ?
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: New OpenCL textures and materials evaluation code

Post by B.Y.O.B. »

Every other render engine does it during first render, people are used to it and I think it's fine.
Also I can show better info in the UI than during installation.
Anyway, the problem at hand (min/max epsilon not being passed to KernelCacheFill()) is independent of that decision.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: New OpenCL textures and materials evaluation code

Post by Dade »

B.Y.O.B. wrote: Fri Apr 10, 2020 12:36 am Anyway, the problem at hand (min/max epsilon not being passed to KernelCacheFill()) is independent of that decision.
It is not only epsilon min/max, it is also about the list of devices to use: HasCachedKernels() is a method of RenderConfig for that reason.

KernelCacheFill() compiles for all OpenCL devices available: for instance, if you have 4 different GPUs, your solution will compile 8 set of kernels (4 devices x RTPATHOCL+PATHOCL). If the user was doing a rendering with only one device, this solution will increase the compilation time by 16. This is the reason why it should be done at installation time (or something like that).

I can add parameters for epsilon and devices to KernelCacheFill() but I'm pretty sure that this solution will double the questions about "Why BlendLuxCore hung up at the start of a rendering ?" instead of removing them.
Support LuxCoreRender project with salts and bounties
Post Reply