yum-mirror/slang

Making it easier to work with shaders

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

cheneym2Fix precompiled glsl modules (#5230)1bbc421a6

master
742 B30 linesraw
1// precompiled-glsl.slang
2
3// A test that precompiles a slang-module using GLSL functions.
4
5//TEST:COMPILE: tests/library/precompiled-glsl.slang -target spirv -stage fragment -entry main
6//TEST:COMPILE: tests/library/precompiled-glsl.slang -target spirv -stage fragment -entry main -embed-downstream-ir
7
8#version 310 es
9precision highp float;
10precision highp int;
11
12public vec3 func(vec3 v)
13{
14    return v;
15}
16
17layout(location = 0) out mediump vec4 dEQP_FragColor;
18
19layout(location = 0) flat in uint out0;
20layout(binding = 0, std140) uniform Reference
21{
22	uint out0;
23} ref;
24
25void main()
26{
27    dEQP_FragColor = mix(vec4(0.0, 1.0, 0.0, 1.0),
28                         vec4(0.0, 1.0, 0.0, 1.0),
29                         vec4(0.0, 1.0, 0.0, 1.0));
30}