Don't emit duplicate decorations. (#3635)

It is invalid if the same decoration is applied to the same id multiple
times. This adds a check before adding a decoration that the decoration
is not already in the list. If it is, then the duplicate is not added.

Fixes #3627
This commit is contained in:
Steven Perron 2024-06-28 19:16:59 -04:00 committed by GitHub
parent 7c40de7aa2
commit 33c7e30860
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
575 changed files with 3482 additions and 3414 deletions

View file

@ -20,23 +20,23 @@ spv.xfb.vert
Name 14 ""
Name 15 "out4"
Decorate 8(out1) Location 0
Decorate 8(out1) Offset 12
Decorate 8(out1) XfbBuffer 3
Decorate 8(out1) XfbStride 48
Decorate 8(out1) Offset 12
MemberDecorate 9(outXfb) 0 Offset 8
Decorate 9(outXfb) Block
MemberDecorate 9(outXfb) 0 Offset 8
Decorate 11 Location 1
Decorate 11 XfbBuffer 2
Decorate 11 XfbStride 32
MemberDecorate 12(outXfb2) 0 Offset 60
Decorate 12(outXfb2) Block
MemberDecorate 12(outXfb2) 0 Offset 60
Decorate 14 Location 3
Decorate 14 XfbBuffer 1
Decorate 14 XfbStride 64
Decorate 15(out4) Location 4
Decorate 15(out4) Offset 4
Decorate 15(out4) XfbBuffer 0
Decorate 15(out4) XfbStride 8
Decorate 15(out4) Offset 4
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32