summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-12-11 14:19:00 -0800
committerGitHub <noreply@github.com>2024-12-11 14:19:00 -0800
commitc17369a507c9b2e3a2db409896dbdc7e250122c1 (patch)
treeff1f60a0b62d541b756b419549c8c4327607c81d /tests
parent0af589bf2ddf383eb8e6014e8e9da3309284ce0f (diff)
Fix the logic to determine whether lower generic pass should run. (#5837)
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/ptr-existential.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bugs/ptr-existential.slang b/tests/bugs/ptr-existential.slang
new file mode 100644
index 000000000..140e9a009
--- /dev/null
+++ b/tests/bugs/ptr-existential.slang
@@ -0,0 +1,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];
+} \ No newline at end of file