From cbe6510f769961573c90a47c1feb843759118003 Mon Sep 17 00:00:00 2001 From: chyyran Date: Mon, 16 Sep 2024 17:52:48 -0400 Subject: [PATCH] preprocess: the step argument is optional according to slang-shaders spec --- librashader-preprocess/src/pragma.rs | 35 ++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/librashader-preprocess/src/pragma.rs b/librashader-preprocess/src/pragma.rs index 708cb46..2adf2cf 100644 --- a/librashader-preprocess/src/pragma.rs +++ b/librashader-preprocess/src/pragma.rs @@ -3,7 +3,8 @@ use librashader_common::ImageFormat; use nom::bytes::complete::{is_not, tag, take_while}; use librashader_common::map::ShortString; -use nom::character::complete::multispace1; +use nom::character::complete::{multispace0, multispace1}; +use nom::combinator::opt; use nom::number::complete::float; use nom::sequence::delimited; use nom::IResult; @@ -36,8 +37,16 @@ fn parse_parameter_string(input: &str) -> Result Result