Skip to content

Commit

Permalink
[glsl-in] Add test array constant dynamic indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
JCapucho authored and kvark committed Sep 17, 2021
1 parent e824519 commit 1cb4447
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/in/glsl/global-constant-array.vert
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#version 450 core

uint i;
const float[2] array = { 1.0, 2.0 };

void main() { array[i]; }
13 changes: 13 additions & 0 deletions tests/out/wgsl/global-constant-array-vert.wgsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var<private> i: u32;

fn main1() {
var local: array<f32,2> = array<f32,2>(1.0, 2.0);

let _e2: u32 = i;
}

[[stage(vertex)]]
fn main() {
main1();
return;
}

0 comments on commit 1cb4447

Please sign in to comment.