yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
d58243d90
master
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly 2 3// CHECK: type: int32_t 4// CHECK-COUNT-256: 10 5 6//TEST_INPUT:ubuffer(stride=4, count=256):out,name=outputBuffer 7RWStructuredBuffer<int32_t> outputBuffer; 8 9using namespace linalg; 10 11[numthreads(32, 1, 1)] 12void computeMain() 13{ 14 var result : CoopMat<int32_t, MemoryScope.Subgroup, 16, 16, CoopMatMatrixUse::MatrixAccumulator>; 15 result.fill(10); 16 result.Store<CoopMatMatrixLayout::RowMajor>(outputBuffer, 0, 16); 17} 18