blob: 7960774e0cfde8866401ea8ff65594ad5a559dc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// gh-775-ext.slang
//TEST(compute):COMPARE_COMPUTE: -shaderobj
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
int test(int inVal)
{
static int kVal = 16;
return inVal + kVal;
}
//TEST_INPUT:ubuffer(data=[9 9 9 9], stride=4):out,name outputBuffer
RWStructuredBuffer<int> outputBuffer : register(u0);
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint tid = dispatchThreadID.x;
int inVal = int(tid);
int outVal = test(inVal);
outputBuffer[tid] = outVal;
}
|