From a3fbd8f060317332eae951d4a376e830d058469e Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Thu, 22 Aug 2024 04:23:05 -0700 Subject: [PATCH] Fix a false failure when using the latest SPIR-V (#4904) * Fix a false failure when using the latest SPIR-V --------- Co-authored-by: Ellie Hermaszewska Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska --- tests/bugs/gh-3087-multi-entry-point.slang | 8 ++++---- tests/bugs/gh-3087.slang | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/bugs/gh-3087-multi-entry-point.slang b/tests/bugs/gh-3087-multi-entry-point.slang index 1bbbb9995d..d3aa574c7c 100644 --- a/tests/bugs/gh-3087-multi-entry-point.slang +++ b/tests/bugs/gh-3087-multi-entry-point.slang @@ -5,12 +5,12 @@ // we should only have 1 'BuiltIn InstanceIndex' since the `Output` and `Input` semantic // for `InstanceIndex` should be converted to a non-builtin -// CHECK-DAG: BuiltIn InstanceIndex -// CHECK-NOT: BuiltIn InstanceIndex +// CHECK-DAG: OpDecorate %gl_InstanceIndex BuiltIn InstanceIndex +// CHECK-NOT: OpDecorate %gl_InstanceIndex BuiltIn InstanceIndex // We require 1 `Flat` for the fragment input `uint` -// SPIRV: Flat -// SPIRV-NOT: Flat +// CHECK-DAG: OpDecorate %{{[1-9][0-9]*}} Flat +// CHECK-NOT: OpDecorate %{{[1-9][0-9]*}} Flat struct VIn { diff --git a/tests/bugs/gh-3087.slang b/tests/bugs/gh-3087.slang index 1f6fa98cec..278bfea3c3 100644 --- a/tests/bugs/gh-3087.slang +++ b/tests/bugs/gh-3087.slang @@ -10,9 +10,10 @@ // SPIRV: OpEntryPoint // SPIRV-NOT: BuiltIn InstanceIndex + // We require 1 `Flat` for the fragment input `uint` -// SPIRV: Flat -// SPIRV-NOT: Flat +// SPIRV: OpDecorate %{{[1-9][0-9]*}} Flat +// SPIRV-NOT: OpDecorate %{{[1-9][0-9]*}} Flat struct PSInput @@ -25,4 +26,4 @@ struct PSInput float4 main(PSInput input) : SV_TARGET { return input.color + float(input.vInstance).xxxx; -} \ No newline at end of file +}