Skip to content

Commit

Permalink
[glsl-in] Only add builtins with double arguments if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
JCapucho authored and kvark committed Aug 18, 2021
1 parent b05ca6e commit 4e181d6
Show file tree
Hide file tree
Showing 5 changed files with 1,268 additions and 1,099 deletions.
12 changes: 11 additions & 1 deletion src/front/glsl/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl fmt::Debug for FunctionKind {
}

#[derive(Debug)]
pub struct FunctionDeclaration {
pub struct Overload {
/// Normalized function parameters, modifiers are not applied
pub parameters: Vec<Handle<Type>>,
pub parameters_info: Vec<ParameterInfo>,
Expand All @@ -59,6 +59,16 @@ pub struct FunctionDeclaration {
pub void: bool,
}

#[derive(Debug, Default)]
pub struct FunctionDeclaration {
pub overloads: Vec<Overload>,
/// Wether or not this function has the name of a builtin
pub builtin: bool,
/// In case [`builtin`](Self::builtin) is true, this field indicates wether
/// this function already has double overloads added or not, otherwise is unused
pub double: bool,
}

#[derive(Debug)]
pub struct EntryArg {
pub name: Option<String>,
Expand Down
Loading

0 comments on commit 4e181d6

Please sign in to comment.