Add todo panic in code when window is resized

This commit is contained in:
SeanOMik 2024-06-16 20:05:04 -04:00
parent 33358662e2
commit 5fc1a0f134
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
1 changed files with 10 additions and 5 deletions

View File

@ -1,15 +1,14 @@
use std::{mem, rc::Rc};
use glam::Vec2Swizzles;
use lyra_ecs::World;
use lyra_game_derive::RenderGraphLabel;
use wgpu::util::DeviceExt;
use crate::render::{
graph::{
RenderGraphContext, Node, NodeDesc, NodeType, SlotAttribute,
SlotValue,
},
resource::{ComputePipelineDescriptor, PipelineDescriptor, Shader},
Node, NodeDesc, NodeType, RenderGraphContext, SlotAttribute, SlotValue
}, renderer::ScreenSize, resource::{ComputePipelineDescriptor, PipelineDescriptor, Shader}
};
use super::{BasePassSlots, LightBasePassSlots};
@ -216,8 +215,14 @@ impl Node for LightCullComputePass {
desc
}
fn prepare(&mut self, _world: &mut World, context: &mut RenderGraphContext) {
fn prepare(&mut self, world: &mut World, context: &mut RenderGraphContext) {
context.queue_buffer_write_with(LightCullComputePassSlots::IndexCounterBuffer, 0, 0);
let screen_size = world.get_resource::<ScreenSize>();
if screen_size.xy() != self.workgroup_size {
self.workgroup_size = screen_size.xy();
todo!("Resize buffers and other resources");
}
}
fn execute(