2021-08-04 22:15:28 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
|
|
|
; Bound: 46
|
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpMemoryModel Logical GLSL450
|
2021-08-05 17:34:19 +00:00
|
|
|
OpEntryPoint Fragment %main "main" %a_1 %mask_1 %b_1 %a_2 %mask_2
|
2021-08-04 22:15:28 +00:00
|
|
|
OpExecutionMode %main OriginUpperLeft
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %a_1 "a_1"
|
|
|
|
OpName %mask_1 "mask_1"
|
|
|
|
OpName %b_1 "b_1"
|
|
|
|
OpName %a_2 "a_2"
|
|
|
|
OpName %mask_2 "mask_2"
|
2021-08-04 22:15:28 +00:00
|
|
|
OpName %FragIn "FragIn"
|
|
|
|
OpMemberName %FragIn 0 "a"
|
|
|
|
OpMemberName %FragIn 1 "mask"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpName %main_inner "main_inner"
|
|
|
|
OpName %in "in"
|
|
|
|
OpName %b "b"
|
2021-08-04 22:15:28 +00:00
|
|
|
OpName %main "main"
|
2021-08-05 17:34:19 +00:00
|
|
|
OpDecorate %a_1 Location 0
|
2021-08-04 22:15:28 +00:00
|
|
|
OpDecorate %_arr_uint_uint_1 ArrayStride 4
|
2021-08-05 17:34:19 +00:00
|
|
|
OpDecorate %mask_1 BuiltIn SampleMask
|
|
|
|
OpDecorate %b_1 Location 1
|
|
|
|
OpDecorate %a_2 Location 0
|
|
|
|
OpDecorate %mask_2 BuiltIn SampleMask
|
2021-08-04 22:15:28 +00:00
|
|
|
OpMemberDecorate %FragIn 0 Offset 0
|
|
|
|
OpMemberDecorate %FragIn 1 Offset 4
|
|
|
|
%float = OpTypeFloat 32
|
|
|
|
%_ptr_Input_float = OpTypePointer Input %float
|
2021-08-05 17:34:19 +00:00
|
|
|
%a_1 = OpVariable %_ptr_Input_float Input
|
2021-08-04 22:15:28 +00:00
|
|
|
%uint = OpTypeInt 32 0
|
|
|
|
%uint_1 = OpConstant %uint 1
|
|
|
|
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
|
|
|
%_ptr_Input__arr_uint_uint_1 = OpTypePointer Input %_arr_uint_uint_1
|
2021-08-05 17:34:19 +00:00
|
|
|
%mask_1 = OpVariable %_ptr_Input__arr_uint_uint_1 Input
|
|
|
|
%b_1 = OpVariable %_ptr_Input_float Input
|
2021-08-04 22:15:28 +00:00
|
|
|
%_ptr_Output_float = OpTypePointer Output %float
|
|
|
|
%12 = OpConstantNull %float
|
2021-08-05 17:34:19 +00:00
|
|
|
%a_2 = OpVariable %_ptr_Output_float Output %12
|
2021-08-04 22:15:28 +00:00
|
|
|
%_ptr_Output__arr_uint_uint_1 = OpTypePointer Output %_arr_uint_uint_1
|
|
|
|
%15 = OpConstantNull %_arr_uint_uint_1
|
2021-08-05 17:34:19 +00:00
|
|
|
%mask_2 = OpVariable %_ptr_Output__arr_uint_uint_1 Output %15
|
2021-08-04 22:15:28 +00:00
|
|
|
%FragIn = OpTypeStruct %float %uint
|
2021-08-05 17:34:19 +00:00
|
|
|
%16 = OpTypeFunction %FragIn %FragIn %float
|
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%bool = OpTypeBool
|
|
|
|
%void = OpTypeVoid
|
|
|
|
%29 = OpTypeFunction %void
|
2021-08-04 22:15:28 +00:00
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%int_0 = OpConstant %int 0
|
|
|
|
%_ptr_Input_uint = OpTypePointer Input %uint
|
2021-08-05 17:34:19 +00:00
|
|
|
%_ptr_Output_uint = OpTypePointer Output %uint
|
|
|
|
%main_inner = OpFunction %FragIn None %16
|
|
|
|
%in = OpFunctionParameter %FragIn
|
|
|
|
%b = OpFunctionParameter %float
|
2021-08-04 22:15:28 +00:00
|
|
|
%21 = OpLabel
|
2021-08-05 17:34:19 +00:00
|
|
|
%22 = OpCompositeExtract %uint %in 1
|
|
|
|
%24 = OpIEqual %bool %22 %uint_0
|
|
|
|
OpSelectionMerge %26 None
|
|
|
|
OpBranchConditional %24 %27 %26
|
|
|
|
%27 = OpLabel
|
|
|
|
OpReturnValue %in
|
|
|
|
%26 = OpLabel
|
|
|
|
%28 = OpCompositeConstruct %FragIn %b %uint_1
|
|
|
|
OpReturnValue %28
|
2021-08-04 22:15:28 +00:00
|
|
|
OpFunctionEnd
|
2021-08-05 17:34:19 +00:00
|
|
|
%main = OpFunction %void None %29
|
|
|
|
%32 = OpLabel
|
|
|
|
%34 = OpLoad %float %a_1
|
|
|
|
%38 = OpAccessChain %_ptr_Input_uint %mask_1 %int_0
|
|
|
|
%39 = OpLoad %uint %38
|
|
|
|
%40 = OpCompositeConstruct %FragIn %34 %39
|
|
|
|
%41 = OpLoad %float %b_1
|
|
|
|
%33 = OpFunctionCall %FragIn %main_inner %40 %41
|
|
|
|
%42 = OpCompositeExtract %float %33 0
|
|
|
|
OpStore %a_2 %42
|
|
|
|
%44 = OpAccessChain %_ptr_Output_uint %mask_2 %int_0
|
|
|
|
%45 = OpCompositeExtract %uint %33 1
|
|
|
|
OpStore %44 %45
|
2021-08-04 22:15:28 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|