yum-mirror/slang

Making it easier to work with shaders

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

Yong HeSupport implciit casted swizzled lvalue. (#3077)f875d3f5b

master
424 B18 linesraw
1//TEST(compute):COMPARE_COMPUTE:-vk -shaderobj
2
3//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name gBuffer
4RWStructuredBuffer<int> gBuffer;
5
6int getX(int4 v) { return v.x; }
7
8[numthreads(1, 1, 1)]
9void computeMain(uint3 tid: SV_DispatchThreadID, uint GI: SV_GroupIndex)
10{
11    if (GI< 1)
12    {
13        uint LdsCoord = GI;
14        uint a = gBuffer[LdsCoord];
15        LdsCoord += 1;
16        gBuffer[LdsCoord] = 1;
17    }
18}