yum-mirror/slang

Making it easier to work with shaders

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

Yong HeRefactor compiler option representations. (#3598)4d20fd329

master
510 B16 linesraw
1//TEST(smoke,compute):COMPARE_COMPUTE:-cpu -shaderobj -Xslang... -Wno-unrecommended-implicit-conversion -X.
2
3// Test to check warning disable
4
5//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
6RWStructuredBuffer<uint> outputBuffer;
7
8[numthreads(4, 1, 1)]
9void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
10{
11    uint v = dispatchThreadID.x;
12    // This coercion loses data and would normally produce a warning
13    int16_t v1 = v;
14    
15    outputBuffer[dispatchThreadID.x] = v1;
16}