@@ -1126,8 +1126,7 @@ void schedule_render_jobs(ThreadPool &threads, Ray::RendererBase &renderer, cons
11261126 auto render_job = [&](const int j, const int portion) {
11271127#if defined(_WIN32)
11281128 if (g_catch_flt_exceptions) {
1129- unsigned old_value;
1130- _controlfp_s (&old_value, _EM_INEXACT | _EM_UNDERFLOW | _EM_OVERFLOW, _MCW_EM);
1129+ _controlfp_s (nullptr , _EM_INEXACT | _EM_UNDERFLOW | _EM_OVERFLOW, _MCW_EM);
11311130 }
11321131#endif
11331132 for (int i = 0 ; i < portion; ++i) {
@@ -1138,9 +1137,7 @@ void schedule_render_jobs(ThreadPool &threads, Ray::RendererBase &renderer, cons
11381137 auto denoise_job_nlm = [&](const int j) {
11391138#if defined(_WIN32)
11401139 if (g_catch_flt_exceptions) {
1141- unsigned old_value;
1142- // _controlfp_s(&old_value, _EM_INEXACT | _EM_UNDERFLOW | _EM_OVERFLOW, _MCW_EM);
1143- _controlfp_s (&old_value, _EM_INEXACT | _EM_UNDERFLOW | _EM_OVERFLOW | _EM_INVALID, _MCW_EM);
1140+ _controlfp_s (nullptr , _EM_INEXACT | _EM_UNDERFLOW | _EM_OVERFLOW | _EM_INVALID, _MCW_EM);
11441141 }
11451142#endif
11461143 renderer.DenoiseImage (region_contexts[j]);
@@ -1149,8 +1146,7 @@ void schedule_render_jobs(ThreadPool &threads, Ray::RendererBase &renderer, cons
11491146 auto denoise_job_unet = [&](const int pass, const int j) {
11501147#if defined(_WIN32)
11511148 if (g_catch_flt_exceptions) {
1152- unsigned old_value;
1153- _controlfp_s (&old_value, _EM_INEXACT | _EM_UNDERFLOW | _EM_OVERFLOW, _MCW_EM);
1149+ _controlfp_s (nullptr , _EM_INEXACT | _EM_UNDERFLOW | _EM_OVERFLOW, _MCW_EM);
11541150 }
11551151#endif
11561152 renderer.DenoiseImage (pass, region_contexts[j]);
0 commit comments