blob: eb1a49a72a690baea13924d302cd68ee2c7ddf9a [file] [log] [blame]
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Ben Clayton77a90cb2023-03-06 18:25:08 +00004; Bound: 46
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +00005; Schema: 0
6 OpCapability Shader
7 OpCapability Float16
8 OpCapability UniformAndStorageBuffer16BitAccess
9 OpCapability StorageBuffer16BitAccess
10 OpCapability StorageInputOutput16
Ben Clayton77a90cb2023-03-06 18:25:08 +000011 %24 = OpExtInstImport "GLSL.std.450"
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000012 OpMemoryModel Logical GLSL450
13 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
14 OpEntryPoint Fragment %fragment_main "fragment_main"
15 OpEntryPoint GLCompute %compute_main "compute_main"
16 OpExecutionMode %fragment_main OriginUpperLeft
17 OpExecutionMode %compute_main LocalSize 1 1 1
18 OpName %value "value"
19 OpName %vertex_point_size "vertex_point_size"
Ben Clayton77a90cb2023-03-06 18:25:08 +000020 OpName %prevent_dce_block "prevent_dce_block"
21 OpMemberName %prevent_dce_block 0 "inner"
22 OpName %prevent_dce "prevent_dce"
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000023 OpName %round_f665b5 "round_f665b5"
24 OpName %arg_0 "arg_0"
25 OpName %res "res"
26 OpName %vertex_main_inner "vertex_main_inner"
27 OpName %vertex_main "vertex_main"
28 OpName %fragment_main "fragment_main"
29 OpName %compute_main "compute_main"
30 OpDecorate %value BuiltIn Position
31 OpDecorate %vertex_point_size BuiltIn PointSize
Ben Clayton77a90cb2023-03-06 18:25:08 +000032 OpDecorate %prevent_dce_block Block
33 OpMemberDecorate %prevent_dce_block 0 Offset 0
34 OpDecorate %prevent_dce DescriptorSet 2
35 OpDecorate %prevent_dce Binding 0
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000036 %float = OpTypeFloat 32
37 %v4float = OpTypeVector %float 4
38%_ptr_Output_v4float = OpTypePointer Output %v4float
39 %5 = OpConstantNull %v4float
40 %value = OpVariable %_ptr_Output_v4float Output %5
41%_ptr_Output_float = OpTypePointer Output %float
42 %8 = OpConstantNull %float
43%vertex_point_size = OpVariable %_ptr_Output_float Output %8
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000044 %half = OpTypeFloat 16
45 %v4half = OpTypeVector %half 4
Ben Clayton77a90cb2023-03-06 18:25:08 +000046%prevent_dce_block = OpTypeStruct %v4half
47%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
48%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
49 %void = OpTypeVoid
50 %14 = OpTypeFunction %void
dan sinclair6cc183c2023-03-02 21:28:45 +000051%half_0x1_cp_1 = OpConstant %half 0x1.cp+1
Ben Clayton77a90cb2023-03-06 18:25:08 +000052 %19 = OpConstantComposite %v4half %half_0x1_cp_1 %half_0x1_cp_1 %half_0x1_cp_1 %half_0x1_cp_1
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000053%_ptr_Function_v4half = OpTypePointer Function %v4half
Ben Clayton77a90cb2023-03-06 18:25:08 +000054 %22 = OpConstantNull %v4half
55 %uint = OpTypeInt 32 0
56 %uint_0 = OpConstant %uint 0
57%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
58 %32 = OpTypeFunction %v4float
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000059 %float_1 = OpConstant %float 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000060%round_f665b5 = OpFunction %void None %14
61 %17 = OpLabel
62 %arg_0 = OpVariable %_ptr_Function_v4half Function %22
63 %res = OpVariable %_ptr_Function_v4half Function %22
64 OpStore %arg_0 %19
65 %25 = OpLoad %v4half %arg_0
66 %23 = OpExtInst %v4half %24 RoundEven %25
67 OpStore %res %23
68 %30 = OpAccessChain %_ptr_StorageBuffer_v4half %prevent_dce %uint_0
69 %31 = OpLoad %v4half %res
70 OpStore %30 %31
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000071 OpReturn
72 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000073%vertex_main_inner = OpFunction %v4float None %32
74 %34 = OpLabel
75 %35 = OpFunctionCall %void %round_f665b5
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000076 OpReturnValue %5
77 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000078%vertex_main = OpFunction %void None %14
79 %37 = OpLabel
80 %38 = OpFunctionCall %v4float %vertex_main_inner
81 OpStore %value %38
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000082 OpStore %vertex_point_size %float_1
83 OpReturn
84 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000085%fragment_main = OpFunction %void None %14
86 %41 = OpLabel
87 %42 = OpFunctionCall %void %round_f665b5
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000088 OpReturn
89 OpFunctionEnd
Ben Clayton77a90cb2023-03-06 18:25:08 +000090%compute_main = OpFunction %void None %14
91 %44 = OpLabel
92 %45 = OpFunctionCall %void %round_f665b5
Zhaoming Jiang9443ceb2022-08-05 15:15:17 +000093 OpReturn
94 OpFunctionEnd