diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-02 07:10:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-02 07:10:20 +0200 |
commit | 8de2cc04a725945e61f7a45c3c1d6cab761cc9e2 (patch) | |
tree | f757c4c7441cdc9a2d0fddaa77459c3abdc3ce51 /servers/rendering | |
parent | 8243c7ab5df9d341209d339ab001fd8e49ee95b3 (diff) | |
parent | 2df767d31eb0994c6e9dae2758a9d535b5b51b8f (diff) |
Merge pull request #63793 from RandomShaper/fix_unbound_resource
Fix uniform set creation error due to null RID
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp index 7eddc1fb5b..827cce6047 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp @@ -2662,7 +2662,11 @@ RID RenderForwardClustered::_setup_sdfgi_render_pass_uniform_set(RID p_albedo_te RD::Uniform u; u.binding = 1; u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER; - u.append_id(scene_state.instance_buffer[RENDER_LIST_SECONDARY]); + RID instance_buffer = scene_state.instance_buffer[RENDER_LIST_SECONDARY]; + if (instance_buffer == RID()) { + instance_buffer = scene_shader.default_vec4_xform_buffer; // any buffer will do since its not used + } + u.append_id(instance_buffer); uniforms.push_back(u); } { |