Reduce the number of OpenCL kernel compilations

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Posts: 4392
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Reduce the number of OpenCL kernel compilations

Post by Dade » Wed Oct 16, 2019 2:38 pm

It is going to be a long journey. Anyway I will list here the cases that do not trigger an OpenCL kernel re-compilation anymore:

- Using/Not Using bump/normal mapping doesn't requires OpenCL compilation anymore (removed PARAM_HAS_BUMPMAPS conditional OpenCL compilation)

- Using/Not using any type of transparency doesn't require OpenCL compilation anymore (removed PARAM_HAS_PASSTHROUGH conditional OpenCL compilation)

- Changing max. path and/or Russian Roulette parameters doesn't require OpenCL compilation anymore (removed PARAM_MAX_PATH_DEPTH, PARAM_MAX_PATH_DEPTH_DIFFUSE, PARAM_MAX_PATH_DEPTH_GLOSSY, PARAM_MAX_PATH_DEPTH_SPECULAR, PARAM_RR_DEPTH and PARAM_RR_CAPPARAM_HAS_BUMPMAPS conditional OpenCL compilation)

- Changing hybrid backward/forward path tracing settings doesn't require OpenCL compilation anymore (removed PARAM_HYBRID_BACKFORWARD and PARAM_HYBRID_BACKFORWARD_GLOSSINESSTHRESHOLD conditional OpenCL compilation)

- Changing PhotonGI settings doesn't require OpenCL compilation anymore (removed PARAM_PGIC_ENABLED, PARAM_PGIC_INDIRECT_ENABLED, PARAM_PGIC_CAUSTIC_ENABLED, etc.)

- Changing force black background flag doesn't require OpenCL compilation anymore (removed PARAM_FORCE_BLACK_BACKGROUND)

- Changing variance clamping settings doesn't require OpenCL compilation anymore (removed PARAM_SQRT_VARIANCE_CLAMP_MAX_VALUE)

- Changing LIGHT_WORLD_RADIUS_SCALE doesn't require OpenCL compilation anymore (removed PARAM_RADIUS)

- Removed HitPoint struct variable size related to PARAM_ENABLE_TEX_HITPOINTCOLOR, PARAM_ENABLE_TEX_HITPOINTGREY, PARAM_ENABLE_TEX_HITPOINTALPHA and PARAM_TRIANGLE_LIGHT_HAS_VERTEX_COLOR to avoid OpenCL re-compilation

- Enabling/disabling volumes doesn't require OpenCL compilation anymore (removed PARAM_HAS_VOLUMES and SCENE_DEFAULT_VOLUME_INDEX)

- Enabling/disabling camera clipping and/or OculusRift barrel doesn't require OpenCL compilation anymore (removed PARAM_CAMERA_ENABLE_CLIPPING_PLANE and PARAM_CAMERA_ENABLE_OCULUSRIFT_BARREL)

- Changing any pixel filter related parameter doesn't require OpenCL compilation anymore (removed all PARAM_IMAGE_FILTER_*)

- Changing camera type doesn't require OpenCL compilation anymore (removed PARAM_CAMERA_TYPE)

- Changing any image map related settings doesn't require OpenCL compilation anymore (removed all PARAM_HAS_IMAGEMAPS_*)

- Changing the number of light groups used doesn't require OpenCL compilation anymore (removed PARAM_FILM_RADIANCE_GROUP_*)

- Enabling/disabling BCD denoiser doesn't require OpenCL compilation anymore (removed PARAM_FILM_DENOISER)

- Rework of OpenCL samplers code to not require OpenCL compilation anymore when changing sampler (removed PARAM_SAMPLER_*)

- Changing AOVs used doesn't require OpenCL compilation anymore (removed PARAM_FILM_CHANNELS_*)

- Adding/Removing a new light source type doesn't require OpenCL compilation anymore (removed PARAM_HAS_*LIGHT)
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Reduce the number of OpenCL kernel compilations

Post by Racleborg » Wed Oct 16, 2019 8:25 pm

Thank you. :)

User avatar
Dade
Developer
Posts: 4392
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Reduce the number of OpenCL kernel compilations

