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: 41 |
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 | %19 = 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 %cos_c5c28e "cos_c5c28e" |
| 20 | OpName %arg_0 "arg_0" |
| 21 | OpName %res "res" |
| 22 | OpName %vertex_main_inner "vertex_main_inner" |
| 23 | OpName %vertex_main "vertex_main" |
| 24 | OpName %fragment_main "fragment_main" |
| 25 | OpName %compute_main "compute_main" |
| 26 | OpDecorate %value BuiltIn Position |
| 27 | OpDecorate %vertex_point_size BuiltIn PointSize |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 28 | OpDecorate %prevent_dce_block Block |
| 29 | OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| 30 | OpDecorate %prevent_dce DescriptorSet 2 |
| 31 | OpDecorate %prevent_dce Binding 0 |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 32 | %float = OpTypeFloat 32 |
| 33 | %v4float = OpTypeVector %float 4 |
| 34 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 35 | %5 = OpConstantNull %v4float |
| 36 | %value = OpVariable %_ptr_Output_v4float Output %5 |
| 37 | %_ptr_Output_float = OpTypePointer Output %float |
| 38 | %8 = OpConstantNull %float |
| 39 | %vertex_point_size = OpVariable %_ptr_Output_float Output %8 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 40 | %prevent_dce_block = OpTypeStruct %float |
| 41 | %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| 42 | %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 43 | %void = OpTypeVoid |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 44 | %12 = OpTypeFunction %void |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 45 | %_ptr_Function_float = OpTypePointer Function %float |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 46 | %uint = OpTypeInt 32 0 |
| 47 | %uint_0 = OpConstant %uint 0 |
| 48 | %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| 49 | %27 = OpTypeFunction %v4float |
dan sinclair | 02d4ea0 | 2022-11-10 15:52:41 +0000 | [diff] [blame] | 50 | %float_1 = OpConstant %float 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 51 | %cos_c5c28e = OpFunction %void None %12 |
| 52 | %15 = OpLabel |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 53 | %arg_0 = OpVariable %_ptr_Function_float Function %8 |
| 54 | %res = OpVariable %_ptr_Function_float Function %8 |
dan sinclair | 02d4ea0 | 2022-11-10 15:52:41 +0000 | [diff] [blame] | 55 | OpStore %arg_0 %8 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 56 | %20 = OpLoad %float %arg_0 |
| 57 | %18 = OpExtInst %float %19 Cos %20 |
| 58 | OpStore %res %18 |
| 59 | %25 = OpAccessChain %_ptr_StorageBuffer_float %prevent_dce %uint_0 |
| 60 | %26 = OpLoad %float %res |
| 61 | OpStore %25 %26 |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 62 | OpReturn |
| 63 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 64 | %vertex_main_inner = OpFunction %v4float None %27 |
| 65 | %29 = OpLabel |
| 66 | %30 = OpFunctionCall %void %cos_c5c28e |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 67 | OpReturnValue %5 |
| 68 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 69 | %vertex_main = OpFunction %void None %12 |
| 70 | %32 = OpLabel |
| 71 | %33 = OpFunctionCall %v4float %vertex_main_inner |
| 72 | OpStore %value %33 |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 73 | OpStore %vertex_point_size %float_1 |
| 74 | OpReturn |
| 75 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 76 | %fragment_main = OpFunction %void None %12 |
| 77 | %36 = OpLabel |
| 78 | %37 = OpFunctionCall %void %cos_c5c28e |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 79 | OpReturn |
| 80 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 81 | %compute_main = OpFunction %void None %12 |
| 82 | %39 = OpLabel |
| 83 | %40 = OpFunctionCall %void %cos_c5c28e |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 84 | OpReturn |
| 85 | OpFunctionEnd |