1
- // TEST(compute):SIMPLE:-target hlsl -dump-repro repro.slang-repro
1
+ // DISABLE_TEST(compute):SIMPLE:-profile cs_5_0 -entry computeMain -target dxbc -dump-repro repro.slang-repro
2
+ // TEST:COMPILE:tests/compute/dump-repro.slang -profile cs_5_0 -entry computeMain -target dxbc -dump-repro repro.slang-repro
3
+ // TEST(compute):COMPARE_COMPUTE_EX:-dx11 -compute -no-default-entry-point -compile-arg -load-repro -compile-arg repro.slang-repro
4
+ // We only want to run on one API to test load worked
5
+ // DISABLE_TEST(compute):COMPARE_COMPUTE:-dx12 -load-repro repro.slang-repro
2
6
3
7
// TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer
4
8
RWStructuredBuffer < int > outputBuffer;
5
9
6
- // TEST_INPUT:array(size=2):name g_aoa
7
- RWStructuredBuffer < int > g_aoa[] ;
8
-
9
- // TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4):name=g_aoa[0]
10
- // TEST_INPUT:ubuffer(data=[8 17 34], stride=4):name=g_aoa[1]
11
-
12
10
[numthreads(8 , 1 , 1 )]
13
11
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
14
12
{
15
13
int index = int (dispatchThreadID .x );
16
14
17
- int baseIndex = index >> 2 ;
18
- int innerIndex = index & 3 ;
19
-
20
- RWStructuredBuffer < int > buffer = g_aoa [baseIndex];
21
-
22
- // Get the size
23
- uint bufferCount, bufferStride;
24
- buffer .GetDimensions (bufferCount, bufferStride);
25
-
26
- if (innerIndex >= bufferCount)
27
- {
28
- innerIndex = bufferCount - 1 ;
29
- }
30
- outputBuffer [index] = buffer [innerIndex];
15
+ outputBuffer [index] = index * 2 + 1 ;
31
16
}
0 commit comments