Fix Cycles OptiX runtime compilation broken after shader raytracing

Need to pass the appropriate flags as we do for compilation as part of the
CMake build.
This commit is contained in:
Brecht Van Lommel 2020-12-22 15:07:53 +01:00
parent dad5aded0c
commit b2edc716c1
1 changed files with 8 additions and 0 deletions

View File

@ -314,6 +314,14 @@ class OptiXDevice : public CUDADevice {
common_cflags += string_printf(" -I\"%s/include\"", optix_sdk_path);
}
// Specialization for shader raytracing
if (requested_features.use_shader_raytrace) {
common_cflags += " --keep-device-functions";
}
else {
common_cflags += " -D __NO_SHADER_RAYTRACE__";
}
return common_cflags;
}