glslang/Test/baseResults/spv.specConstant.int16.comp.out
Steven Perron 33c7e30860
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
2024-06-28 19:16:59 -04:00

52 lines
2.5 KiB
Plaintext

spv.specConstant.int16.comp
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 18
Capability Shader
Capability Int16
Capability StorageUniformBufferBlock16
Extension "SPV_KHR_16bit_storage"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source GLSL 450
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16"
Name 4 "main"
Name 7 "Output"
MemberName 7(Output) 0 "r0"
MemberName 7(Output) 1 "r1"
Name 9 "sb_out"
Name 12 "sc0"
Name 16 "sc1"
Decorate 7(Output) BufferBlock
MemberDecorate 7(Output) 0 NonReadable
MemberDecorate 7(Output) 0 Offset 0
MemberDecorate 7(Output) 1 NonReadable
MemberDecorate 7(Output) 1 Offset 2
Decorate 9(sb_out) Binding 0
Decorate 9(sb_out) DescriptorSet 0
Decorate 12(sc0) SpecId 1
Decorate 16(sc1) SpecId 2
2: TypeVoid
3: TypeFunction 2
6: TypeInt 16 1
7(Output): TypeStruct 6(int16_t) 6(int16_t)
8: TypePointer Uniform 7(Output)
9(sb_out): 8(ptr) Variable Uniform
10: TypeInt 32 1
11: 10(int) Constant 0
12(sc0): 6(int16_t) SpecConstant 20000
13: TypePointer Uniform 6(int16_t)
15: 10(int) Constant 1
16(sc1): 6(int16_t) SpecConstant 4294947296
4(main): 2 Function None 3
5: Label
14: 13(ptr) AccessChain 9(sb_out) 11
Store 14 12(sc0)
17: 13(ptr) AccessChain 9(sb_out) 15
Store 17 16(sc1)
Return
FunctionEnd