yum-mirror/slang

Making it easier to work with shaders

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

Jay KwakFix typo SV_DispatchThreadIndex (#4962)e9f52a694

master
501 B18 linesraw
1//TEST:REFLECTION(filecheck=CHECK):-stage compute -entry computeMain -target hlsl -no-codegen
2
3// CHECK-DAG: "Hello \t\n\0x083 World": -215446506
4// CHECK-DAG: "Try another": 900483678
5
6import string_literal_module;
7
8//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out
9RWStructuredBuffer<int> outputBuffer;
10
11[numthreads(4, 1, 1)]
12void computeMain(
13    uint tid   : SV_DispatchThreadID)
14{
15    int value = doSomethingElse() + getStringHash("Hello \t\n\0x083 World");   
16    outputBuffer[tid] = value;
17}
18