mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
Both shadow kernels seems to be expensive enough and having them in the main module leads to very long module creation times. These new modules are always created (at least for now), but they are created in parallel with other modules. Overall it drastically reduces the time it takes to run OptiX OSL tests for the first time. Combined with the previous commits this reduces: - cycles_bake_optix_osl from 1330.44 sec to 177.30 sec - cycles_attributes_optix_osl from 2809.71 sec to 501.62 sec Measured on i9-11900K, NVIDIA RTX 6000 Ada. Pull Request: https://projects.blender.org/blender/blender/pulls/163706
24 lines
811 B
Text
24 lines
811 B
Text
/* SPDX-FileCopyrightText: 2011-2026 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
|
|
|
#define WITH_OSL
|
|
|
|
/* Shadow shading raygens for OSL, loaded as a separate optix module so they
|
|
* can be compiled in parallel with the base OSL module. */
|
|
|
|
#include "kernel/device/optix/compat.h"
|
|
#include "kernel/device/optix/globals.h"
|
|
|
|
#include "kernel/film/data_passes.h"
|
|
|
|
#include "kernel/integrator/shade_shadow.h"
|
|
|
|
extern "C" __global__ void __raygen__kernel_optix_integrator_shade_shadow()
|
|
{
|
|
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_shade_shadow(nullptr, path_index, kernel_params.render_buffer);
|
|
}
|