With D8013 performance of curve rendering has decreased noticeably with CUDA and OptiX. However, OptiX recently added support for curves natively, which when used would avoid having to try and optimize the curve intersection algorithm from Embree for the GPU (which could turn out rather difficult without changing some of its core principles).
This patch adds support for the curve primitive from OptiX to Cycles. It's currently hidden behind a debug option, since there can be some slight rendering differences still (because no backface culling is performed and something seems off with endcaps). The curve primitive was added with the OptiX 7.1 SDK and requires a r450 driver or newer (Windows 451.48+, Linux 450.51+), so this patch also updates the codebase to be able to build with the new SDK (but retains support for building with 7.0 too, so not to break existing build configurations).
Performance is substantially better (up to 40%) and even surpasses rounded ribbons in certain cases. I tested against the test suite and the overall results are the same too, with the exception of some small image differences as noted before (so motion blur etc. works).
| Rounded Ribbons | 3D Curves | 3D Curves (Native OptiX Curve Primitive) | |
| koro (200 samples) | 00:29 | 00:41 | 00:26 |
| fishy_cat (1000 samples) | 00:33 | 00:41 | 00:35 |
To build make sure the OptiX SDK (https://developer.nvidia.com/designworks/optix/download) and relevant CMake variables were updated to point to OptiX 7.1.





