1[require]
2VK_KHR_spirv_1_4
3
4[compute shader spirv]
5; SpecConstantOp truncate 32-bit 16 value to 16-bit.
6               OpCapability Shader
7	       OpCapability Int16
8          %1 = OpExtInstImport "GLSL.std.450"
9               OpMemoryModel Logical GLSL450
10               OpEntryPoint GLCompute %main "main" %_
11               OpExecutionMode %main LocalSize 1 1 1
12               OpSource GLSL 430
13               OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
14               OpSourceExtension "GL_GOOGLE_include_directive"
15               OpName %main "main"
16               OpName %output_buffer "output_buffer"
17               OpMemberName %output_buffer 0 "out_SSBO"
18               OpName %_ ""
19               OpMemberDecorate %output_buffer 0 Offset 0
20               OpDecorate %output_buffer Block
21               OpDecorate %_ DescriptorSet 0
22               OpDecorate %_ Binding 1
23       %void = OpTypeVoid
24          %3 = OpTypeFunction %void
25     %uint16 = OpTypeInt 16 0
26       %uint = OpTypeInt 32 0
27%output_buffer = OpTypeStruct %uint16
28%_ptr_StorageBuffer_output_buffer = OpTypePointer StorageBuffer %output_buffer
29          %_ = OpVariable %_ptr_StorageBuffer_output_buffer StorageBuffer
30      %uint_0 = OpConstant %uint 0
31%_ptr_StorageBuffer_uint16 = OpTypePointer StorageBuffer %uint16
32%spec_const = OpSpecConstant %uint 16
33%op_spec_const = OpSpecConstantOp %uint16 UConvert %spec_const
34       %main = OpFunction %void None %3
35          %5 = OpLabel
36         %34 = OpAccessChain %_ptr_StorageBuffer_uint16 %_ %uint_0
37               OpStore %34 %op_spec_const
38               OpReturn
39               OpFunctionEnd
40[test]
41ssbo 0:1 4
42ssbo 0:1 subdata uint8_t 0 0 0
43
44compute entrypoint main
45compute 1 1 1
46
47probe ssbo uint8_t 0:1 0 == 16 0
48