yum-mirror/slang

Making it easier to work with shaders

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

Darren WihandiFix exact-match witness synthesis for static functions (#6204)cf66563cf

master
501 B27 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3interface Base
4{
5    static int getValue();
6}
7
8struct Impl : Base
9{
10    // This is not static and not allowed to implement the interface's static method.
11    // CHECK: error 38105: member 'getValue' does not match interface requirement
12    int getValue() { return 5; }
13}
14
15int callGet<Foo : Base>()
16{
17    return Foo::getValue();
18}
19
20RWStructuredBuffer<int> result;
21
22[numthreads(1, 1, 1)]
23void computeMain()
24{
25    result[0] = callGet<Impl>();
26}
27