summaryrefslogtreecommitdiff
path: root/tests/cuda/cuda-reflection.slang
blob: 95bf591c95afe101fed83e160886cd3380a996cc (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
// cuda-reflection.slang

//TEST:REFLECTION:-stage compute -entry main -target cuda

struct PadLadenStruct
{
    double a;
    uint8_t b;
};

// This is to check if the last half can be inserted 'inside' the spare padding of a. It should not be
struct StructWithArray
{
    PadLadenStruct a[1];
    uint8_t c;
    
    matrix<half, 3, 3> d;
    uint8_t e;
};

ConstantBuffer<StructWithArray> cb;
RWStructuredBuffer<StructWithArray> sb;

[numthreads(1, 1, 1)]
void main(
    uint3 dispatchThreadID : SV_DispatchThreadID)
{
}