From b168a833af0825c4bf8fe54a74e16360e34a077b Mon Sep 17 00:00:00 2001 From: Patrick Mours Date: Thu, 9 Oct 2025 17:08:22 +0200 Subject: [PATCH] Cycles: Fix OptiX context log no longer showing up Commit 8392ca915b1bc39540cad10a194d547c7f9f62c9 removed WITH_CYCLES_LOGGING, but missed that the OptiX context log was conditionally compiled depending on that definition, so this fixes that. Pull Request: https://projects.blender.org/blender/blender/pulls/147706 --- intern/cycles/device/optix/device_impl.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/intern/cycles/device/optix/device_impl.cpp b/intern/cycles/device/optix/device_impl.cpp index d28afbdd2c7..9edc872bd65 100644 --- a/intern/cycles/device/optix/device_impl.cpp +++ b/intern/cycles/device/optix/device_impl.cpp @@ -63,7 +63,6 @@ OptiXDevice::OptiXDevice(const DeviceInfo &info, Stats &stats, Profiler &profile /* Create OptiX context for this device. */ OptixDeviceContextOptions options = {}; -# ifdef WITH_CYCLES_LOGGING options.logCallbackLevel = 4; /* Fatal = 1, Error = 2, Warning = 3, Print = 4. */ options.logCallbackFunction = [](unsigned int level, const char *, const char *message, void *) { switch (level) { @@ -77,22 +76,19 @@ OptiXDevice::OptiXDevice(const DeviceInfo &info, Stats &stats, Profiler &profile LOG_WARNING << message; break; case 4: - LOG_INFO << message; + LOG_DEBUG << message; break; default: break; } }; -# endif if (DebugFlags().optix.use_debug) { LOG_INFO << "Using OptiX debug mode."; options.validationMode = OPTIX_DEVICE_CONTEXT_VALIDATION_MODE_ALL; } optix_assert(optixDeviceContextCreate(cuContext, &options, &context)); -# ifdef WITH_CYCLES_LOGGING optix_assert(optixDeviceContextSetLogCallback( context, options.logCallbackFunction, options.logCallbackData, options.logCallbackLevel)); -# endif /* Fix weird compiler bug that assigns wrong size. */ launch_params.data_elements = sizeof(KernelParamsOptiX);