dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 1 | ; |
| 2 | ; fragment_main |
| 3 | ; |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 4 | ; SPIR-V |
| 5 | ; Version: 1.3 |
| 6 | ; Generator: Google Tint Compiler; 1 |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 7 | ; Bound: 22 |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 8 | ; Schema: 0 |
| 9 | OpCapability Shader |
| 10 | OpMemoryModel Logical GLSL450 |
| 11 | OpEntryPoint Fragment %fragment_main "fragment_main" |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 12 | OpExecutionMode %fragment_main OriginUpperLeft |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 13 | OpName %select_3a14be "select_3a14be" |
| 14 | OpName %arg_2 "arg_2" |
| 15 | OpName %res "res" |
| 16 | OpName %fragment_main "fragment_main" |
| 17 | %void = OpTypeVoid |
| 18 | %3 = OpTypeFunction %void |
| 19 | %bool = OpTypeBool |
| 20 | %_ptr_Function_bool = OpTypePointer Function %bool |
| 21 | %true = OpConstantTrue %bool |
| 22 | %v2bool = OpTypeVector %bool 2 |
| 23 | %int = OpTypeInt 32 1 |
| 24 | %v2int = OpTypeVector %int 2 |
| 25 | %int_1 = OpConstant %int 1 |
| 26 | %15 = OpConstantComposite %v2int %int_1 %int_1 |
| 27 | %_ptr_Function_v2int = OpTypePointer Function %v2int |
| 28 | %select_3a14be = OpFunction %void None %3 |
| 29 | %4 = OpLabel |
| 30 | %arg_2 = OpVariable %_ptr_Function_bool Function |
| 31 | %res = OpVariable %_ptr_Function_v2int Function |
| 32 | OpStore %arg_2 %true |
| 33 | %9 = OpLoad %bool %arg_2 None |
| 34 | %11 = OpCompositeConstruct %v2bool %9 %9 |
| 35 | %12 = OpSelect %v2int %11 %15 %15 |
| 36 | OpStore %res %12 |
| 37 | OpReturn |
| 38 | OpFunctionEnd |
| 39 | %fragment_main = OpFunction %void None %3 |
| 40 | %20 = OpLabel |
| 41 | %21 = OpFunctionCall %void %select_3a14be |
| 42 | OpReturn |
| 43 | OpFunctionEnd |
| 44 | ; |
| 45 | ; compute_main |
| 46 | ; |
| 47 | ; SPIR-V |
| 48 | ; Version: 1.3 |
| 49 | ; Generator: Google Tint Compiler; 1 |
| 50 | ; Bound: 22 |
| 51 | ; Schema: 0 |
| 52 | OpCapability Shader |
| 53 | OpMemoryModel Logical GLSL450 |
| 54 | OpEntryPoint GLCompute %compute_main "compute_main" |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 55 | OpExecutionMode %compute_main LocalSize 1 1 1 |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 56 | OpName %select_3a14be "select_3a14be" |
| 57 | OpName %arg_2 "arg_2" |
| 58 | OpName %res "res" |
| 59 | OpName %compute_main "compute_main" |
| 60 | %void = OpTypeVoid |
| 61 | %3 = OpTypeFunction %void |
| 62 | %bool = OpTypeBool |
| 63 | %_ptr_Function_bool = OpTypePointer Function %bool |
| 64 | %true = OpConstantTrue %bool |
| 65 | %v2bool = OpTypeVector %bool 2 |
| 66 | %int = OpTypeInt 32 1 |
| 67 | %v2int = OpTypeVector %int 2 |
| 68 | %int_1 = OpConstant %int 1 |
| 69 | %15 = OpConstantComposite %v2int %int_1 %int_1 |
| 70 | %_ptr_Function_v2int = OpTypePointer Function %v2int |
| 71 | %select_3a14be = OpFunction %void None %3 |
| 72 | %4 = OpLabel |
| 73 | %arg_2 = OpVariable %_ptr_Function_bool Function |
| 74 | %res = OpVariable %_ptr_Function_v2int Function |
| 75 | OpStore %arg_2 %true |
| 76 | %9 = OpLoad %bool %arg_2 None |
| 77 | %11 = OpCompositeConstruct %v2bool %9 %9 |
| 78 | %12 = OpSelect %v2int %11 %15 %15 |
| 79 | OpStore %res %12 |
| 80 | OpReturn |
| 81 | OpFunctionEnd |
| 82 | %compute_main = OpFunction %void None %3 |
| 83 | %20 = OpLabel |
| 84 | %21 = OpFunctionCall %void %select_3a14be |
| 85 | OpReturn |
| 86 | OpFunctionEnd |
| 87 | ; |
| 88 | ; vertex_main |
| 89 | ; |
| 90 | ; SPIR-V |
| 91 | ; Version: 1.3 |
| 92 | ; Generator: Google Tint Compiler; 1 |
| 93 | ; Bound: 44 |
| 94 | ; Schema: 0 |
| 95 | OpCapability Shader |
| 96 | OpMemoryModel Logical GLSL450 |
| 97 | OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main___point_size_Output |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 98 | OpName %vertex_main_position_Output "vertex_main_position_Output" |
| 99 | OpName %vertex_main___point_size_Output "vertex_main___point_size_Output" |
| 100 | OpName %select_3a14be "select_3a14be" |
| 101 | OpName %arg_2 "arg_2" |
| 102 | OpName %res "res" |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 103 | OpName %vertex_main_inner "vertex_main_inner" |
| 104 | OpMemberName %VertexOutput 0 "pos" |
| 105 | OpName %VertexOutput "VertexOutput" |
| 106 | OpName %out "out" |
| 107 | OpName %vertex_main "vertex_main" |
| 108 | OpDecorate %vertex_main_position_Output BuiltIn Position |
| 109 | OpDecorate %vertex_main___point_size_Output BuiltIn PointSize |
| 110 | OpMemberDecorate %VertexOutput 0 Offset 0 |
| 111 | %float = OpTypeFloat 32 |
| 112 | %v4float = OpTypeVector %float 4 |
| 113 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 114 | %vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output |
| 115 | %_ptr_Output_float = OpTypePointer Output %float |
| 116 | %vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output |
| 117 | %void = OpTypeVoid |
| 118 | %9 = OpTypeFunction %void |
| 119 | %bool = OpTypeBool |
| 120 | %_ptr_Function_bool = OpTypePointer Function %bool |
| 121 | %true = OpConstantTrue %bool |
| 122 | %v2bool = OpTypeVector %bool 2 |
| 123 | %int = OpTypeInt 32 1 |
| 124 | %v2int = OpTypeVector %int 2 |
| 125 | %int_1 = OpConstant %int 1 |
| 126 | %21 = OpConstantComposite %v2int %int_1 %int_1 |
| 127 | %_ptr_Function_v2int = OpTypePointer Function %v2int |
| 128 | %VertexOutput = OpTypeStruct %v4float |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 129 | %27 = OpTypeFunction %VertexOutput |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 130 | %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 131 | %31 = OpConstantNull %VertexOutput |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 132 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
| 133 | %uint = OpTypeInt 32 0 |
| 134 | %uint_0 = OpConstant %uint 0 |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 135 | %36 = OpConstantNull %v4float |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 136 | %float_1 = OpConstant %float 1 |
| 137 | %select_3a14be = OpFunction %void None %9 |
| 138 | %10 = OpLabel |
| 139 | %arg_2 = OpVariable %_ptr_Function_bool Function |
| 140 | %res = OpVariable %_ptr_Function_v2int Function |
| 141 | OpStore %arg_2 %true |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 142 | %15 = OpLoad %bool %arg_2 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 143 | %17 = OpCompositeConstruct %v2bool %15 %15 |
| 144 | %18 = OpSelect %v2int %17 %21 %21 |
| 145 | OpStore %res %18 |
| 146 | OpReturn |
| 147 | OpFunctionEnd |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 148 | %vertex_main_inner = OpFunction %VertexOutput None %27 |
| 149 | %28 = OpLabel |
| 150 | %out = OpVariable %_ptr_Function_VertexOutput Function %31 |
| 151 | %32 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| 152 | OpStore %32 %36 None |
| 153 | %37 = OpFunctionCall %void %select_3a14be |
| 154 | %38 = OpLoad %VertexOutput %out None |
| 155 | OpReturnValue %38 |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 156 | OpFunctionEnd |
| 157 | %vertex_main = OpFunction %void None %9 |
dan sinclair | d319ae7 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 158 | %40 = OpLabel |
| 159 | %41 = OpFunctionCall %VertexOutput %vertex_main_inner |
| 160 | %42 = OpCompositeExtract %v4float %41 0 |
| 161 | OpStore %vertex_main_position_Output %42 None |
dan sinclair | 5026041 | 2024-08-28 19:43:27 +0000 | [diff] [blame] | 162 | OpStore %vertex_main___point_size_Output %float_1 None |
dan sinclair | 1b77b6c | 2024-08-06 15:47:05 +0000 | [diff] [blame] | 163 | OpReturn |
| 164 | OpFunctionEnd |