blob: f5781fd1426aa02d4818178ad7a21d2f901f5b8a (
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
|
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -stage compute -profile glsl_450 -target spirv -entry computeMain -warnings-disable 39001
//CHECK-NOT: warning
//CHECK-NOT: note
RWStructuredBuffer<float> outputBuffer;
[[vk::binding(1,0)]] Texture2D g_bindlessTexture2D[];
[[vk::binding(1,0)]] Texture3D g_bindlessTexture3D[];
struct GenStruct<T>
{
T x;
};
T test<T>(T val)
{
return val;
}
[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint tid = dispatchThreadID.x;
float inVal = float(tid);
float outVal = test<float>(inVal);
outputBuffer[tid] = outVal;
}
|