yum-mirror/slang

Making it easier to work with shaders

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

Tim FoleyRemove non-IR codegen paths (#398)662f43fff

master
617 B60 linesraw
1#version 450
2//TEST_DISABLED:COMPARE_GLSL:
3
4// Test workaround for glslang issue #988
5// (https://github.com/KhronosGroup/glslang/issues/988)
6
7
8#if defined(__SLANG__)
9
10
11__import glslang_bug_988_workaround;
12
13uniform U
14{
15	Foo foo;	
16};
17
18vec4 doIt(Foo foo)
19{
20	return foo.bar;
21}
22
23layout(location = 0)
24out vec4 result;
25
26void main()
27{
28	vec4 r = doIt(foo);
29	result = r;
30}
31
32#else
33
34struct Foo
35{
36	vec4 bar;
37};
38
39layout(binding = 0)
40uniform U
41{
42	Foo foo;	
43};
44
45vec4 doIt(Foo foo)
46{
47	return foo.bar;
48}
49
50layout(location = 0)
51out vec4 result;
52
53void main()
54{
55	Foo SLANG_tmp_0 = foo;
56	vec4 r = doIt(SLANG_tmp_0);
57	result = r;
58}
59
60#endif