mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
[glsl-in] Support function declarations with void as arguments
This commit is contained in:
1 parent
115d170584
commit
63a8463edd
2 files changed
+5
-1
No files matched your search
@@ -586,6 +586,10 @@ impl<'source> ParsingContext<'source> {
|
||||
context: &mut Context,
|
||||
body: &mut Block,
|
||||
) -> Result<()> {
|
||||
if self.bump_if(parser, TokenValue::Void).is_some() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
loop {
|
||||
if self.peek_type_name(parser) || self.peek_parameter_qualifier(parser) {
|
||||
let qualifier = self.parse_parameter_qualifier(parser);
|
||||
|
||||
@@ -104,7 +104,7 @@ fn version() {
|
||||
parser
|
||||
.parse(
|
||||
&Options::from(ShaderStage::Vertex),
|
||||
"#version 450 core\nvoid main() {}",
|
||||
"#version 450 core\nvoid main(void) {}",
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
|
||||
Reference in new issue
Block a user