OverviewFilesCommitsIssuesDocsReleasesPeers

nvidia-rtx-godot commits / d705ce5

Guard against binding a null TLAS uniform set (crash guard, not a fix)
build_tlas() returns nullptr when p_render_data->rt_instances is empty, and rt_uniform_set is only assigned when it succeeds — but the trace-dispatch block below never tested for that and bound the null set anyway: ERROR: Parameter "uniform_set" is null. at: raytracing_list_bind_uniform_set which took the process down on launch with path tracing enabled. The bindless set (index 1) already has exactly this guard, with a comment noting it can legitimately be unset; set 0 did not. Skip the trace for that frame instead. ERR_PRINT_ONCE so the underlying condition stays visible rather than being silently swallowed. EXPLICITLY NOT A FIX for the root cause. If this guard trips, path tracing renders nothing and the real question is why the TLAS had no instances. That is unresolved: it does NOT reproduce in an editor build (verified — pathtracing_enabled with both PT_DENOISER_NONE and PT_DENOISER_DLSS_RAY_RECONSTRUCTION survived 40 frames cleanly), only in template_release, which is the same debug-vs-release divergence class as the max_index BLAS bug fixed in 736076e5c1 — and it means editor-based probes cannot see it. Next step is tracing where p_rt_instances is populated during culling and why it would be empty in a release build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
d705ce59a59b72a983987ce213c87623c88b3a38
by plankatron <fleeky@gmail.com> · 2026-07-28T23:15:54.000Z

Changed files (1) +13 -0

servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp +13 -0
……@@ -2524,6 +2524,19 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
25242524 ERR_PRINT_ONCE_ED("Failed to get raytracing pipeline. Aborting render.");
25252525 return;
25262526 }
2527 // Set 0 can be unset: build_tlas returns nullptr when p_render_data->rt_instances
2528 // is empty, and rt_uniform_set is only assigned when it succeeds — but this
2529 // dispatch block does not test for that, so it bound a null set and
2530 // raytracing_list_bind_uniform_set took the process down. Skip the frame
2531 // instead, exactly as the bindless set below already does.
2532 //
2533 // NOTE: this is a CRASH GUARD, not a fix. If it trips, path tracing renders
2534 // nothing that frame and the real question is why the TLAS had no instances.
2535 if (!rt_uniform_set.is_valid()) {
2536 ERR_PRINT_ONCE("Raytracing: no TLAS uniform set (empty rt_instances?) — skipping trace.");
2537 RD::get_singleton()->draw_command_end_label();
2538 return;
2539 }
25272540 RD::RaytracingListID raytracing_list = RD::get_singleton()->raytracing_list_begin();
25282541 RD::get_singleton()->raytracing_list_bind_raytracing_pipeline(raytracing_list, rt_pipeline);
25292542 RD::get_singleton()->raytracing_list_bind_uniform_set(raytracing_list, rt_uniform_set, 0);