Ben Clayton | da5424b | 2022-10-24 23:58:53 +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: 60 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +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" |
| 15 | OpName %arg_1 "arg_1" |
| 16 | OpName %arg_2 "arg_2" |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 17 | OpName %prevent_dce_block "prevent_dce_block" |
| 18 | OpMemberName %prevent_dce_block 0 "inner" |
| 19 | OpName %prevent_dce "prevent_dce" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 20 | OpName %textureGather_238ec4 "textureGather_238ec4" |
| 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 |
| 28 | OpDecorate %arg_1 DescriptorSet 1 |
| 29 | OpDecorate %arg_1 Binding 1 |
| 30 | OpDecorate %arg_2 DescriptorSet 1 |
| 31 | OpDecorate %arg_2 Binding 2 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 32 | OpDecorate %prevent_dce_block Block |
| 33 | OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| 34 | OpDecorate %prevent_dce DescriptorSet 2 |
| 35 | OpDecorate %prevent_dce Binding 0 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 36 | %float = OpTypeFloat 32 |
| 37 | %v4float = OpTypeVector %float 4 |
| 38 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 39 | %5 = OpConstantNull %v4float |
| 40 | %value = OpVariable %_ptr_Output_v4float Output %5 |
| 41 | %_ptr_Output_float = OpTypePointer Output %float |
| 42 | %8 = OpConstantNull %float |
| 43 | %vertex_point_size = OpVariable %_ptr_Output_float Output %8 |
| 44 | %11 = OpTypeImage %float 2D 0 1 0 1 Unknown |
| 45 | %_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11 |
| 46 | %arg_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant |
| 47 | %14 = OpTypeSampler |
| 48 | %_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14 |
| 49 | %arg_2 = OpVariable %_ptr_UniformConstant_14 UniformConstant |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 50 | %prevent_dce_block = OpTypeStruct %v4float |
| 51 | %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| 52 | %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 53 | %void = OpTypeVoid |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 54 | %18 = OpTypeFunction %void |
| 55 | %25 = OpTypeSampledImage %11 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 56 | %v3float = OpTypeVector %float 3 |
Ben Clayton | 4b60615 | 2022-11-04 17:06:03 +0000 | [diff] [blame] | 57 | %v2float = OpTypeVector %float 2 |
| 58 | %float_1 = OpConstant %float 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 59 | %30 = OpConstantComposite %v2float %float_1 %float_1 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 60 | %uint = OpTypeInt 32 0 |
| 61 | %uint_1 = OpConstant %uint 1 |
| 62 | %int = OpTypeInt 32 1 |
| 63 | %v2int = OpTypeVector %int 2 |
Ben Clayton | 4b60615 | 2022-11-04 17:06:03 +0000 | [diff] [blame] | 64 | %int_1 = OpConstant %int 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 65 | %40 = OpConstantComposite %v2int %int_1 %int_1 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 66 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 67 | %uint_0 = OpConstant %uint 0 |
| 68 | %_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float |
| 69 | %47 = OpTypeFunction %v4float |
| 70 | %textureGather_238ec4 = OpFunction %void None %18 |
| 71 | %21 = OpLabel |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 72 | %res = OpVariable %_ptr_Function_v4float Function %5 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 73 | %23 = OpLoad %14 %arg_2 |
| 74 | %24 = OpLoad %11 %arg_1 |
| 75 | %26 = OpSampledImage %25 %24 %23 |
| 76 | %31 = OpCompositeExtract %float %30 0 |
| 77 | %32 = OpCompositeExtract %float %30 1 |
| 78 | %33 = OpConvertUToF %float %uint_1 |
| 79 | %36 = OpCompositeConstruct %v3float %31 %32 %33 |
| 80 | %22 = OpImageGather %v4float %26 %36 %uint_1 ConstOffset %40 |
| 81 | OpStore %res %22 |
| 82 | %45 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0 |
| 83 | %46 = OpLoad %v4float %res |
| 84 | OpStore %45 %46 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 85 | OpReturn |
| 86 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 87 | %vertex_main_inner = OpFunction %v4float None %47 |
| 88 | %49 = OpLabel |
| 89 | %50 = OpFunctionCall %void %textureGather_238ec4 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 90 | OpReturnValue %5 |
| 91 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 92 | %vertex_main = OpFunction %void None %18 |
| 93 | %52 = OpLabel |
| 94 | %53 = OpFunctionCall %v4float %vertex_main_inner |
| 95 | OpStore %value %53 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 96 | OpStore %vertex_point_size %float_1 |
| 97 | OpReturn |
| 98 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 99 | %fragment_main = OpFunction %void None %18 |
| 100 | %55 = OpLabel |
| 101 | %56 = OpFunctionCall %void %textureGather_238ec4 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 102 | OpReturn |
| 103 | OpFunctionEnd |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 104 | %compute_main = OpFunction %void None %18 |
| 105 | %58 = OpLabel |
| 106 | %59 = OpFunctionCall %void %textureGather_238ec4 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 107 | OpReturn |
| 108 | OpFunctionEnd |