Files
wgpu/tests/out/glsl/padding.vertex.Vertex.glsl
T
Teodor Tanasoaia bd62887a13 [hlsl-out] Add more padding when necessary (#1814)
* [hlsl-out] add padding at the end of structs and after struct members of type matrix and array (when necessary)

* use wrapped constructor fn for constants

* add array as fn arg test

* fix glsl array fn arg

* add wrapped constructor for arrays

* [glsl-out] support multidimensional arrays

* address comments
2022-04-11 20:34:06 -07:00

37 lines
699 B
GLSL

#version 310 es
precision highp float;
precision highp int;
struct S {
vec3 a;
};
struct Test {
S a;
float b;
};
struct Test2_ {
vec3 a[2];
float b;
};
struct Test3_ {
mat4x3 a;
float b;
};
uniform Test_block_0Vertex { Test _group_0_binding_0_vs; };
uniform Test2__block_1Vertex { Test2_ _group_0_binding_1_vs; };
uniform Test3__block_2Vertex { Test3_ _group_0_binding_2_vs; };
void main() {
float _e6 = _group_0_binding_0_vs.b;
float _e9 = _group_0_binding_1_vs.b;
float _e12 = _group_0_binding_2_vs.b;
gl_Position = (((vec4(1.0) * _e6) * _e9) * _e12);
gl_Position.yz = vec2(-gl_Position.y, gl_Position.z * 2.0 - gl_Position.w);
return;
}