blob: e5146e412e755f1930bee4471933ecbb3040aa1a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 122
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpEntryPoint Vertex %vertex_main "vertex_main" %pos_1 %prevent_dce_1 %vertex_point_size
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %pos_1 "pos_1"
OpName %prevent_dce_1 "prevent_dce_1"
OpName %vertex_point_size "vertex_point_size"
OpName %prevent_dce_block "prevent_dce_block"
OpMemberName %prevent_dce_block 0 "inner"
OpName %prevent_dce "prevent_dce"
OpName %tint_count_leading_zeros "tint_count_leading_zeros"
OpName %v "v"
OpName %x "x"
OpName %countLeadingZeros_eab32b "countLeadingZeros_eab32b"
OpName %arg_0 "arg_0"
OpName %res "res"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpName %VertexOutput "VertexOutput"
OpMemberName %VertexOutput 0 "pos"
OpMemberName %VertexOutput 1 "prevent_dce"
OpName %vertex_main_inner "vertex_main_inner"
OpName %out "out"
OpName %vertex_main "vertex_main"
OpDecorate %pos_1 BuiltIn Position
OpDecorate %prevent_dce_1 Location 0
OpDecorate %prevent_dce_1 Flat
OpDecorate %vertex_point_size BuiltIn PointSize
OpDecorate %prevent_dce_block Block
OpMemberDecorate %prevent_dce_block 0 Offset 0
OpDecorate %prevent_dce DescriptorSet 0
OpDecorate %prevent_dce Binding 0
OpMemberDecorate %VertexOutput 0 Offset 0
OpMemberDecorate %VertexOutput 1 Offset 16
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%pos_1 = OpVariable %_ptr_Output_v4float Output %5
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%_ptr_Output_v4int = OpTypePointer Output %v4int
%10 = OpConstantNull %v4int
%prevent_dce_1 = OpVariable %_ptr_Output_v4int Output %10
%_ptr_Output_float = OpTypePointer Output %float
%13 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %13
%prevent_dce_block = OpTypeStruct %v4int
%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
%17 = OpTypeFunction %v4int %v4int
%uint = OpTypeInt 32 0
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%26 = OpConstantNull %v4uint
%uint_65535 = OpConstant %uint 65535
%30 = OpConstantComposite %v4uint %uint_65535 %uint_65535 %uint_65535 %uint_65535
%bool = OpTypeBool
%v4bool = OpTypeVector %bool 4
%uint_16 = OpConstant %uint 16
%35 = OpConstantComposite %v4uint %uint_16 %uint_16 %uint_16 %uint_16
%uint_16777215 = OpConstant %uint 16777215
%41 = OpConstantComposite %v4uint %uint_16777215 %uint_16777215 %uint_16777215 %uint_16777215
%uint_8 = OpConstant %uint 8
%44 = OpConstantComposite %v4uint %uint_8 %uint_8 %uint_8 %uint_8
%uint_268435455 = OpConstant %uint 268435455
%50 = OpConstantComposite %v4uint %uint_268435455 %uint_268435455 %uint_268435455 %uint_268435455
%uint_4 = OpConstant %uint 4
%53 = OpConstantComposite %v4uint %uint_4 %uint_4 %uint_4 %uint_4
%uint_1073741823 = OpConstant %uint 1073741823
%59 = OpConstantComposite %v4uint %uint_1073741823 %uint_1073741823 %uint_1073741823 %uint_1073741823
%uint_2 = OpConstant %uint 2
%62 = OpConstantComposite %v4uint %uint_2 %uint_2 %uint_2 %uint_2
%uint_2147483647 = OpConstant %uint 2147483647
%68 = OpConstantComposite %v4uint %uint_2147483647 %uint_2147483647 %uint_2147483647 %uint_2147483647
%uint_1 = OpConstant %uint 1
%71 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%81 = OpTypeFunction %v4int
%int_1 = OpConstant %int 1
%85 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
%void = OpTypeVoid
%92 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%VertexOutput = OpTypeStruct %v4float %v4int
%104 = OpTypeFunction %VertexOutput
%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
%110 = OpConstantNull %VertexOutput
%_ptr_Function_v4float = OpTypePointer Function %v4float
%float_1 = OpConstant %float 1
%tint_count_leading_zeros = OpFunction %v4int None %17
%v = OpFunctionParameter %v4int
%20 = OpLabel
%x = OpVariable %_ptr_Function_v4uint Function %26
%21 = OpBitcast %v4uint %v
OpStore %x %21
%28 = OpLoad %v4uint %x
%31 = OpULessThanEqual %v4bool %28 %30
%27 = OpSelect %v4uint %31 %35 %26
%36 = OpLoad %v4uint %x
%37 = OpShiftLeftLogical %v4uint %36 %27
OpStore %x %37
%39 = OpLoad %v4uint %x
%42 = OpULessThanEqual %v4bool %39 %41
%38 = OpSelect %v4uint %42 %44 %26
%45 = OpLoad %v4uint %x
%46 = OpShiftLeftLogical %v4uint %45 %38
OpStore %x %46
%48 = OpLoad %v4uint %x
%51 = OpULessThanEqual %v4bool %48 %50
%47 = OpSelect %v4uint %51 %53 %26
%54 = OpLoad %v4uint %x
%55 = OpShiftLeftLogical %v4uint %54 %47
OpStore %x %55
%57 = OpLoad %v4uint %x
%60 = OpULessThanEqual %v4bool %57 %59
%56 = OpSelect %v4uint %60 %62 %26
%63 = OpLoad %v4uint %x
%64 = OpShiftLeftLogical %v4uint %63 %56
OpStore %x %64
%66 = OpLoad %v4uint %x
%69 = OpULessThanEqual %v4bool %66 %68
%65 = OpSelect %v4uint %69 %71 %26
%73 = OpLoad %v4uint %x
%74 = OpIEqual %v4bool %73 %26
%72 = OpSelect %v4uint %74 %71 %26
%76 = OpBitwiseOr %v4uint %27 %38
%77 = OpBitwiseOr %v4uint %76 %47
%78 = OpBitwiseOr %v4uint %77 %56
%79 = OpBitwiseOr %v4uint %78 %65
%80 = OpIAdd %v4uint %79 %72
%75 = OpBitcast %v4int %80
OpReturnValue %75
OpFunctionEnd
%countLeadingZeros_eab32b = OpFunction %v4int None %81
%83 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v4int Function %10
%res = OpVariable %_ptr_Function_v4int Function %10
OpStore %arg_0 %85
%89 = OpLoad %v4int %arg_0
%88 = OpFunctionCall %v4int %tint_count_leading_zeros %89
OpStore %res %88
%91 = OpLoad %v4int %res
OpReturnValue %91
OpFunctionEnd
%fragment_main = OpFunction %void None %92
%95 = OpLabel
%98 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
%99 = OpFunctionCall %v4int %countLeadingZeros_eab32b
OpStore %98 %99
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %92
%101 = OpLabel
%102 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
%103 = OpFunctionCall %v4int %countLeadingZeros_eab32b
OpStore %102 %103
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %VertexOutput None %104
%107 = OpLabel
%out = OpVariable %_ptr_Function_VertexOutput Function %110
%112 = OpAccessChain %_ptr_Function_v4float %out %uint_0
OpStore %112 %5
%113 = OpAccessChain %_ptr_Function_v4int %out %uint_1
%114 = OpFunctionCall %v4int %countLeadingZeros_eab32b
OpStore %113 %114
%115 = OpLoad %VertexOutput %out
OpReturnValue %115
OpFunctionEnd
%vertex_main = OpFunction %void None %92
%117 = OpLabel
%118 = OpFunctionCall %VertexOutput %vertex_main_inner
%119 = OpCompositeExtract %v4float %118 0
OpStore %pos_1 %119
%120 = OpCompositeExtract %v4int %118 1
OpStore %prevent_dce_1 %120
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd