Skip to content

Commit

Permalink
fixup! [const-eval] add wgsl/glsl behavior switch to evaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblandy committed Oct 10, 2023
1 parent 53867cf commit eb6a862
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/proc/constant_evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ impl<'a> ConstantEvaluator<'a> {
pub fn for_wgsl_module(module: &'a mut crate::Module) -> Self {
Self::for_module(Behavior::Wgsl, module)
}

pub fn for_glsl_module(module: &'a mut crate::Module) -> Self {
Self::for_module(Behavior::Glsl, module)
}

fn for_module(behavior: Behavior, module: &'a mut crate::Module) -> Self {
Self {
behavior,
Expand All @@ -181,6 +183,7 @@ impl<'a> ConstantEvaluator<'a> {
block,
)
}

pub fn for_glsl_function(
module: &'a mut crate::Module,
expressions: &'a mut Arena<Expression>,
Expand All @@ -197,6 +200,7 @@ impl<'a> ConstantEvaluator<'a> {
block,
)
}

fn for_function(
behavior: Behavior,
module: &'a mut crate::Module,
Expand Down

0 comments on commit eb6a862

Please sign in to comment.