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 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 4 | ; Bound: 84 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 8 | OpEntryPoint Fragment %fragment_main "fragment_main" |
| 9 | OpEntryPoint GLCompute %compute_main "compute_main" |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 10 | OpEntryPoint Vertex %vertex_main "vertex_main" %pos_1 %prevent_dce_1 %vertex_point_size |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 11 | OpExecutionMode %fragment_main OriginUpperLeft |
| 12 | OpExecutionMode %compute_main LocalSize 1 1 1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 13 | OpName %pos_1 "pos_1" |
| 14 | OpName %prevent_dce_1 "prevent_dce_1" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 15 | OpName %vertex_point_size "vertex_point_size" |
| 16 | OpName %arg_0 "arg_0" |
| 17 | OpName %arg_1 "arg_1" |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 18 | OpName %prevent_dce_block "prevent_dce_block" |
| 19 | OpMemberName %prevent_dce_block 0 "inner" |
| 20 | OpName %prevent_dce "prevent_dce" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 21 | OpName %textureSampleCompareLevel_bcb3dd "textureSampleCompareLevel_bcb3dd" |
| 22 | OpName %arg_2 "arg_2" |
| 23 | OpName %arg_3 "arg_3" |
| 24 | OpName %arg_4 "arg_4" |
| 25 | OpName %res "res" |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 26 | OpName %fragment_main "fragment_main" |
| 27 | OpName %compute_main "compute_main" |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 28 | OpName %VertexOutput "VertexOutput" |
| 29 | OpMemberName %VertexOutput 0 "pos" |
| 30 | OpMemberName %VertexOutput 1 "prevent_dce" |
| 31 | OpName %vertex_main_inner "vertex_main_inner" |
| 32 | OpName %out "out" |
| 33 | OpName %vertex_main "vertex_main" |
| 34 | OpDecorate %pos_1 BuiltIn Position |
| 35 | OpDecorate %prevent_dce_1 Location 0 |
| 36 | OpDecorate %prevent_dce_1 Flat |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 37 | OpDecorate %vertex_point_size BuiltIn PointSize |
| 38 | OpDecorate %arg_0 DescriptorSet 1 |
| 39 | OpDecorate %arg_0 Binding 0 |
| 40 | OpDecorate %arg_1 DescriptorSet 1 |
| 41 | OpDecorate %arg_1 Binding 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 42 | OpDecorate %prevent_dce_block Block |
| 43 | OpMemberDecorate %prevent_dce_block 0 Offset 0 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 44 | OpDecorate %prevent_dce DescriptorSet 0 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 45 | OpDecorate %prevent_dce Binding 0 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 46 | OpMemberDecorate %VertexOutput 0 Offset 0 |
| 47 | OpMemberDecorate %VertexOutput 1 Offset 16 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 48 | %float = OpTypeFloat 32 |
| 49 | %v4float = OpTypeVector %float 4 |
| 50 | %_ptr_Output_v4float = OpTypePointer Output %v4float |
| 51 | %5 = OpConstantNull %v4float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 52 | %pos_1 = OpVariable %_ptr_Output_v4float Output %5 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 53 | %_ptr_Output_float = OpTypePointer Output %float |
| 54 | %8 = OpConstantNull %float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 55 | %prevent_dce_1 = OpVariable %_ptr_Output_float Output %8 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 56 | %vertex_point_size = OpVariable %_ptr_Output_float Output %8 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 57 | %12 = OpTypeImage %float 2D 0 1 0 1 Unknown |
| 58 | %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 |
| 59 | %arg_0 = OpVariable %_ptr_UniformConstant_12 UniformConstant |
| 60 | %15 = OpTypeSampler |
| 61 | %_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15 |
| 62 | %arg_1 = OpVariable %_ptr_UniformConstant_15 UniformConstant |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 63 | %prevent_dce_block = OpTypeStruct %float |
| 64 | %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| 65 | %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 66 | %19 = OpTypeFunction %float |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 67 | %v2float = OpTypeVector %float 2 |
Ben Clayton | 4b60615 | 2022-11-04 17:06:03 +0000 | [diff] [blame] | 68 | %float_1 = OpConstant %float 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 69 | %24 = OpConstantComposite %v2float %float_1 %float_1 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 70 | %_ptr_Function_v2float = OpTypePointer Function %v2float |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 71 | %27 = OpConstantNull %v2float |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 72 | %uint = OpTypeInt 32 0 |
| 73 | %uint_1 = OpConstant %uint 1 |
| 74 | %_ptr_Function_uint = OpTypePointer Function %uint |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 75 | %32 = OpConstantNull %uint |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 76 | %_ptr_Function_float = OpTypePointer Function %float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 77 | %38 = OpTypeSampledImage %12 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 78 | %v3float = OpTypeVector %float 3 |
| 79 | %float_0 = OpConstant %float 0 |
| 80 | %int = OpTypeInt 32 1 |
| 81 | %v2int = OpTypeVector %int 2 |
Ben Clayton | 4b60615 | 2022-11-04 17:06:03 +0000 | [diff] [blame] | 82 | %int_1 = OpConstant %int 1 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 83 | %52 = OpConstantComposite %v2int %int_1 %int_1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 84 | %void = OpTypeVoid |
| 85 | %55 = OpTypeFunction %void |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 86 | %uint_0 = OpConstant %uint 0 |
| 87 | %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 88 | %VertexOutput = OpTypeStruct %v4float %float |
| 89 | %67 = OpTypeFunction %VertexOutput |
| 90 | %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| 91 | %73 = OpConstantNull %VertexOutput |
| 92 | %_ptr_Function_v4float = OpTypePointer Function %v4float |
| 93 | %textureSampleCompareLevel_bcb3dd = OpFunction %float None %19 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 94 | %21 = OpLabel |
| 95 | %arg_2 = OpVariable %_ptr_Function_v2float Function %27 |
| 96 | %arg_3 = OpVariable %_ptr_Function_uint Function %32 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 97 | %arg_4 = OpVariable %_ptr_Function_float Function %8 |
| 98 | %res = OpVariable %_ptr_Function_float Function %8 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 99 | OpStore %arg_2 %24 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 100 | OpStore %arg_3 %uint_1 |
| 101 | OpStore %arg_4 %float_1 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 102 | %36 = OpLoad %15 %arg_1 |
| 103 | %37 = OpLoad %12 %arg_0 |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 104 | %39 = OpSampledImage %38 %37 %36 |
| 105 | %41 = OpLoad %v2float %arg_2 |
| 106 | %42 = OpCompositeExtract %float %41 0 |
| 107 | %43 = OpCompositeExtract %float %41 1 |
| 108 | %45 = OpLoad %uint %arg_3 |
| 109 | %44 = OpConvertUToF %float %45 |
| 110 | %46 = OpCompositeConstruct %v3float %42 %43 %44 |
| 111 | %47 = OpLoad %float %arg_4 |
| 112 | %35 = OpImageSampleDrefExplicitLod %float %39 %46 %47 Lod|ConstOffset %float_0 %52 |
| 113 | OpStore %res %35 |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 114 | %54 = OpLoad %float %res |
| 115 | OpReturnValue %54 |
| 116 | OpFunctionEnd |
| 117 | %fragment_main = OpFunction %void None %55 |
| 118 | %58 = OpLabel |
| 119 | %61 = OpAccessChain %_ptr_StorageBuffer_float %prevent_dce %uint_0 |
| 120 | %62 = OpFunctionCall %float %textureSampleCompareLevel_bcb3dd |
| 121 | OpStore %61 %62 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 122 | OpReturn |
| 123 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 124 | %compute_main = OpFunction %void None %55 |
| 125 | %64 = OpLabel |
| 126 | %65 = OpAccessChain %_ptr_StorageBuffer_float %prevent_dce %uint_0 |
| 127 | %66 = OpFunctionCall %float %textureSampleCompareLevel_bcb3dd |
| 128 | OpStore %65 %66 |
| 129 | OpReturn |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 130 | OpFunctionEnd |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 131 | %vertex_main_inner = OpFunction %VertexOutput None %67 |
| 132 | %70 = OpLabel |
| 133 | %out = OpVariable %_ptr_Function_VertexOutput Function %73 |
| 134 | %75 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| 135 | OpStore %75 %5 |
| 136 | %76 = OpAccessChain %_ptr_Function_float %out %uint_1 |
| 137 | %77 = OpFunctionCall %float %textureSampleCompareLevel_bcb3dd |
| 138 | OpStore %76 %77 |
| 139 | %78 = OpLoad %VertexOutput %out |
| 140 | OpReturnValue %78 |
| 141 | OpFunctionEnd |
| 142 | %vertex_main = OpFunction %void None %55 |
| 143 | %80 = OpLabel |
| 144 | %81 = OpFunctionCall %VertexOutput %vertex_main_inner |
| 145 | %82 = OpCompositeExtract %v4float %81 0 |
| 146 | OpStore %pos_1 %82 |
| 147 | %83 = OpCompositeExtract %float %81 1 |
| 148 | OpStore %prevent_dce_1 %83 |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 149 | OpStore %vertex_point_size %float_1 |
| 150 | OpReturn |
| 151 | OpFunctionEnd |