dawn-cmake/test/tint/shader_io/fragment_input_builtins.wgs...

71 lines
2.9 KiB
Plaintext
Raw Permalink Normal View History

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 37
; 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 %main_inner "main_inner"
OpName %position "position"
OpName %front_facing "front_facing"
OpName %sample_index "sample_index"
OpName %sample_mask "sample_mask"
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
%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
%15 = OpTypeFunction %void %v4float %bool %uint %uint
%26 = OpTypeFunction %void
%int = OpTypeInt 32 1
%34 = OpConstantNull %int
%main_inner = OpFunction %void None %15
%position = OpFunctionParameter %v4float
%front_facing = OpFunctionParameter %bool
%sample_index = OpFunctionParameter %uint
%sample_mask = OpFunctionParameter %uint
%22 = OpLabel
OpSelectionMerge %23 None
OpBranchConditional %front_facing %24 %23
%24 = OpLabel
%25 = OpIAdd %uint %sample_index %sample_mask
OpBranch %23
%23 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %26
%28 = OpLabel
%30 = OpLoad %v4float %position_1
%31 = OpLoad %bool %front_facing_1
%32 = OpLoad %uint %sample_index_1
%35 = OpAccessChain %_ptr_Input_uint %sample_mask_1 %34
%36 = OpLoad %uint %35
%29 = OpFunctionCall %void %main_inner %30 %31 %32 %36
OpReturn
OpFunctionEnd