blob: eaeef72bad2a7f347e54dae3057f19d55721e938 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 117
; 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 %prevent_dce_block "prevent_dce_block"
OpMemberName %prevent_dce_block 0 "inner"
OpName %prevent_dce "prevent_dce"
OpName %tint_first_leading_bit "tint_first_leading_bit"
OpName %v "v"
OpName %x "x"
OpName %firstLeadingBit_a622c2 "firstLeadingBit_a622c2"
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
OpDecorate %prevent_dce_block Block
OpMemberDecorate %prevent_dce_block 0 Offset 0
OpDecorate %prevent_dce DescriptorSet 2
OpDecorate %prevent_dce Binding 0
%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
%prevent_dce_block = OpTypeStruct %v2int
%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
%14 = OpTypeFunction %v2int %v2int
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%21 = OpConstantNull %v2int
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%30 = OpConstantNull %v2uint
%uint_4294901760 = OpConstant %uint 4294901760
%35 = OpConstantComposite %v2uint %uint_4294901760 %uint_4294901760
%uint_16 = OpConstant %uint 16
%38 = OpConstantComposite %v2uint %uint_16 %uint_16
%uint_65280 = OpConstant %uint 65280
%45 = OpConstantComposite %v2uint %uint_65280 %uint_65280
%uint_8 = OpConstant %uint 8
%48 = OpConstantComposite %v2uint %uint_8 %uint_8
%uint_240 = OpConstant %uint 240
%55 = OpConstantComposite %v2uint %uint_240 %uint_240
%uint_4 = OpConstant %uint 4
%58 = OpConstantComposite %v2uint %uint_4 %uint_4
%uint_12 = OpConstant %uint 12
%65 = OpConstantComposite %v2uint %uint_12 %uint_12
%uint_2 = OpConstant %uint 2
%68 = OpConstantComposite %v2uint %uint_2 %uint_2
%uint_1 = OpConstant %uint 1
%76 = OpConstantComposite %v2uint %uint_1 %uint_1
%uint_4294967295 = OpConstant %uint 4294967295
%81 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295
%void = OpTypeVoid
%88 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%93 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%103 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_first_leading_bit = OpFunction %v2int None %14
%v = OpFunctionParameter %v2int
%17 = OpLabel
%x = OpVariable %_ptr_Function_v2uint Function %30
%22 = OpSLessThan %v2bool %v %21
%26 = OpNot %v2int %v
%25 = OpBitcast %v2uint %26
%27 = OpBitcast %v2uint %v
%18 = OpSelect %v2uint %22 %25 %27
OpStore %x %18
%33 = OpLoad %v2uint %x
%36 = OpBitwiseAnd %v2uint %33 %35
%32 = OpINotEqual %v2bool %36 %30
%31 = OpSelect %v2uint %32 %38 %30
%39 = OpLoad %v2uint %x
%40 = OpShiftRightLogical %v2uint %39 %31
OpStore %x %40
%43 = OpLoad %v2uint %x
%46 = OpBitwiseAnd %v2uint %43 %45
%42 = OpINotEqual %v2bool %46 %30
%41 = OpSelect %v2uint %42 %48 %30
%49 = OpLoad %v2uint %x
%50 = OpShiftRightLogical %v2uint %49 %41
OpStore %x %50
%53 = OpLoad %v2uint %x
%56 = OpBitwiseAnd %v2uint %53 %55
%52 = OpINotEqual %v2bool %56 %30
%51 = OpSelect %v2uint %52 %58 %30
%59 = OpLoad %v2uint %x
%60 = OpShiftRightLogical %v2uint %59 %51
OpStore %x %60
%63 = OpLoad %v2uint %x
%66 = OpBitwiseAnd %v2uint %63 %65
%62 = OpINotEqual %v2bool %66 %30
%61 = OpSelect %v2uint %62 %68 %30
%69 = OpLoad %v2uint %x
%70 = OpShiftRightLogical %v2uint %69 %61
OpStore %x %70
%73 = OpLoad %v2uint %x
%74 = OpBitwiseAnd %v2uint %73 %68
%72 = OpINotEqual %v2bool %74 %30
%71 = OpSelect %v2uint %72 %76 %30
%78 = OpLoad %v2uint %x
%79 = OpIEqual %v2bool %78 %30
%77 = OpSelect %v2uint %79 %81 %30
%83 = OpBitwiseOr %v2uint %31 %41
%84 = OpBitwiseOr %v2uint %83 %51
%85 = OpBitwiseOr %v2uint %84 %61
%86 = OpBitwiseOr %v2uint %85 %71
%87 = OpBitwiseOr %v2uint %86 %77
%82 = OpBitcast %v2int %87
OpReturnValue %82
OpFunctionEnd
%firstLeadingBit_a622c2 = OpFunction %void None %88
%91 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v2int Function %21
%res = OpVariable %_ptr_Function_v2int Function %21
OpStore %arg_0 %93
%97 = OpLoad %v2int %arg_0
%96 = OpFunctionCall %v2int %tint_first_leading_bit %97
OpStore %res %96
%101 = OpAccessChain %_ptr_StorageBuffer_v2int %prevent_dce %uint_0
%102 = OpLoad %v2int %res
OpStore %101 %102
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %103
%105 = OpLabel
%106 = OpFunctionCall %void %firstLeadingBit_a622c2
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %88
%108 = OpLabel
%109 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %109
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %88
%112 = OpLabel
%113 = OpFunctionCall %void %firstLeadingBit_a622c2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %88
%115 = OpLabel
%116 = OpFunctionCall %void %firstLeadingBit_a622c2
OpReturn
OpFunctionEnd