dawn-cmake/test/tint/shader_io/fragment_input_builtins_str...

80 lines
3.4 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 40
; Schema: 0
OpCapability Shader
OpCapability SampleRateShading
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %position_1 %front_facing_1 %sample_index_1 %sample_mask_1
OpExecutionMode %main OriginUpperLeft
OpName %position_1 "position_1"
OpName %front_facing_1 "front_facing_1"
OpName %sample_index_1 "sample_index_1"
OpName %sample_mask_1 "sample_mask_1"
OpName %FragmentInputs "FragmentInputs"
OpMemberName %FragmentInputs 0 "position"
OpMemberName %FragmentInputs 1 "front_facing"
OpMemberName %FragmentInputs 2 "sample_index"
OpMemberName %FragmentInputs 3 "sample_mask"
OpName %main_inner "main_inner"
OpName %inputs "inputs"
OpName %main "main"
OpDecorate %position_1 BuiltIn FragCoord
OpDecorate %front_facing_1 BuiltIn FrontFacing
OpDecorate %sample_index_1 BuiltIn SampleId
OpDecorate %sample_index_1 Flat
OpDecorate %_arr_uint_uint_1 ArrayStride 4
OpDecorate %sample_mask_1 BuiltIn SampleMask
OpDecorate %sample_mask_1 Flat
OpMemberDecorate %FragmentInputs 0 Offset 0
OpMemberDecorate %FragmentInputs 1 Offset 16
OpMemberDecorate %FragmentInputs 2 Offset 20
OpMemberDecorate %FragmentInputs 3 Offset 24
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%position_1 = OpVariable %_ptr_Input_v4float Input
%bool = OpTypeBool
%_ptr_Input_bool = OpTypePointer Input %bool
%front_facing_1 = OpVariable %_ptr_Input_bool Input
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%sample_index_1 = OpVariable %_ptr_Input_uint Input
%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
%sample_mask_1 = OpVariable %_ptr_Input__arr_uint_uint_1 Input
%void = OpTypeVoid
%FragmentInputs = OpTypeStruct %v4float %bool %uint %uint
%15 = OpTypeFunction %void %FragmentInputs
%28 = OpTypeFunction %void
%int = OpTypeInt 32 1
%36 = OpConstantNull %int
%main_inner = OpFunction %void None %15
%inputs = OpFunctionParameter %FragmentInputs
%20 = OpLabel
%21 = OpCompositeExtract %bool %inputs 1
OpSelectionMerge %22 None
OpBranchConditional %21 %23 %22
%23 = OpLabel
%24 = OpCompositeExtract %v4float %inputs 0
%25 = OpCompositeExtract %uint %inputs 2
%26 = OpCompositeExtract %uint %inputs 3
%27 = OpIAdd %uint %25 %26
OpBranch %22
%22 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %28
%30 = OpLabel
%32 = OpLoad %v4float %position_1
%33 = OpLoad %bool %front_facing_1
%34 = OpLoad %uint %sample_index_1
%37 = OpAccessChain %_ptr_Input_uint %sample_mask_1 %36
%38 = OpLoad %uint %37
%39 = OpCompositeConstruct %FragmentInputs %32 %33 %34 %38
%31 = OpFunctionCall %void %main_inner %39
OpReturn
OpFunctionEnd