Post by Dade » Sun Nov 03, 2019 12:12 pm

Using/Not using any type of transparency doesn't require OpenCL compilation anymore (removed PARAM_HAS_PASSTHROUGH conditional OpenCL compilation).

Changing max. path and/or Russian Roulette parameters doesn't require OpenCL compilation anymore (removed PARAM_MAX_PATH_DEPTH, PARAM_MAX_PATH_DEPTH_DIFFUSE, PARAM_MAX_PATH_DEPTH_GLOSSY, PARAM_MAX_PATH_DEPTH_SPECULAR, PARAM_RR_DEPTH and PARAM_RR_CAPPARAM_HAS_BUMPMAPS conditional OpenCL compilation).
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 4392
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Reduce the number of OpenCL kernel compilations

Post by Dade » Sun Dec 22, 2019 3:13 pm

Changing hybrid backward/forward path tracing settings doesn't require OpenCL compilation anymore (removed PARAM_HYBRID_BACKFORWARD and PARAM_HYBRID_BACKFORWARD_GLOSSINESSTHRESHOLD conditional OpenCL compilation).
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Reduce the number of OpenCL kernel compilations

Post by Racleborg » Sun Dec 22, 2019 3:35 pm

Getting this message when running a render after the update:

"Wrong data type for the list of UV maps of method Scene.DefineMesh(): int"

User avatar
Sharlybg
Donor
Posts: 2079
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Reduce the number of OpenCL kernel compilations

Post by Sharlybg » Sun Dec 22, 2019 7:49 pm

Very good news !
Big thanks.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

neo2068
Developer
Posts: 213
Joined: Tue Dec 05, 2017 6:06 pm
Location: Germany

Re: Reduce the number of OpenCL kernel compilations

Post by neo2068 » Sun Dec 22, 2019 9:54 pm

Racleborg wrote:
Sun Dec 22, 2019 3:35 pm
Getting this message when running a render after the update:

"Wrong data type for the list of UV maps of method Scene.DefineMesh(): int"
This message comes from the new multi UV map support. Do you have the latest version of BlendLuxCore? It seems that there is an old version calling the new function.
i7 5820K, 32 GB RAM, NVIDIA Geforce GTX 1080 + GTX 780, Windows 10 64bit, Blender 2.82a
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Reduce the number of OpenCL kernel compilations

Post by Racleborg » Sun Dec 22, 2019 10:12 pm

Do you have the latest version of BlendLuxCore? It seems that there is an old version calling the new function.
That was it, thank you.

The new update has made things much faster for compiling opencl. Many thanks :D

User avatar
Dade
Developer
Posts: 4392
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Reduce the number of OpenCL kernel compilations

Post by Dade » Thu Dec 26, 2019 10:52 am

Changing PhotonGI settings doesn't require OpenCL compilation anymore (removed PARAM_PGIC_ENABLED, PARAM_PGIC_INDIRECT_ENABLED, PARAM_PGIC_CAUSTIC_ENABLED, etc.).
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 4392
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Reduce the number of OpenCL kernel compilations

Post by Dade » Sun Dec 29, 2019 11:23 am

Changing force black background flag doesn't require OpenCL compilation anymore (removed PARAM_FORCE_BLACK_BACKGROUND)

Changing variance clamping settings doesn't require OpenCL compilation anymore (removed PARAM_SQRT_VARIANCE_CLAMP_MAX_VALUE)

Changing LIGHT_WORLD_RADIUS_SCALE doesn't require OpenCL compilation anymore (removed PARAM_RADIUS)

Removed HitPoint struct variable size related to PARAM_ENABLE_TEX_HITPOINTCOLOR, PARAM_ENABLE_TEX_HITPOINTGREY, PARAM_ENABLE_TEX_HITPOINTALPHA and PARAM_TRIANGLE_LIGHT_HAS_VERTEX_COLOR to avoid OpenCL re-compilation

Enabling/disabling volumes doesn't require OpenCL compilation anymore (removed PARAM_HAS_VOLUMES and SCENE_DEFAULT_VOLUME_INDEX)
Support LuxCoreRender project with salts and bounties

Post Reply