From a5d8bd2e290d5a4e17dc52b6ea1a6f9bdf769433 Mon Sep 17 00:00:00 2001 From: Xavier Hallade Date: Mon, 24 Feb 2025 13:39:12 +0100 Subject: [PATCH] Cycles: Drop inline hint on light_tree_pdf Dropping the inlining hint for `light_tree_pdf` and reverting to the default inlining thresholds for DPC++ compiler gives a ~4% speedup on classroom and other scenes on Arc B580. Pull Request: https://projects.blender.org/blender/blender/pulls/135042 --- intern/cycles/kernel/CMakeLists.txt | 2 -- intern/cycles/kernel/light/tree.h | 16 ++++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index 59c98a91785..d643572d839 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -942,8 +942,6 @@ if(WITH_CYCLES_DEVICE_ONEAPI) -fsycl -fsycl-unnamed-lambda -fdelayed-template-parsing - -mllvm -inlinedefault-threshold=250 - -mllvm -inlinehint-threshold=350 -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=${SYCL_OFFLINE_COMPILER_PARALLEL_JOBS} --offload-compress diff --git a/intern/cycles/kernel/light/tree.h b/intern/cycles/kernel/light/tree.h index 98b76033edf..f151059e192 100644 --- a/intern/cycles/kernel/light/tree.h +++ b/intern/cycles/kernel/light/tree.h @@ -913,14 +913,14 @@ ccl_device float light_tree_pdf(KernelGlobals kg, /* If the function is called in volume, retrieve the previous point in volume segment, and compute * pdf from there. Otherwise compute from the current shading point. */ -ccl_device_inline float light_tree_pdf(KernelGlobals kg, - float3 P, - const float3 N, - const float dt, - const int path_flag, - const int emitter_object, - const uint emitter_id, - const int object_receiver) +ccl_device float light_tree_pdf(KernelGlobals kg, + float3 P, + const float3 N, + const float dt, + const int path_flag, + const int emitter_object, + const uint emitter_id, + const int object_receiver) { if (path_flag & PATH_RAY_VOLUME_SCATTER) { const float3 D_times_t = N;