| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 107 |
| ; Schema: 0 |
| OpCapability Shader |
| %56 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID_param_1 |
| OpExecutionMode %main LocalSize 128 1 1 |
| OpName %gl_GlobalInvocationID_param_1 "gl_GlobalInvocationID_param_1" |
| OpName %ssbOut "ssbOut" |
| OpMemberName %ssbOut 0 "result" |
| OpName %x_16 "x_16" |
| OpName %ssbA "ssbA" |
| OpMemberName %ssbA 0 "A" |
| OpName %x_20 "x_20" |
| OpName %gl_GlobalInvocationID "gl_GlobalInvocationID" |
| OpName %x_24_block "x_24_block" |
| OpMemberName %x_24_block 0 "inner" |
| OpName %Uniforms "Uniforms" |
| OpMemberName %Uniforms 0 "NAN" |
| OpMemberName %Uniforms 1 "aShape" |
| OpMemberName %Uniforms 2 "outShape" |
| OpMemberName %Uniforms 3 "outShapeStrides" |
| OpMemberName %Uniforms 4 "size" |
| OpName %x_24 "x_24" |
| OpName %getAAtOutCoords_ "getAAtOutCoords_" |
| OpName %unaryOperation_f1_ "unaryOperation_f1_" |
| OpName %a "a" |
| OpName %tint_return_flag "tint_return_flag" |
| OpName %tint_return_value "tint_return_value" |
| OpName %setOutput_i1_f1_ "setOutput_i1_f1_" |
| OpName %flatIndex "flatIndex" |
| OpName %value "value" |
| OpName %main_1 "main_1" |
| OpName %index "index" |
| OpName %a_1 "a_1" |
| OpName %param "param" |
| OpName %param_1 "param_1" |
| OpName %param_2 "param_2" |
| OpName %main_inner "main_inner" |
| OpName %gl_GlobalInvocationID_param "gl_GlobalInvocationID_param" |
| OpName %main "main" |
| OpDecorate %gl_GlobalInvocationID_param_1 BuiltIn GlobalInvocationId |
| OpDecorate %ssbOut Block |
| OpMemberDecorate %ssbOut 0 Offset 0 |
| OpDecorate %_runtimearr_float ArrayStride 4 |
| OpDecorate %x_16 DescriptorSet 0 |
| OpDecorate %x_16 Binding 0 |
| OpDecorate %ssbA Block |
| OpMemberDecorate %ssbA 0 Offset 0 |
| OpDecorate %x_20 NonWritable |
| OpDecorate %x_20 DescriptorSet 0 |
| OpDecorate %x_20 Binding 1 |
| OpDecorate %x_24_block Block |
| OpMemberDecorate %x_24_block 0 Offset 0 |
| OpMemberDecorate %Uniforms 0 Offset 0 |
| OpMemberDecorate %Uniforms 1 Offset 4 |
| OpMemberDecorate %Uniforms 2 Offset 8 |
| OpMemberDecorate %Uniforms 3 Offset 12 |
| OpMemberDecorate %Uniforms 4 Offset 16 |
| OpDecorate %x_24 NonWritable |
| OpDecorate %x_24 DescriptorSet 0 |
| OpDecorate %x_24 Binding 2 |
| %uint = OpTypeInt 32 0 |
| %v3uint = OpTypeVector %uint 3 |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| %gl_GlobalInvocationID_param_1 = OpVariable %_ptr_Input_v3uint Input |
| %float = OpTypeFloat 32 |
| %_runtimearr_float = OpTypeRuntimeArray %float |
| %ssbOut = OpTypeStruct %_runtimearr_float |
| %_ptr_StorageBuffer_ssbOut = OpTypePointer StorageBuffer %ssbOut |
| %x_16 = OpVariable %_ptr_StorageBuffer_ssbOut StorageBuffer |
| %ssbA = OpTypeStruct %_runtimearr_float |
| %_ptr_StorageBuffer_ssbA = OpTypePointer StorageBuffer %ssbA |
| %x_20 = OpVariable %_ptr_StorageBuffer_ssbA StorageBuffer |
| %_ptr_Private_v3uint = OpTypePointer Private %v3uint |
| %15 = OpConstantNull %v3uint |
| %gl_GlobalInvocationID = OpVariable %_ptr_Private_v3uint Private %15 |
| %int = OpTypeInt 32 1 |
| %Uniforms = OpTypeStruct %float %int %int %int %int |
| %x_24_block = OpTypeStruct %Uniforms |
| %_ptr_Uniform_x_24_block = OpTypePointer Uniform %x_24_block |
| %x_24 = OpVariable %_ptr_Uniform_x_24_block Uniform |
| %21 = OpTypeFunction %float |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Private_uint = OpTypePointer Private %uint |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %31 = OpTypeFunction %float %_ptr_Function_float |
| %bool = OpTypeBool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %39 = OpConstantNull %bool |
| %41 = OpConstantNull %float |
| %true = OpConstantTrue %bool |
| %float_0x1p_128 = OpConstant %float 0x1p+128 |
| %void = OpTypeVoid |
| %_ptr_Function_int = OpTypePointer Function %int |
| %58 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_float |
| %70 = OpTypeFunction %void |
| %74 = OpConstantNull %int |
| %uint_4 = OpConstant %uint 4 |
| %_ptr_Uniform_int = OpTypePointer Uniform %int |
| %98 = OpTypeFunction %void %v3uint |
| %getAAtOutCoords_ = OpFunction %float None %21 |
| %23 = OpLabel |
| %26 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_0 |
| %27 = OpLoad %uint %26 |
| %29 = OpAccessChain %_ptr_StorageBuffer_float %x_20 %uint_0 %27 |
| %30 = OpLoad %float %29 |
| OpReturnValue %30 |
| OpFunctionEnd |
| %unaryOperation_f1_ = OpFunction %float None %31 |
| %a = OpFunctionParameter %_ptr_Function_float |
| %35 = OpLabel |
| %tint_return_flag = OpVariable %_ptr_Function_bool Function %39 |
| %tint_return_value = OpVariable %_ptr_Function_float Function %41 |
| %43 = OpLoad %float %a |
| %44 = OpFOrdLessThan %bool %43 %41 |
| OpSelectionMerge %45 None |
| OpBranchConditional %44 %46 %45 |
| %46 = OpLabel |
| OpStore %tint_return_flag %true |
| OpStore %tint_return_value %float_0x1p_128 |
| OpBranch %45 |
| %45 = OpLabel |
| %50 = OpLoad %bool %tint_return_flag |
| %49 = OpLogicalNot %bool %50 |
| OpSelectionMerge %51 None |
| OpBranchConditional %49 %52 %51 |
| %52 = OpLabel |
| %54 = OpLoad %float %a |
| OpStore %tint_return_flag %true |
| %55 = OpExtInst %float %56 Log %54 |
| OpStore %tint_return_value %55 |
| OpBranch %51 |
| %51 = OpLabel |
| %57 = OpLoad %float %tint_return_value |
| OpReturnValue %57 |
| OpFunctionEnd |
| %setOutput_i1_f1_ = OpFunction %void None %58 |
| %flatIndex = OpFunctionParameter %_ptr_Function_int |
| %value = OpFunctionParameter %_ptr_Function_float |
| %64 = OpLabel |
| %66 = OpLoad %int %flatIndex |
| %68 = OpLoad %float %value |
| %69 = OpAccessChain %_ptr_StorageBuffer_float %x_16 %uint_0 %66 |
| OpStore %69 %68 |
| OpReturn |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %70 |
| %72 = OpLabel |
| %index = OpVariable %_ptr_Function_int Function %74 |
| %a_1 = OpVariable %_ptr_Function_float Function %41 |
| %param = OpVariable %_ptr_Function_float Function %41 |
| %param_1 = OpVariable %_ptr_Function_int Function %74 |
| %param_2 = OpVariable %_ptr_Function_float Function %41 |
| %79 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_0 |
| %80 = OpLoad %uint %79 |
| %81 = OpBitcast %int %80 |
| OpStore %index %81 |
| %82 = OpLoad %int %index |
| %85 = OpAccessChain %_ptr_Uniform_int %x_24 %uint_0 %uint_4 |
| %86 = OpLoad %int %85 |
| %87 = OpSLessThan %bool %82 %86 |
| OpSelectionMerge %88 None |
| OpBranchConditional %87 %89 %88 |
| %89 = OpLabel |
| %90 = OpFunctionCall %float %getAAtOutCoords_ |
| OpStore %a_1 %90 |
| %91 = OpLoad %float %a_1 |
| OpStore %param %91 |
| %92 = OpFunctionCall %float %unaryOperation_f1_ %param |
| %94 = OpLoad %int %index |
| OpStore %param_1 %94 |
| OpStore %param_2 %92 |
| %95 = OpFunctionCall %void %setOutput_i1_f1_ %param_1 %param_2 |
| OpBranch %88 |
| %88 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %98 |
| %gl_GlobalInvocationID_param = OpFunctionParameter %v3uint |
| %101 = OpLabel |
| OpStore %gl_GlobalInvocationID %gl_GlobalInvocationID_param |
| %102 = OpFunctionCall %void %main_1 |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %70 |
| %104 = OpLabel |
| %106 = OpLoad %v3uint %gl_GlobalInvocationID_param_1 |
| %105 = OpFunctionCall %void %main_inner %106 |
| OpReturn |
| OpFunctionEnd |