Skip to content

Commit

Permalink
Refactored to create single kernel structure; deleted cpu version as …
Browse files Browse the repository at this point in the history
…I need to start over on it
  • Loading branch information
rchiaramo committed Sep 26, 2024
1 parent 2185fda commit 09c274e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 75 deletions.
64 changes: 0 additions & 64 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[workspace]

members = [
"cpu_wavefront_pt",
"gpu_wavefront_pt",
"wavefront_common",
]
Expand Down
11 changes: 1 addition & 10 deletions gpu_wavefront_pt/src/path_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use wavefront_common::parameters::{RenderParameters, RenderProgress, SPF, SPP};
use wavefront_common::projection_matrix::ProjectionMatrix;
use wavefront_common::scene::Scene;
use wavefront_common::ray::Ray;
use wgpu::{BufferUsages, Device, Maintain};
use wgpu::{BufferUsages};
use winit::event::WindowEvent;
use wavefront_common::wgpu_state::WgpuState;
use crate::display::DisplayKernel;
Expand Down Expand Up @@ -279,15 +279,6 @@ impl PathTracer {
pub fn run(&mut self) {
self.update_buffers();

let workgroup_size = |x:u32| {
let x_over_32 = x.div_ceil(32);
let y = (x_over_32 as f32).sqrt().ceil() as u32;
let fac = (1..y).rev().find(|z| { x_over_32 % z == 0 }).unwrap();
if (x_over_32 / fac) >= (1<<16) { (y, y) } else {
(fac, x_over_32 / fac)
}
};

let workgroup_size_64 = |x:u32| {
let x_over_64 = x.div_ceil(64);
let y = (x_over_64 as f32).sqrt().ceil() as u32;
Expand Down

0 comments on commit 09c274e

Please sign in to comment.