@@ -35,7 +35,6 @@ class CoroutinePathTracing final : public ProgressiveIntegrator {
35
35
uint _max_depth;
36
36
uint _rr_depth;
37
37
float _rr_threshold;
38
- luisa::string _scheduler_type;
39
38
uint _samples_per_pass;
40
39
Scheduler _scheduler;
41
40
WavefrontScheduler::Config _wavefront_config;
@@ -47,7 +46,6 @@ class CoroutinePathTracing final : public ProgressiveIntegrator {
47
46
_max_depth{std::max (desc->property_uint_or_default (" depth" , 10u ), 1u )},
48
47
_rr_depth{std::max (desc->property_uint_or_default (" rr_depth" , 0u ), 0u )},
49
48
_rr_threshold{std::max (desc->property_float_or_default (" rr_threshold" , 0 .95f ), 0 .05f )},
50
- _scheduler_type{desc->property_string_or_default (" scheduler_type" , " wavefront" )},
51
49
_samples_per_pass{std::max (desc->property_uint_or_default (" samples_per_pass" , 16u ), 1u )},
52
50
_scheduler{[&] {
53
51
auto s = desc->property_string_or_default (
@@ -88,7 +86,6 @@ class CoroutinePathTracing final : public ProgressiveIntegrator {
88
86
[[nodiscard]] auto max_depth () const noexcept { return _max_depth; }
89
87
[[nodiscard]] auto rr_depth () const noexcept { return _rr_depth; }
90
88
[[nodiscard]] auto rr_threshold () const noexcept { return _rr_threshold; }
91
- [[nodiscard]] auto scheduler_type () const noexcept { return _scheduler_type; }
92
89
[[nodiscard]] auto samples_per_pass () const noexcept { return _samples_per_pass; }
93
90
[[nodiscard]] luisa::string_view impl_type () const noexcept override { return LUISA_RENDER_PLUGIN_NAME; }
94
91
[[nodiscard]] luisa::unique_ptr<Integrator::Instance> build (
@@ -272,11 +269,12 @@ class CoroutinePathTracingInstance final : public ProgressiveIntegrator::Instanc
272
269
273
270
// evaluate material
274
271
auto surface_tag = it->shape ().surface_tag ();
275
- if (node<CoroutinePathTracing>()-> scheduler_type () == " wavefront " ) {
276
- $ suspend ( " evaluate_surface " , std::pair (surface_tag, " coro_hint " ));
277
- } else {
278
- $suspend ( " evaluate_surface " );
272
+ if (auto pt = node<CoroutinePathTracing>();
273
+ pt-> scheduler () == CoroutinePathTracing::Scheduler::Wavefront &&
274
+ !pt-> wavefront_config (). hint_fields . empty ()) {
275
+ $promise ( " coro_hint " , surface_tag );
279
276
}
277
+ $suspend (" evaluate_surface" );
280
278
swl = sample_wl ();
281
279
auto wo = -ray->direction ();
282
280
auto u_lobe = sampler ()->generate_1d ();
0 commit comments