Page 1 of 4

Reduce the number of OpenCL kernel compilations

Posted: Wed Oct 16, 2019 2:38 pm
by Dade
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)

Re: Reduce the number of OpenCL kernel compilations

Posted: Wed Oct 16, 2019 8:25 pm
by Racleborg
Thank you. :)

Re: Reduce the number of OpenCL kernel compilations

Posted: Sun Nov 03, 2019 12:12 pm
by Dade
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).

Re: Reduce the number of OpenCL kernel compilations

Posted: Sun Dec 22, 2019 3:13 pm
by Dade
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).

Re: Reduce the number of OpenCL kernel compilations

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

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

Re: Reduce the number of OpenCL kernel compilations

Posted: Sun Dec 22, 2019 7:49 pm
by Sharlybg
Very good news !
Big thanks.

Re: Reduce the number of OpenCL kernel compilations

Posted: Sun Dec 22, 2019 9:54 pm
by neo2068
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.

Re: Reduce the number of OpenCL kernel compilations

Posted: Sun Dec 22, 2019 10:12 pm
by Racleborg
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

Re: Reduce the number of OpenCL kernel compilations

Posted: Thu Dec 26, 2019 10:52 am
by Dade
Changing PhotonGI settings doesn't require OpenCL compilation anymore (removed PARAM_PGIC_ENABLED, PARAM_PGIC_INDIRECT_ENABLED, PARAM_PGIC_CAUSTIC_ENABLED, etc.).

Re: Reduce the number of OpenCL kernel compilations

Posted: Sun Dec 29, 2019 11:23 am
by Dade
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)