yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
447b7e0e2
master
1//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj 2 3/* The test is for behavior with inheritance and two fields with the same name. 4 5.slang(24): error 39999: no overload for 'int' applicable to arguments of type (overload group) 6 outputBuffer[index] = 1 + int(a.a); 7 8Looks like the problem is that it sees 'a' as 'overloaded' - which I guess is one way to look at it. It is then followed with ... 9 10core.meta.slang(230): note 39999: candidate: int.init(uint64_t) 11core.meta.slang(230): note 39999: candidate: int.init(uint) 12 13Which doesn't seem appropriate 14 */ 15 16//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer 17RWStructuredBuffer<float> outputBuffer; 18 19struct MyStruct 20{ 21 int a = 10; 22}; 23 24struct MyStruct2 : MyStruct 25{ 26 int a = 10; 27}; 28 29[numthreads(4, 1, 1)] 30void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 31{ 32 int index = dispatchThreadID.x; 33 34 MyStruct2 a; 35 36 outputBuffer[index] = 1 + int(a.a); 37} 38