-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle empty variable names in namer (#1484)
* Handle empty variable names in namer * Add glsl-in test with empty global name
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
layout(set = 1, binding = 1) uniform TextureData { | ||
vec4 material; | ||
}; | ||
|
||
void main() { | ||
vec2 coords = vec2(material.xy); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[[block]] | ||
struct TextureData { | ||
material: vec4<f32>; | ||
}; | ||
|
||
[[group(1), binding(1)]] | ||
var<uniform> global: TextureData; | ||
|
||
fn main1() { | ||
var coords: vec2<f32>; | ||
|
||
let e2: vec4<f32> = global.material; | ||
coords = vec2<f32>(e2.xy); | ||
return; | ||
} | ||
|
||
[[stage(fragment)]] | ||
fn main() { | ||
main1(); | ||
return; | ||
} |