mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-23 07:14:01 +00:00
50 lines
808 B
GLSL
50 lines
808 B
GLSL
#version 310 es
|
|
|
|
precision highp float;
|
|
precision highp int;
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
struct GlobalConst {
|
|
uint a;
|
|
uvec3 b;
|
|
int c;
|
|
};
|
|
struct AlignedWrapper {
|
|
int value;
|
|
};
|
|
struct Baz {
|
|
mat3x2 m;
|
|
};
|
|
struct MatCx2InArray {
|
|
mat4x2 am[2];
|
|
};
|
|
|
|
float read_from_private(inout float foo_1) {
|
|
float _e1 = foo_1;
|
|
return _e1;
|
|
}
|
|
|
|
float test_arr_as_arg(float a[5][10]) {
|
|
return a[4][9];
|
|
}
|
|
|
|
void assign_through_ptr_fn(inout uint p) {
|
|
p = 42u;
|
|
return;
|
|
}
|
|
|
|
void assign_array_through_ptr_fn(inout vec4 foo_2[2]) {
|
|
foo_2 = vec4[2](vec4(1.0), vec4(2.0));
|
|
return;
|
|
}
|
|
|
|
void main() {
|
|
uint val = 33u;
|
|
vec4 arr[2] = vec4[2](vec4(6.0), vec4(7.0));
|
|
assign_through_ptr_fn(val);
|
|
assign_array_through_ptr_fn(arr);
|
|
return;
|
|
}
|
|
|