Skip to content

Commit ac7958b

Browse files
committed
linux compile fix
1 parent ac0e461 commit ac7958b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/OpenCOVER/plugins/hlrs/LamurePointCloud/rendering/src/gpu_context.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)