yum-mirror/slang

Making it easier to work with shaders

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

ArielG-NVFix for `ConstantBuffer<T[...]>` causing a segfault (#4705)72f7ea604

master
590 B18 linesraw
1//TEST:SIMPLE(filecheck=SPIRV): -entry computeMain -stage compute -target spirv
2//TEST:SIMPLE(filecheck=HLSL): -entry computeMain -stage compute -target spirv
3//TEST:SIMPLE(filecheck=GLSL): -entry computeMain -stage compute -target spirv
4
5// SPIRV: OpEntryPoint
6// GLSL: main
7// HLSL: computeMain
8
9
10[[vk::binding(0, 0)]] uniform ConstantBuffer<uint64_t[1000]> addresses;
11RWStructuredBuffer<uint> buffer;
12
13[shader("compute")]
14[numthreads(1, 1, 1)]
15void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID, uint groupIndex: SV_GroupIndex)
16{
17    printf("\nfrom gpu: %llu", addresses[0]);
18}