Skip to content

Commit

Permalink
support for module comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Oct 10, 2024
1 parent 86b89c8 commit 6330223
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/compose/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,6 @@ impl Composer {
}
})?,
};

Ok(IrBuildResult {
module,
start_offset,
Expand Down Expand Up @@ -964,7 +963,6 @@ impl Composer {
module_definition.name,
source.len()
);

let IrBuildResult {
module: mut source_ir,
start_offset,
Expand Down Expand Up @@ -1164,7 +1162,6 @@ impl Composer {
}
// Copy comments, should be done after each commented item has been imported.
module_builder.import_comments(&source_ir.comments);

let module_ir = module_builder.into_module_with_entrypoints();
let mut header_ir: naga::Module = header_builder.into();

Expand Down
2 changes: 2 additions & 0 deletions src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,9 @@ impl<'a> DerivedModule<'a> {
constants,
global_variables,
struct_members,
module,
} = comments;
self.comments.module = module.clone();
for comment in types.iter() {
if let Some(new_handle) = self.type_map.get(comment.0) {
self.comments.types.insert(*new_handle, comment.1.clone());
Expand Down

0 comments on commit 6330223

Please sign in to comment.