Commit c17369a 1 parent 0af589b commit c17369a Copy full SHA for c17369a
File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -429,7 +429,14 @@ void calcRequiredLoweringPassSet(
429
429
{
430
430
// If any instruction has an interface type, we need to run
431
431
// the generics lowering pass.
432
- auto type = inst->getDataType ();
432
+ auto type = as<IRType>(inst) ? inst : inst->getDataType ();
433
+ for (;;)
434
+ {
435
+ if (auto ptrType = as<IRPtrTypeBase>(type))
436
+ type = ptrType->getValueType ();
437
+ else
438
+ break ;
439
+ }
433
440
if (type && type->getOp () == kIROp_InterfaceType )
434
441
{
435
442
result.generics = true ;
Original file line number Diff line number Diff line change
1
+ //TEST:SIMPLE(filecheck=CHECK): -target spirv
2
+
3
+ //CHECK: OpEntryPoint
4
+
5
+ interface IBsdf {};
6
+ struct Foo : IBsdf {}
7
+ //TEST_INPUT:type_conformance Foo:IBsdf = 0
8
+ struct Mesh {
9
+ float4 *vertices;
10
+ IBsdf *bsdf;
11
+ }
12
+ [[vk::push_constant]] Mesh* mesh;
13
+ RWStructuredBuffer<float4> outputBuffer;
14
+
15
+ [shader("compute")]
16
+ [numthreads(1, 1, 1)]
17
+ void main(uint3 dispatchThreadID: SV_DispatchThreadID)
18
+ {
19
+ outputBuffer[0] = mesh.vertices[0];
20
+ }
You can’t perform that action at this time.
0 commit comments