summaryrefslogtreecommitdiffstats
path: root/tests/spirv/large-struct-ptr.slang
blob: 131ccdbb9cd65c74b826bc7121ec2d87670efc06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly -profile glsl_460

struct WorkData {
    float A[2048 * 2048];
    float B[2048 * 2048];
};
struct PushData {
    WorkData* Input;
    float* Dest;
};

[vk::push_constant] ConstantBuffer<PushData> cb;

// CHECK: OpEntryPoint

[numthreads(64, 1, 1)]
void ComputeMain(uint tid: SV_DispatchThreadID)
{
    cb.Dest[tid] = cb.Input->A[tid] * cb.Input->B[tid];
}