File tree Expand file tree Collapse file tree
src/OpenCOVER/plugins/hlrs/LamurePointCloud/rendering/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,12 +121,18 @@ void gpu_context::test_video_memory(scm::gl::render_device_ptr device)
121121 std::cout << " ##### " << policy->render_budget_in_mb () << " MB will be used for the render budget #####" << std::endl;
122122 }
123123 long node_size_total = database->get_slot_size ();
124- render_budget_in_nodes_ = (render_budget_in_mb * 1024 * 1024 ) / node_size_total;
124+ if (node_size_total==0 )
125+ render_budget_in_nodes_ = 0 ;
126+ else
127+ render_budget_in_nodes_ = (render_budget_in_mb * 1024 * 1024 ) / node_size_total;
125128
126129 size_t max_upload_budget_in_mb = policy->max_upload_budget_in_mb ();
127130 max_upload_budget_in_mb = max_upload_budget_in_mb < LAMURE_MIN_UPLOAD_BUDGET ? LAMURE_MIN_UPLOAD_BUDGET : max_upload_budget_in_mb;
128131 max_upload_budget_in_mb = max_upload_budget_in_mb > video_ram_free_in_mb * 0.125 ? video_ram_free_in_mb * 0.125 : max_upload_budget_in_mb;
129132
133+ if (node_size_total==0 )
134+ upload_budget_in_nodes_ = 0 ;
135+ else
130136 upload_budget_in_nodes_ = (max_upload_budget_in_mb * 1024u * 1024u ) / node_size_total;
131137
132138
You can’t perform that action at this time.
0 commit comments