yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeEnhance buffer load specialization pass to specialize past field extracts. (#8547)e4611e2e3

master
909 B30 linesraw
1//TEST:SIMPLE(filecheck=CHECK_SPIRV): -target spirv -entry main -stage vertex
2//TEST:SIMPLE(filecheck=CHECK_GLSL): -target glsl -entry main -stage vertex
3
4// CHECK_SPIRV: OpEntryPoint
5// CHECK_SPIRV: OpVariable {{.*}} Input {{.*}} Location 0
6// CHECK_SPIRV-DAG: OpVariable {{.*}} Uniform
7// CHECK_SPIRV-DAG: OpVariable {{.*}} Input {{.*}} Location 1
8// CHECK_SPIRV-DAG: OpVariable {{.*}} Output {{.*}} Location 0
9
10// CHECK_GLSL: layout(location = 0)
11// CHECK_GLSL-NEXT: in
12// CHECK_GLSL: layout(location = 1)
13// CHECK_GLSL-NEXT: in
14// CHECK_GLSL: layout(std140) uniform
15// CHECK_GLSL: layout(location = 0)
16// CHECK_GLSL-NEXT: out
17// CHECK_GLSL: void main
18
19#version 330 core
20layout(location=0) in float3 a_position;
21layout(location=1) in float4 a_color;
22
23out float4 v_color;
24
25uniform matrix<float,4,4> u_transform;
26
27void main() {
28    gl_Position = u_transform * vec4(a_position, 1.0);
29    v_color = a_color;
30}