Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 4 | ; Bound: 46 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpCapability Float16 |
| 8 | OpCapability UniformAndStorageBuffer16BitAccess |
| 9 | OpCapability StorageBuffer16BitAccess |
| 10 | OpCapability StorageInputOutput16 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 11 | %24 = OpExtInstImport "GLSL.std.450" |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 12 | 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 Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 20 | OpName %prevent_dce_block "prevent_dce_block" |
| 21 | OpMemberName %prevent_dce_block 0 "inner" |
| 22 | OpName %prevent_dce "prevent_dce" |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 23 | 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 Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 32 | 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 Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 36 | %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 Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 44 | %half = OpTypeFloat 16 |
| 45 | %v4half = OpTypeVector %half 4 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 46 | %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 sinclair | 6cc183c | 2023-03-02 21:28:45 +0000 | [diff] [blame] | 51 | %half_0x1_cp_1 = OpConstant %half 0x1.cp+1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 52 | %19 = OpConstantComposite %v4half %half_0x1_cp_1 %half_0x1_cp_1 %half_0x1_cp_1 %half_0x1_cp_1 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 53 | %_ptr_Function_v4half = OpTypePointer Function %v4half |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 54 | %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 Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 59 | %float_1 = OpConstant %float 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 60 | %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 Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 71 | OpReturn |
| 72 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 73 | %vertex_main_inner = OpFunction %v4float None %32 |
| 74 | %34 = OpLabel |
| 75 | %35 = OpFunctionCall %void %round_f665b5 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 76 | OpReturnValue %5 |
| 77 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 78 | %vertex_main = OpFunction %void None %14 |
| 79 | %37 = OpLabel |
| 80 | %38 = OpFunctionCall %v4float %vertex_main_inner |
| 81 | OpStore %value %38 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 82 | OpStore %vertex_point_size %float_1 |
| 83 | OpReturn |
| 84 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 85 | %fragment_main = OpFunction %void None %14 |
| 86 | %41 = OpLabel |
| 87 | %42 = OpFunctionCall %void %round_f665b5 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 88 | OpReturn |
| 89 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 90 | %compute_main = OpFunction %void None %14 |
| 91 | %44 = OpLabel |
| 92 | %45 = OpFunctionCall %void %round_f665b5 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 93 | OpReturn |
| 94 | OpFunctionEnd |