diff options
author | notSanil <44319106+notSanil@users.noreply.github.com> | 2022-03-10 23:13:27 +0530 |
---|---|---|
committer | notSanil <44319106+notSanil@users.noreply.github.com> | 2022-03-16 16:52:35 +0530 |
commit | 36fa7059edda0ff9347cd600490a078c2e363ed8 (patch) | |
tree | ad34a7ee64ce371fb43ade05fdf1e45b7a2c8bf4 /servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp | |
parent | 8a1c40341ca4f21ba98a9ae86d63a7fe9913ea56 (diff) |
Fix device limit exceeding for uniform buffer
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp index 8f0e1d36db..dd19b6cc4a 100644 --- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp @@ -2453,7 +2453,7 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c passes = 1; //only re-blitting is necessary } int wg_size = 64; - int wg_limit_x = RD::get_singleton()->limit_get(RD::LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X); + uint64_t wg_limit_x = RD::get_singleton()->limit_get(RD::LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X); for (int pass = 0; pass < passes; pass++) { if (p_update_light_instances) { @@ -2476,9 +2476,9 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c push_constant.cell_offset = mipmaps[i].cell_offset; push_constant.cell_count = mipmaps[i].cell_count; - int wg_todo = (mipmaps[i].cell_count - 1) / wg_size + 1; + int64_t wg_todo = (mipmaps[i].cell_count - 1) / wg_size + 1; while (wg_todo) { - int wg_count = MIN(wg_todo, wg_limit_x); + int64_t wg_count = MIN(wg_todo, wg_limit_x); RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(VoxelGIPushConstant)); RD::get_singleton()->compute_list_dispatch(compute_list, wg_count, 1, 1); wg_todo -= wg_count; @@ -2497,9 +2497,9 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c push_constant.cell_offset = mipmaps[i].cell_offset; push_constant.cell_count = mipmaps[i].cell_count; - int wg_todo = (mipmaps[i].cell_count - 1) / wg_size + 1; + int64_t wg_todo = (mipmaps[i].cell_count - 1) / wg_size + 1; while (wg_todo) { - int wg_count = MIN(wg_todo, wg_limit_x); + int64_t wg_count = MIN(wg_todo, wg_limit_x); RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(VoxelGIPushConstant)); RD::get_singleton()->compute_list_dispatch(compute_list, wg_count, 1, 1); wg_todo -= wg_count; |