yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
43728fbda
master
1//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK): -output-using-type 2 3interface IFoo 4{ 5 float3 get(); 6} 7 8struct Foo : IFoo 9{ 10 float3 val; 11 float3 get() { return val; } 12}; 13 14//TEST_INPUT: type_conformance Foo:IFoo=0 15 16//TEST_INPUT:set foo = ubuffer(data=[0 0 0 0 1.0 2.0 3.0 0.0], stride=4) 17StructuredBuffer<IFoo> foo; 18 19//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer 20RWStructuredBuffer<float> outputBuffer; 21 22[numthreads(1,1,1)] 23void computeMain() 24{ 25 // CHECK: 1.0 26 outputBuffer[0] = foo[0].get().x; 27}