mirror of
https://github.com/vladtrc/iw4L
synced 2026-10-26 18:25:39 -04:00
38aa9cf741
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.2 KiB
Rust
33 lines
1.2 KiB
Rust
use bevy::prelude::*;
|
|
|
|
pub struct RenderGpuPlugin;
|
|
|
|
impl Plugin for RenderGpuPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
match crate::SamplerTable::captured_2026_08_11() {
|
|
Ok(table) => {
|
|
let adapted = table.host_adapted_rows();
|
|
if !adapted.is_empty() {
|
|
diag::warn!(
|
|
World,
|
|
"drawsurf sampler host adaptation: {} of 24 table rows lift mip filter to linear for anisotropy (rows={adapted:?})",
|
|
adapted.len()
|
|
);
|
|
}
|
|
app.insert_resource(table);
|
|
}
|
|
Err(cause) => diag::warn!(World, "drawsurf sampler profile: cause={cause:?}"),
|
|
}
|
|
crate::drawsurf::register_drawsurf_render(app);
|
|
app.init_resource::<crate::GpuSubmitReady>()
|
|
.init_resource::<crate::ColourWorkingSet>();
|
|
let Some(render_app) = app.get_sub_app_mut(bevy::render::RenderApp) else {
|
|
return;
|
|
};
|
|
render_app
|
|
.init_resource::<crate::GpuSubmitReady>()
|
|
.init_resource::<crate::ColourWorkingSet>()
|
|
.init_resource::<crate::WorldPipelineWarmup>();
|
|
}
|
|
}
|