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: 48 |
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 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 10 | %24 = OpExtInstImport "GLSL.std.450" |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 11 | OpMemoryModel Logical GLSL450 |
| 12 | OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size |
| 13 | OpEntryPoint Fragment %fragment_main "fragment_main" |
| 14 | OpEntryPoint GLCompute %compute_main "compute_main" |
| 15 | OpExecutionMode %fragment_main OriginUpperLeft |
| 16 | OpExecutionMode %compute_main LocalSize 1 1 1 |
| 17 | OpName %value "value" |
| 18 | OpName %vertex_point_size "vertex_point_size" |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 19 | OpName %prevent_dce_block "prevent_dce_block" |
| 20 | OpMemberName %prevent_dce_block 0 "inner" |
| 21 | OpName %prevent_dce "prevent_dce" |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 22 | OpName %mix_38cbbb "mix_38cbbb" |
| 23 | OpName %arg_0 "arg_0" |
| 24 | OpName %arg_1 "arg_1" |
| 25 | OpName %arg_2 "arg_2" |
| 26 | OpName %res "res" |
| 27 | OpName %vertex_main_inner "vertex_main_inner" |
| 28 | OpName %vertex_main "vertex_main" |
| 29 | OpName %fragment_main "fragment_main" |
| 30 | OpName %compute_main "compute_main" |
| 31 | OpDecorate %value BuiltIn Position |
| 32 | OpDecorate %vertex_point_size BuiltIn PointSize |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 33 | OpDecorate %prevent_dce_block Block |
| 34 | OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| 35 | OpDecorate %prevent_dce DescriptorSet 2 |
| 36 | OpDecorate %prevent_dce Binding 0 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 37 | %float = OpTypeFloat 32 |
| 38 | %v4float = OpTypeVector %float 4 |
| 39 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 40 | %5 = OpConstantNull %v4float |
| 41 | %value = OpVariable %_ptr_Output_v4float Output %5 |
| 42 | %_ptr_Output_float = OpTypePointer Output %float |
| 43 | %8 = OpConstantNull %float |
| 44 | %vertex_point_size = OpVariable %_ptr_Output_float Output %8 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 45 | %half = OpTypeFloat 16 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 46 | %prevent_dce_block = OpTypeStruct %half |
| 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 | %13 = OpTypeFunction %void |
dan sinclair | d9b68eb | 2022-11-10 00:32:12 +0000 | [diff] [blame] | 51 | %half_0x1p_0 = OpConstant %half 0x1p+0 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 52 | %_ptr_Function_half = OpTypePointer Function %half |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 53 | %20 = OpConstantNull %half |
| 54 | %uint = OpTypeInt 32 0 |
| 55 | %uint_0 = OpConstant %uint 0 |
| 56 | %_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half |
| 57 | %34 = OpTypeFunction %v4float |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 58 | %float_1 = OpConstant %float 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 59 | %mix_38cbbb = OpFunction %void None %13 |
| 60 | %16 = OpLabel |
| 61 | %arg_0 = OpVariable %_ptr_Function_half Function %20 |
| 62 | %arg_1 = OpVariable %_ptr_Function_half Function %20 |
| 63 | %arg_2 = OpVariable %_ptr_Function_half Function %20 |
| 64 | %res = OpVariable %_ptr_Function_half Function %20 |
dan sinclair | d9b68eb | 2022-11-10 00:32:12 +0000 | [diff] [blame] | 65 | OpStore %arg_0 %half_0x1p_0 |
| 66 | OpStore %arg_1 %half_0x1p_0 |
| 67 | OpStore %arg_2 %half_0x1p_0 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 68 | %25 = OpLoad %half %arg_0 |
| 69 | %26 = OpLoad %half %arg_1 |
| 70 | %27 = OpLoad %half %arg_2 |
| 71 | %23 = OpExtInst %half %24 FMix %25 %26 %27 |
| 72 | OpStore %res %23 |
| 73 | %32 = OpAccessChain %_ptr_StorageBuffer_half %prevent_dce %uint_0 |
| 74 | %33 = OpLoad %half %res |
| 75 | OpStore %32 %33 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 76 | OpReturn |
| 77 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 78 | %vertex_main_inner = OpFunction %v4float None %34 |
| 79 | %36 = OpLabel |
| 80 | %37 = OpFunctionCall %void %mix_38cbbb |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 81 | OpReturnValue %5 |
| 82 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 83 | %vertex_main = OpFunction %void None %13 |
| 84 | %39 = OpLabel |
| 85 | %40 = OpFunctionCall %v4float %vertex_main_inner |
| 86 | OpStore %value %40 |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 87 | OpStore %vertex_point_size %float_1 |
| 88 | OpReturn |
| 89 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 90 | %fragment_main = OpFunction %void None %13 |
| 91 | %43 = OpLabel |
| 92 | %44 = OpFunctionCall %void %mix_38cbbb |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 93 | OpReturn |
| 94 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 95 | %compute_main = OpFunction %void None %13 |
| 96 | %46 = OpLabel |
| 97 | %47 = OpFunctionCall %void %mix_38cbbb |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 98 | OpReturn |
| 99 | OpFunctionEnd |