yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
c99addbf2
master
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type 2//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type 3//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -cpu -shaderobj -output-using-type 4 5// Test that decls with the same name as the module are allowed. 6 7module MyModule; 8 9struct MyModule 10{ 11 int doThing() 12 { 13 return 1; 14 } 15} 16 17//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=output 18RWStructuredBuffer<int> output; 19 20void computeMain() 21{ 22 MyModule m; 23 output[0] = m.doThing(); 24 // CHECK: 1 25}