From cf4ad5573c27d112aa0204c6d03183ef8a5277fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Dec 2025 23:53:44 +0000 Subject: [PATCH 1/4] Initial plan From 46d2be400acfd6125d06b29395d599ed517190f2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Dec 2025 23:57:28 +0000 Subject: [PATCH 2/4] Fix serious logic errors: resolution calculation and memory tracking Co-authored-by: vmanam0451 <25410102+vmanam0451@users.noreply.github.com> --- path-tracer-core/src/processors/master/master.cpp | 2 +- .../preprocessor-function/preprocess/preprocessor.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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..d000e2b 100644 --- a/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py +++ b/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py @@ -51,6 +51,7 @@ def get_split_scene(self) -> SplitScene: prim_size = self.get_primitive_size(primitive) * 1e-9 print(prim_size) total_size += prim_size + current_size += prim_size if current_worker_id not in split_scene['split_work']: split_scene['split_work'][current_worker_id] = {"work": {}, "total_size": 0} @@ -61,7 +62,7 @@ def get_split_scene(self) -> SplitScene: work[mesh.name].append(prim_id) worker_info['total_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): From 73058a5130e521bc578ee9bba876f93db2a0af0f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Dec 2025 23:58:52 +0000 Subject: [PATCH 3/4] Fix memory tracking: increment current_size after adding primitive to worker Co-authored-by: vmanam0451 <25410102+vmanam0451@users.noreply.github.com> --- .../preprocessor-function/preprocess/preprocessor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py b/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py index d000e2b..6a85ce7 100644 --- a/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py +++ b/path-tracer-preprocessor/preprocessor-function/preprocess/preprocessor.py @@ -51,7 +51,6 @@ def get_split_scene(self) -> SplitScene: prim_size = self.get_primitive_size(primitive) * 1e-9 print(prim_size) total_size += prim_size - current_size += prim_size if current_worker_id not in split_scene['split_work']: split_scene['split_work'][current_worker_id] = {"work": {}, "total_size": 0} @@ -61,6 +60,7 @@ 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 >= self.memory_per_worker_GB) or \ (self.num_workers is not None and (current_primitive >= total_primitives / self.num_workers) and From 249b5f7379d4d32880c090d4da32be621eff1495 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 00:00:04 +0000 Subject: [PATCH 4/4] Complete code review: all serious logic errors fixed and validated Co-authored-by: vmanam0451 <25410102+vmanam0451@users.noreply.github.com> --- _codeql_detected_source_root | 1 + 1 file changed, 1 insertion(+) create mode 120000 _codeql_detected_source_root 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