Clean up compiler warnings.
This commit is contained in:
parent
2a0ca001e2
commit
c4b8971805
|
@ -13,12 +13,11 @@ use crate::{
|
||||||
lerp::lerp_slice,
|
lerp::lerp_slice,
|
||||||
math::Vector,
|
math::Vector,
|
||||||
ray::{RayBatch, RayStack},
|
ray::{RayBatch, RayStack},
|
||||||
timer::Timer,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
bvh_base::{BVHBase, BVHBaseNode, BVH_MAX_DEPTH},
|
bvh_base::{BVHBase, BVHBaseNode, BVH_MAX_DEPTH},
|
||||||
ACCEL_NODE_RAY_TESTS, ACCEL_TRAV_TIME,
|
ACCEL_NODE_RAY_TESTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
use bvh_order::{calc_traversal_code, SplitAxes, TRAVERSAL_TABLE};
|
use bvh_order::{calc_traversal_code, SplitAxes, TRAVERSAL_TABLE};
|
||||||
|
|
|
@ -21,7 +21,6 @@ pub use self::{
|
||||||
|
|
||||||
// Track BVH traversal time
|
// Track BVH traversal time
|
||||||
thread_local! {
|
thread_local! {
|
||||||
pub static ACCEL_TRAV_TIME: Cell<f64> = Cell::new(0.0);
|
|
||||||
pub static ACCEL_NODE_RAY_TESTS: Cell<u64> = Cell::new(0);
|
pub static ACCEL_NODE_RAY_TESTS: Cell<u64> = Cell::new(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ use scoped_threadpool::Pool;
|
||||||
use float4::Float4;
|
use float4::Float4;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
accel::{ACCEL_NODE_RAY_TESTS, ACCEL_TRAV_TIME},
|
accel::ACCEL_NODE_RAY_TESTS,
|
||||||
color::{map_0_1_to_wavelength, SpectralSample, XYZ},
|
color::{map_0_1_to_wavelength, SpectralSample, XYZ},
|
||||||
fp_utils::robust_ray_origin,
|
fp_utils::robust_ray_origin,
|
||||||
hash::hash_u32,
|
hash::hash_u32,
|
||||||
|
@ -40,7 +40,6 @@ pub struct Renderer<'a> {
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct RenderStats {
|
pub struct RenderStats {
|
||||||
pub trace_time: f64,
|
pub trace_time: f64,
|
||||||
pub accel_traversal_time: f64,
|
|
||||||
pub accel_node_visits: u64,
|
pub accel_node_visits: u64,
|
||||||
pub ray_count: u64,
|
pub ray_count: u64,
|
||||||
pub initial_ray_generation_time: f64,
|
pub initial_ray_generation_time: f64,
|
||||||
|
@ -53,7 +52,6 @@ impl RenderStats {
|
||||||
fn new() -> RenderStats {
|
fn new() -> RenderStats {
|
||||||
RenderStats {
|
RenderStats {
|
||||||
trace_time: 0.0,
|
trace_time: 0.0,
|
||||||
accel_traversal_time: 0.0,
|
|
||||||
accel_node_visits: 0,
|
accel_node_visits: 0,
|
||||||
ray_count: 0,
|
ray_count: 0,
|
||||||
initial_ray_generation_time: 0.0,
|
initial_ray_generation_time: 0.0,
|
||||||
|
@ -65,7 +63,6 @@ impl RenderStats {
|
||||||
|
|
||||||
fn collect(&mut self, other: RenderStats) {
|
fn collect(&mut self, other: RenderStats) {
|
||||||
self.trace_time += other.trace_time;
|
self.trace_time += other.trace_time;
|
||||||
self.accel_traversal_time += other.accel_traversal_time;
|
|
||||||
self.accel_node_visits += other.accel_node_visits;
|
self.accel_node_visits += other.accel_node_visits;
|
||||||
self.ray_count += other.ray_count;
|
self.ray_count += other.ray_count;
|
||||||
self.initial_ray_generation_time += other.initial_ray_generation_time;
|
self.initial_ray_generation_time += other.initial_ray_generation_time;
|
||||||
|
@ -348,10 +345,6 @@ impl<'a> Renderer<'a> {
|
||||||
|
|
||||||
stats.total_time += total_timer.tick() as f64;
|
stats.total_time += total_timer.tick() as f64;
|
||||||
stats.ray_count = tracer.rays_traced();
|
stats.ray_count = tracer.rays_traced();
|
||||||
ACCEL_TRAV_TIME.with(|att| {
|
|
||||||
stats.accel_traversal_time = att.get();
|
|
||||||
att.set(0.0);
|
|
||||||
});
|
|
||||||
ACCEL_NODE_RAY_TESTS.with(|anv| {
|
ACCEL_NODE_RAY_TESTS.with(|anv| {
|
||||||
stats.accel_node_visits = anv.get();
|
stats.accel_node_visits = anv.get();
|
||||||
anv.set(0);
|
anv.set(0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user