blob: 4e5785c413dc86a5bced9afb52ebd298a99090a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// static-method.slang
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
struct S
{
static void doThing(in out int x, int y)
{
x += y;
}
}
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
RWStructuredBuffer<int> outputBuffer;
int test(int t)
{
S::doThing(t, 0x10);
(S::doThing(t, 0x200));
(S::doThing)(t, 0x4000);
return t;
}
[numthreads(4)]
void computeMain(int3 tid : SV_DispatchThreadID)
{
int val = tid.x;
val = test(val);
outputBuffer[tid.x] = val;
}
|