yum-mirror/slang

Making it easier to work with shaders

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

Yong HeMetal: misc fixes and enable more tests. (#4374)cfef0c6f6

master
590 B14 linesraw
1//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -compile-arg -O3 -shaderobj
2//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
3//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -shaderobj
4//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
5
6//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
7RWStructuredBuffer<float> outputBuffer;
8
9[numthreads(4, 1, 1)]
10void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
11{
12    float v = asfloat((int(dispatchThreadID.x) & -2147483648) | 1065353216);
13	outputBuffer[dispatchThreadID.x] = v;
14}