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