2020-11-20 21:28:50 +00:00
|
|
|
OpCapability Shader
|
|
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
|
|
OpMemoryModel Logical GLSL450
|
2021-03-22 16:05:31 +00:00
|
|
|
OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor %sk_Clockwise
|
|
|
|
OpExecutionMode %_entrypoint_v OriginUpperLeft
|
2020-11-20 21:28:50 +00:00
|
|
|
OpName %sk_FragColor "sk_FragColor"
|
|
|
|
OpName %sk_Clockwise "sk_Clockwise"
|
2021-02-03 22:44:47 +00:00
|
|
|
OpName %_UniformBuffer "_UniformBuffer"
|
|
|
|
OpMemberName %_UniformBuffer 0 "colorGreen"
|
|
|
|
OpMemberName %_UniformBuffer 1 "colorRed"
|
2021-03-22 16:05:31 +00:00
|
|
|
OpName %_entrypoint_v "_entrypoint_v"
|
|
|
|
OpName %foo_ff2 "foo_ff2"
|
|
|
|
OpName %bar_vf "bar_vf"
|
2020-12-02 16:53:51 +00:00
|
|
|
OpName %y "y"
|
2020-11-20 21:28:50 +00:00
|
|
|
OpName %main "main"
|
|
|
|
OpName %x "x"
|
|
|
|
OpDecorate %sk_FragColor RelaxedPrecision
|
|
|
|
OpDecorate %sk_FragColor Location 0
|
|
|
|
OpDecorate %sk_FragColor Index 0
|
|
|
|
OpDecorate %sk_Clockwise BuiltIn FrontFacing
|
2021-02-03 22:44:47 +00:00
|
|
|
OpMemberDecorate %_UniformBuffer 0 Offset 0
|
|
|
|
OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
|
|
|
|
OpMemberDecorate %_UniformBuffer 1 Offset 16
|
|
|
|
OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
|
|
|
|
OpDecorate %_UniformBuffer Block
|
|
|
|
OpDecorate %12 Binding 0
|
|
|
|
OpDecorate %12 DescriptorSet 0
|
2020-11-20 21:28:50 +00:00
|
|
|
OpDecorate %_arr_float_int_2 ArrayStride 16
|
2021-02-03 22:44:47 +00:00
|
|
|
OpDecorate %69 RelaxedPrecision
|
|
|
|
OpDecorate %71 RelaxedPrecision
|
|
|
|
OpDecorate %72 RelaxedPrecision
|
2020-11-20 21:28:50 +00:00
|
|
|
%float = OpTypeFloat 32
|
|
|
|
%v4float = OpTypeVector %float 4
|
|
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
|
|
%sk_FragColor = OpVariable %_ptr_Output_v4float Output
|
|
|
|
%bool = OpTypeBool
|
|
|
|
%_ptr_Input_bool = OpTypePointer Input %bool
|
|
|
|
%sk_Clockwise = OpVariable %_ptr_Input_bool Input
|
2021-02-03 22:44:47 +00:00
|
|
|
%_UniformBuffer = OpTypeStruct %v4float %v4float
|
|
|
|
%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
|
|
|
|
%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
|
|
|
|
%void = OpTypeVoid
|
|
|
|
%17 = OpTypeFunction %void
|
|
|
|
%v2float = OpTypeVector %float 2
|
|
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
|
|
%21 = OpTypeFunction %float %_ptr_Function_v2float
|
|
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
|
|
%30 = OpTypeFunction %void %_ptr_Function_float
|
2020-11-20 21:28:50 +00:00
|
|
|
%int = OpTypeInt 32 1
|
2020-12-02 19:26:04 +00:00
|
|
|
%int_2 = OpConstant %int 2
|
2020-12-03 15:40:28 +00:00
|
|
|
%_arr_float_int_2 = OpTypeArray %float %int_2
|
|
|
|
%_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2
|
2020-12-02 16:53:51 +00:00
|
|
|
%int_0 = OpConstant %int 0
|
|
|
|
%float_2 = OpConstant %float 2
|
2021-02-03 22:44:47 +00:00
|
|
|
%int_1 = OpConstant %int 1
|
|
|
|
%54 = OpTypeFunction %v4float
|
2020-12-02 16:53:51 +00:00
|
|
|
%float_10 = OpConstant %float 10
|
2021-02-03 22:44:47 +00:00
|
|
|
%float_200 = OpConstant %float 200
|
|
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
|
|
|
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
|
2021-03-22 16:05:31 +00:00
|
|
|
%_entrypoint_v = OpFunction %void None %17
|
2020-12-03 15:40:28 +00:00
|
|
|
%18 = OpLabel
|
2021-02-03 22:44:47 +00:00
|
|
|
%19 = OpFunctionCall %v4float %main
|
|
|
|
OpStore %sk_FragColor %19
|
|
|
|
OpReturn
|
2020-12-02 16:53:51 +00:00
|
|
|
OpFunctionEnd
|
2021-03-22 16:05:31 +00:00
|
|
|
%foo_ff2 = OpFunction %float None %21
|
2021-02-03 22:44:47 +00:00
|
|
|
%23 = OpFunctionParameter %_ptr_Function_v2float
|
|
|
|
%24 = OpLabel
|
|
|
|
%25 = OpLoad %v2float %23
|
|
|
|
%26 = OpCompositeExtract %float %25 0
|
|
|
|
%27 = OpLoad %v2float %23
|
|
|
|
%28 = OpCompositeExtract %float %27 1
|
|
|
|
%29 = OpFMul %float %26 %28
|
|
|
|
OpReturnValue %29
|
|
|
|
OpFunctionEnd
|
2021-03-22 16:05:31 +00:00
|
|
|
%bar_vf = OpFunction %void None %30
|
2021-02-03 22:44:47 +00:00
|
|
|
%32 = OpFunctionParameter %_ptr_Function_float
|
|
|
|
%33 = OpLabel
|
2020-12-02 16:53:51 +00:00
|
|
|
%y = OpVariable %_ptr_Function__arr_float_int_2 Function
|
2021-02-03 22:44:47 +00:00
|
|
|
%52 = OpVariable %_ptr_Function_v2float Function
|
|
|
|
%39 = OpLoad %float %32
|
|
|
|
%41 = OpAccessChain %_ptr_Function_float %y %int_0
|
|
|
|
OpStore %41 %39
|
|
|
|
%42 = OpLoad %float %32
|
|
|
|
%44 = OpFMul %float %42 %float_2
|
|
|
|
%46 = OpAccessChain %_ptr_Function_float %y %int_1
|
|
|
|
OpStore %46 %44
|
|
|
|
%47 = OpAccessChain %_ptr_Function_float %y %int_0
|
|
|
|
%48 = OpLoad %float %47
|
|
|
|
%49 = OpAccessChain %_ptr_Function_float %y %int_1
|
|
|
|
%50 = OpLoad %float %49
|
|
|
|
%51 = OpCompositeConstruct %v2float %48 %50
|
|
|
|
OpStore %52 %51
|
2021-03-22 16:05:31 +00:00
|
|
|
%53 = OpFunctionCall %float %foo_ff2 %52
|
2021-02-03 22:44:47 +00:00
|
|
|
OpStore %32 %53
|
2020-12-02 16:53:51 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2021-02-03 22:44:47 +00:00
|
|
|
%main = OpFunction %v4float None %54
|
|
|
|
%55 = OpLabel
|
2020-11-20 21:28:50 +00:00
|
|
|
%x = OpVariable %_ptr_Function_float Function
|
2021-02-03 22:44:47 +00:00
|
|
|
%62 = OpVariable %_ptr_Function_v4float Function
|
2020-11-20 21:28:50 +00:00
|
|
|
OpStore %x %float_10
|
2021-03-22 16:05:31 +00:00
|
|
|
%58 = OpFunctionCall %void %bar_vf %x
|
2021-02-03 22:44:47 +00:00
|
|
|
%59 = OpLoad %float %x
|
|
|
|
%61 = OpFOrdEqual %bool %59 %float_200
|
|
|
|
OpSelectionMerge %66 None
|
|
|
|
OpBranchConditional %61 %64 %65
|
|
|
|
%64 = OpLabel
|
|
|
|
%67 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
|
|
|
|
%69 = OpLoad %v4float %67
|
|
|
|
OpStore %62 %69
|
|
|
|
OpBranch %66
|
|
|
|
%65 = OpLabel
|
|
|
|
%70 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
|
|
|
|
%71 = OpLoad %v4float %70
|
|
|
|
OpStore %62 %71
|
|
|
|
OpBranch %66
|
|
|
|
%66 = OpLabel
|
|
|
|
%72 = OpLoad %v4float %62
|
|
|
|
OpReturnValue %72
|
2020-11-20 21:28:50 +00:00
|
|
|
OpFunctionEnd
|