mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
This helps especially for OSL, where load time is very long. By splitting off shader raytrace, MNEE and volumes, the first time rendering is much faster. The downside is that noinline functions will be duplicated. However OSL startup performance is very bad currently and this seems the better trade-off for now. There are ways to make this work if we do not mark noinline functions as static, but this will require some bigger code reorganization. Without OSL, shader raytrace and MNEE were combined in a single module, and that has been split into two as well. Besides a better user experience, This will fix OptiX OSL test timeouts on the buildbot, where some tests need to compute a few different specializations and the 600s timeout is exceeded, with the longest test run time being around 300s. Pull Request: https://projects.blender.org/blender/blender/pulls/159499
19 lines
682 B
Text
19 lines
682 B
Text
/* SPDX-FileCopyrightText: 2011-2026 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
|
|
|
#include "kernel/device/optix/compat.h"
|
|
#include "kernel/device/optix/globals.h"
|
|
|
|
#include "kernel/device/gpu/image.h" /* Texture lookup uses normal CUDA intrinsics. */
|
|
|
|
#include "kernel/integrator/intersect_mnee.h"
|
|
|
|
extern "C" __global__ void __raygen__kernel_optix_integrator_intersect_mnee()
|
|
{
|
|
const int global_index = optixGetLaunchIndex().x;
|
|
const int path_index = (kernel_params.path_index_array) ?
|
|
kernel_params.path_index_array[global_index] :
|
|
global_index;
|
|
integrator_intersect_mnee(nullptr, path_index);
|
|
}
|