Files
wgpu/tests/in/glsl/declarations.vert
T
João Capucho 1d0f484b37 glsl-in: fix composite constructors (#1631)
* glsl-in: Remove unneeded mutability from reference

* glsl-in: Fix composite constructors

In the recent rework of the constructors it seems that the logic for
composite types (arrays and structs) was accidentally removed by me.
2021-12-28 20:16:56 -05:00

26 lines
393 B
GLSL

#version 450
layout(location = 0) in VertexData {
vec2 position;
vec2 a;
} vert;
layout(location = 0) out FragmentData {
vec2 position;
vec2 a;
} frag;
struct TestStruct {
float a;
float b;
};
void main() {
const vec3 positions[2] = vec3[2](
vec3(-1.0, 1.0, 0.0),
vec3(-1.0, -1.0, 0.0)
);
const TestStruct strct = TestStruct( 1, 2 );
}