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

@ -281,21 +281,21 @@ local_size = (128, 1, 1)
MemberDecorate 26(MyStruct) 1 Offset 4
MemberDecorate 26(MyStruct) 2 Offset 8
Decorate 27 ArrayStride 12
Decorate 28(MyStructs) BufferBlock
MemberDecorate 28(MyStructs) 0 Offset 0
MemberDecorate 28(MyStructs) 1 Offset 4
Decorate 28(MyStructs) BufferBlock
Decorate 29 ArrayStride 16
Decorate 30(sb) BufferBlock
MemberDecorate 30(sb) 0 NonWritable
MemberDecorate 30(sb) 0 Offset 0
Decorate 30(sb) BufferBlock
Decorate 32(sb) DescriptorSet 0
Decorate 32(sb) Binding 0
Decorate 32(sb) DescriptorSet 0
Decorate 64 ArrayStride 12
Decorate 65(o) BufferBlock
MemberDecorate 65(o) 0 NonWritable
MemberDecorate 65(o) 0 Offset 0
Decorate 65(o) BufferBlock
Decorate 67(o) DescriptorSet 0
Decorate 67(o) Binding 1
Decorate 67(o) DescriptorSet 0
Decorate 83(id) BuiltIn LocalInvocationIndex
2: TypeVoid
3: TypeFunction 2