Skip to content

Commit

Permalink
Fix unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
antaalt committed Mar 26, 2024
1 parent a53f247 commit c8d787b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
6 changes: 4 additions & 2 deletions src/gfx/graphic_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,14 @@ impl GraphicPass {
}
self.desc.shader_resource_view[index as usize] = srv;
}
pub fn set_render_target(&mut self, index: u32, rt : &AttachmentDescription) {
pub fn set_render_target(&mut self, index: u32, width : u32, height: u32) {
let mut rt = AttachmentDescription::default();
rt.set_size(width, height);
if index as usize >= self.desc.render_target_desc.len() {
self.desc.render_target_desc.resize(index as usize + 1, AttachmentDescription::default());
self.dirty = true;
}
if self.desc.render_target_desc[index as usize] != *rt {
if self.desc.render_target_desc[index as usize] != rt {
self.desc.render_target_desc[index as usize] = rt.clone();
self.dirty = true;
}
Expand Down
8 changes: 0 additions & 8 deletions src/gfx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,5 @@ pub use self::camera::Camera;
pub use self::mesh::Mesh;
pub use self::shader::Shader;

pub use self::backbuffer::BackbufferPassDescription;
pub use self::graphic_pass::GraphicPassDescription;
pub use self::graphic_pass::AttachmentDescription;
pub use self::compute_pass::ComputePassDescription;
pub use self::buffer::BufferDescription;
pub use self::texture::TextureDescription;
pub use self::camera::CameraDescription;
pub use self::mesh::MeshDescription;
pub use self::mesh::MeshSource;
pub use self::mesh::MeshShape;
4 changes: 1 addition & 3 deletions src/graph/nodes/graphic_pass_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ impl ProtosNode for GraphicPassNode {
let num_attachment = 1;
for i in 0..num_attachment {
// Should gather these informations from a evaluate_output. -> reach output node, read its data & select informations.
let mut desc = gfx::AttachmentDescription::default();
desc.set_size(available_size.x as u32, available_size.y as u32);
pass.set_render_target(i, &desc);
pass.set_render_target(i, available_size.x as u32, available_size.y as u32);
}
{
let vertex = self.evaluate_input(device, queue, graph, node_id, available_size, GraphicPassNodeInput::VertexShader.to_string(), outputs_cache)?.try_to_shader()?;
Expand Down

0 comments on commit c8d787b

Please sign in to comment.