use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use concinnity_engine::shutdown::ShutdownToken;
use crate::gfx::streaming_system::StreamingStats;
#[derive(Default)]
pub(crate) struct DebugState {
pub(super) frame: u64,
pub(super) system_count: usize,
pub(super) component_count: usize,
pub(super) systems: Vec<String>,
pub(super) assets: Vec<AssetEntry>,
pub(super) names: Arc<Vec<String>>,
pub(super) streaming: StreamingStats,
pub(super) scratch: concinnity_engine::ecs::ScratchStats,
pub(super) profile_systems: Vec<(String, u32)>,
pub(super) profile_allocs: Vec<(String, u32)>,
pub(super) profile_frame_allocs: Option<u32>,
pub(super) profile_render: crate::gfx::profile::RenderStats,
pub(super) shutdown_token: Option<ShutdownToken>,
pub(super) shader_reload: Option<Arc<AtomicBool>>,
pub(super) asset_reload: Option<Arc<AtomicBool>>,
pub(super) camera: Option<CameraSnapshot>,
pub(super) budget: Option<BudgetSnapshot>,
pub(super) streaming_pressure: Option<PressureSnapshot>,
}
#[derive(Clone, Default, serde::Serialize)]
pub(crate) struct BudgetSnapshot {
pub(super) total_cores: usize,
pub(super) job_threads: usize,
pub(super) total_ram_mib: Option<u64>,
pub(super) budget_mib: u64,
pub(super) overridden: bool,
pub(super) rss_mib: Option<u64>,
}
#[derive(Clone, Copy, Default, serde::Serialize)]
pub(crate) struct PressureSnapshot {
pub(super) rss_bytes: u64,
pub(super) budget_bytes: u64,
pub(super) under_pressure: bool,
}
#[derive(Clone, serde::Serialize)]
pub(crate) struct CameraSnapshot {
pub(super) position: [f32; 3],
pub(super) yaw: f32,
pub(super) pitch: f32,
pub(super) fov_y_degrees: f32,
pub(super) near: f32,
pub(super) far: f32,
}
#[derive(Clone, serde::Serialize)]
pub(crate) struct AssetEntry {
pub(super) discriminant: u8,
pub(super) count: u32,
}