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