Skip to content

Commit

Permalink
Fix a false failure when using the latest SPIR-V (#4904)
Browse files Browse the repository at this point in the history
* Fix a false failure when using the latest SPIR-V

---------

Co-authored-by: Ellie Hermaszewska <[email protected]>
Co-authored-by: ArielG-NV <[email protected]>
Co-authored-by: Ellie Hermaszewska <[email protected]>
  • Loading branch information
4 people authored Aug 22, 2024
1 parent 68e4999 commit a3fbd8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests/bugs/gh-3087-multi-entry-point.slang
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
7 changes: 4 additions & 3 deletions tests/bugs/gh-3087.slang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,4 +26,4 @@ struct PSInput
float4 main(PSInput input) : SV_TARGET
{
return input.color + float(input.vInstance).xxxx;
}
}

0 comments on commit a3fbd8f

Please sign in to comment.