Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/hypercolor-daemon/benches/render_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ const FRAME_INTERVAL_MS: u32 = 16;
const BENCH_DEVICE_COUNT: usize = 3;
const BENCH_LEDS_PER_DEVICE: u32 = 120;
const CANVAS_RGBA_BYTES: u64 = 320_u64 * 200_u64 * 4;
#[cfg(feature = "wgpu")]
const EXTREME_LAYER_COUNT: usize = 12;
#[cfg(feature = "wgpu")]
const EXTREME_GRID_WIDTH: usize = 8;
#[cfg(feature = "wgpu")]
const EXTREME_ZONE_COUNT: usize = 64;
#[cfg(feature = "wgpu")]
const EXTREME_LEDS_PER_ZONE: u32 = 256;

static SILENCE: LazyLock<AudioData> = LazyLock::new(AudioData::silence);
Expand Down Expand Up @@ -236,6 +240,7 @@ fn inverse_patterned_canvas_for(width: u32, height: u32) -> Canvas {
canvas
}

#[cfg(feature = "wgpu")]
fn extreme_layer_canvas(width: u32, height: u32, variant: u32, layer: u32) -> Canvas {
let mut canvas = Canvas::new(width, height);
let red_phase = 17_u32
Expand All @@ -259,6 +264,7 @@ fn extreme_layer_canvas(width: u32, height: u32, variant: u32, layer: u32) -> Ca
canvas
}

#[cfg(feature = "wgpu")]
fn extreme_composition_plans(width: u32, height: u32) -> Vec<CompositionPlan> {
(0..4_u32)
.map(|variant| {
Expand All @@ -281,6 +287,7 @@ fn extreme_composition_plans(width: u32, height: u32) -> Vec<CompositionPlan> {
.collect()
}

#[cfg(feature = "wgpu")]
fn extreme_zones() -> Vec<Output> {
debug_assert_eq!(EXTREME_GRID_WIDTH * EXTREME_GRID_WIDTH, EXTREME_ZONE_COUNT);
let cell = 1.0_f32 / EXTREME_GRID_WIDTH as f32;
Expand Down
10 changes: 5 additions & 5 deletions crates/hypercolor-daemon/src/render_thread/display_lane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tracing::debug;

use hypercolor_core::bus::{DisplayGroupFrame, DisplayGroupOutputRoute, DisplayGroupTarget};
use hypercolor_core::types::canvas::PublishedSurface;
#[cfg(any(feature = "wgpu", test))]
#[cfg(feature = "wgpu")]
use hypercolor_types::device::DisplayFrameFormat;
use hypercolor_types::scene::{DisplayFaceTarget, ZoneId};

Expand Down Expand Up @@ -407,11 +407,11 @@ fn display_finalize_frame_to_group(
mod tests {
use std::collections::HashMap;

use hypercolor_core::bus::{
DisplayGroupFrame, DisplayGroupOutputRoute, DisplayGroupTarget, DisplayGroupViewport,
DisplayYuv420Frame,
};
#[cfg(feature = "wgpu")]
use hypercolor_core::bus::{DisplayGroupFrame, DisplayGroupTarget, DisplayYuv420Frame};
use hypercolor_core::bus::{DisplayGroupOutputRoute, DisplayGroupViewport};
use hypercolor_core::types::canvas::Canvas;
#[cfg(feature = "wgpu")]
use hypercolor_types::canvas::Rgba;
#[cfg(feature = "wgpu")]
use hypercolor_types::config::RenderAccelerationMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ use hypercolor_types::device::DisplayFrameFormat;
use hypercolor_types::effect::{ControlValue, EffectId};
use hypercolor_types::layer::MediaPlayback;
use hypercolor_types::scene::{SceneId, ZoneRole};
use hypercolor_types::spatial::{Corner, LedTopology, NormalizedPosition, Output, StripDirection};
#[cfg(feature = "wgpu")]
use hypercolor_types::spatial::Corner;
use hypercolor_types::spatial::{LedTopology, NormalizedPosition, Output, StripDirection};
use uuid::Uuid;

use super::projection::{build_group_projection, compose_authoritative_scene_canvas};
Expand Down