summaryrefslogtreecommitdiffstats
path: root/tests/bugs/ptr-existential.slang
blob: 140e9a009303a7c67ab43230e8ca3b7ce91354a9 (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

//CHECK: OpEntryPoint

interface IBsdf {};
struct Foo : IBsdf {}
//TEST_INPUT:type_conformance Foo:IBsdf = 0
struct Mesh {
    float4 *vertices;
    IBsdf *bsdf;
}
[[vk::push_constant]] Mesh* mesh;
RWStructuredBuffer<float4> outputBuffer;

[shader("compute")]
[numthreads(1, 1, 1)]
void main(uint3 dispatchThreadID: SV_DispatchThreadID)
{
    outputBuffer[0] = mesh.vertices[0];
}