blob: f09f222492e086c9df7ce6c004b1da6cf749bd64 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 101
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
OpEntryPoint GLCompute %compute_main "compute_main"
OpExecutionMode %fragment_main OriginUpperLeft
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_count_leading_zeros "tint_count_leading_zeros"
OpName %v "v"
OpName %x "x"
OpName %countLeadingZeros_858d40 "countLeadingZeros_858d40"
OpName %arg_0 "arg_0"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
OpName %vertex_main "vertex_main"
OpName %fragment_main "fragment_main"
OpName %compute_main "compute_main"
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %5
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%9 = OpTypeFunction %v2int %v2int
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%20 = OpConstantNull %v2uint
%uint_65535 = OpConstant %uint 65535
%24 = OpConstantComposite %v2uint %uint_65535 %uint_65535
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%uint_16 = OpConstant %uint 16
%29 = OpConstantComposite %v2uint %uint_16 %uint_16
%uint_16777215 = OpConstant %uint 16777215
%35 = OpConstantComposite %v2uint %uint_16777215 %uint_16777215
%uint_8 = OpConstant %uint 8
%38 = OpConstantComposite %v2uint %uint_8 %uint_8
%uint_268435455 = OpConstant %uint 268435455
%44 = OpConstantComposite %v2uint %uint_268435455 %uint_268435455
%uint_4 = OpConstant %uint 4
%47 = OpConstantComposite %v2uint %uint_4 %uint_4
%uint_1073741823 = OpConstant %uint 1073741823
%53 = OpConstantComposite %v2uint %uint_1073741823 %uint_1073741823
%uint_2 = OpConstant %uint 2
%56 = OpConstantComposite %v2uint %uint_2 %uint_2
%uint_2147483647 = OpConstant %uint 2147483647
%62 = OpConstantComposite %v2uint %uint_2147483647 %uint_2147483647
%uint_1 = OpConstant %uint 1
%65 = OpConstantComposite %v2uint %uint_1 %uint_1
%void = OpTypeVoid
%75 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%80 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
%83 = OpConstantNull %v2int
%87 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_count_leading_zeros = OpFunction %v2int None %9
%v = OpFunctionParameter %v2int
%14 = OpLabel
%x = OpVariable %_ptr_Function_v2uint Function %20
%15 = OpBitcast %v2uint %v
OpStore %x %15
%22 = OpLoad %v2uint %x
%25 = OpULessThanEqual %v2bool %22 %24
%21 = OpSelect %v2uint %25 %29 %20
%30 = OpLoad %v2uint %x
%31 = OpShiftLeftLogical %v2uint %30 %21
OpStore %x %31
%33 = OpLoad %v2uint %x
%36 = OpULessThanEqual %v2bool %33 %35
%32 = OpSelect %v2uint %36 %38 %20
%39 = OpLoad %v2uint %x
%40 = OpShiftLeftLogical %v2uint %39 %32
OpStore %x %40
%42 = OpLoad %v2uint %x
%45 = OpULessThanEqual %v2bool %42 %44
%41 = OpSelect %v2uint %45 %47 %20
%48 = OpLoad %v2uint %x
%49 = OpShiftLeftLogical %v2uint %48 %41
OpStore %x %49
%51 = OpLoad %v2uint %x
%54 = OpULessThanEqual %v2bool %51 %53
%50 = OpSelect %v2uint %54 %56 %20
%57 = OpLoad %v2uint %x
%58 = OpShiftLeftLogical %v2uint %57 %50
OpStore %x %58
%60 = OpLoad %v2uint %x
%63 = OpULessThanEqual %v2bool %60 %62
%59 = OpSelect %v2uint %63 %65 %20
%67 = OpLoad %v2uint %x
%68 = OpIEqual %v2bool %67 %20
%66 = OpSelect %v2uint %68 %65 %20
%70 = OpBitwiseOr %v2uint %21 %32
%71 = OpBitwiseOr %v2uint %70 %41
%72 = OpBitwiseOr %v2uint %71 %50
%73 = OpBitwiseOr %v2uint %72 %59
%74 = OpIAdd %v2uint %73 %66
%69 = OpBitcast %v2int %74
OpReturnValue %69
OpFunctionEnd
%countLeadingZeros_858d40 = OpFunction %void None %75
%78 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v2int Function %83
%res = OpVariable %_ptr_Function_v2int Function %83
OpStore %arg_0 %80
%85 = OpLoad %v2int %arg_0
%84 = OpFunctionCall %v2int %tint_count_leading_zeros %85
OpStore %res %84
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %87
%89 = OpLabel
%90 = OpFunctionCall %void %countLeadingZeros_858d40
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %75
%92 = OpLabel
%93 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %93
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %75
%96 = OpLabel
%97 = OpFunctionCall %void %countLeadingZeros_858d40
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %75
%99 = OpLabel
%100 = OpFunctionCall %void %countLeadingZeros_858d40
OpReturn
OpFunctionEnd