Skip to content

Commit

Permalink
revert extraneous changes
Browse files Browse the repository at this point in the history
  • Loading branch information
turbocrime committed Jan 1, 2025
1 parent 31b3e47 commit 9505522
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion naga/src/front/wgsl/lower/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {
let mut emitter = Emitter::default();
emitter.start(&ctx.function.expressions);

self.call(
let _ = self.call(
stmt.span,
function,
arguments,
Expand Down
25 changes: 10 additions & 15 deletions naga/src/valid/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1141,16 +1141,15 @@ impl super::Validator {
function,
ref arguments,
result,
} => {
stages &= self
.validate_call(function, arguments, result, context)
.or_else(|error| {
return Err(error.and_then(|error| {
FunctionError::InvalidCall { function, error }
.with_span_static(span, "invalid function call")
}));
})?;
}
} => match self.validate_call(function, arguments, result, context) {
Ok(callee_stages) => stages &= callee_stages,
Err(error) => {
return Err(error.and_then(|error| {
FunctionError::InvalidCall { function, error }
.with_span_static(span, "invalid function call")
}))
}
},
S::Atomic {
pointer,
ref fun,
Expand Down Expand Up @@ -1328,7 +1327,6 @@ impl super::Validator {
}
}
}

Ok(BlockInfo { stages, finished })
}

Expand All @@ -1340,8 +1338,6 @@ impl super::Validator {
let base_expression_count = self.valid_expression_list.len();
let info = self.validate_block_impl(statements, context)?;
for handle in self.valid_expression_list.drain(base_expression_count..) {
//let expr = &context.expressions[handle];
//eprintln!("valid_expression_set remove {handle:?} {expr:?}");
self.valid_expression_set.remove(handle);
}
Ok(info)
Expand Down Expand Up @@ -1484,10 +1480,9 @@ impl super::Validator {
}

if self.flags.contains(super::ValidationFlags::BLOCKS) {
let body = &fun.body;
let stages = self
.validate_block(
body,
&fun.body,
&BlockContext::new(fun, module, &info, &mod_info.functions),
)?
.stages;
Expand Down

0 comments on commit 9505522

Please sign in to comment.