yum-mirror/slang

Making it easier to work with shaders

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

Tim FoleyConvert more tests to use shader objects (#1659)2a5d5b323

master
347 B17 linesraw
1// glsl-static-const-array.slang
2
3//TEST(compute):COMPARE_COMPUTE:-vk -shaderobj
4
5static const int gData[4] =
6{
7    0xA, 0xB, 0xC, 0xD,
8};
9
10//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name gBuffer
11RWStructuredBuffer<int> gBuffer;
12
13[numthreads(4,1,1)]
14void computeMain(uint3 tid : SV_DispatchThreadID)
15{
16    gBuffer[tid.x] = gData[tid.x];
17}