diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 0000000..5a1e124 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +./path-tracer-core \ No newline at end of file diff --git a/path-tracer-core/src/processors/master/master.cpp b/path-tracer-core/src/processors/master/master.cpp index 673cc1b..c7c47e0 100644 --- a/path-tracer-core/src/processors/master/master.cpp +++ b/path-tracer-core/src/processors/master/master.cpp @@ -20,7 +20,7 @@ master::~master() void master::run() { this->resolution = - math::uvec2((m_worker_info.max_x - m_worker_info.min_x), (m_worker_info.max_y - m_worker_info.min_y)); + math::uvec2((m_worker_info.max_x - m_worker_info.min_x) + 1, (m_worker_info.max_y - m_worker_info.min_y) + 1); this->sample_count = m_worker_info.samples; this->m_should_terminate = false; this->m_completed_rays = 0; diff --git a/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py b/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py index 5d45b9b..6a85ce7 100644 --- a/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py +++ b/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py @@ -60,8 +60,9 @@ def get_split_scene(self) -> SplitScene: if mesh.name not in work: work[mesh.name] = [] work[mesh.name].append(prim_id) worker_info['total_size'] += prim_size + current_size += prim_size - if (self.memory_per_worker_GB is not None and (current_size + prim_size) >= self.memory_per_worker_GB) or \ + if (self.memory_per_worker_GB is not None and current_size >= self.memory_per_worker_GB) or \ (self.num_workers is not None and (current_primitive >= total_primitives / self.num_workers) and current_worker_id < self.num_workers):