yum-mirror/slang

Making it easier to work with shaders

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

Yong HeProperly plumbing layout for global varyings. (#6198)f030a5ab6

master
536 B23 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -entry main -stage fragment
2
3// Test that we can mix explicit and implicit locations for global varyings.
4
5#version 450
6layout(location=1) in vec4 color_0;
7in vec2 texcoord_0;
8in vec2 texCoord_1;
9
10out vec4 out1;
11
12// CHECK-DAG: OpDecorate %color_0 Location 1
13
14// CHECK-DAG: OpDecorate %texcoord_0 Location 0
15
16// CHECK-DAG: OpDecorate %texCoord_1 Location 2
17
18// CHECK-DAG: OpDecorate %entryPointParam_main_out1 Location 0
19
20void main()
21{
22    out1 = vec4(color_0.rg, texcoord_0 + texCoord_1);
23}