0de1cea5c556f463386f2448dd0eea4cc0ed4092
Based on #123377 by @brecht, but Gitea doesn't like the rebase these so here's a new PR. The purpose here is to switch to fused OptiX programs for OSL execution on CUDA. On the one hand, this makes the code easier since, but there's also another advantage - how memory allocation is managed. OSL shaders need memory to store intermediate values, but how much is needed depends on the complexity of the shader. With the split program approach, Cycles had to provide that memory, so we had to allocate a certain amount (2 KiB, to be precise) statically and show an error if the shader would need more. If the shader used less (which is the case for the vast majority), the memory was just wasted. By switching to fused kernels, OSL knows the required amount during JIT codegen, so it can allocate only what's required, which avoids this waste. One still needs to set a maximum, and in theory, OSL would also support spilling over into a Cycles-provided alternative memory region. However, we currently don't implement that - instead, we default to the same 2048 limit as before and let advanced users override it via the CYCLES_OSL_GROUPDATA_ALLOC environment variable if really needed. Co-authored-by: Brecht Van Lommel <brecht@blender.org> Pull Request: https://projects.blender.org/blender/blender/pulls/130149
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
