yum-mirror/slang

Making it easier to work with shaders

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

Yong HeCreate scope for synthesized property decl. (#5817)8bf4743f5

master
536 B24 linesraw
1//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-output-using-type
2
3public interface ITest {
4    property int value;
5};
6
7struct Test : ITest {
8    int value;
9};
10
11//TEST_INPUT: type_conformance Test:ITest = 1;
12
13//TEST_INPUT: set inputBuffer = ubuffer(data=[0 0 1 0 1 0 0 0], stride=4)
14RWStructuredBuffer<ITest> inputBuffer;
15
16//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
17RWStructuredBuffer<int> outputBuffer;
18
19[NumThreads(1, 1, 1)]
20void computeMain()
21{
22    // CHECK: 1
23    outputBuffer[0] = inputBuffer[0].value;
24}