| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 116 |
| ; 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_70783f "countLeadingZeros_70783f" |
| 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 |
| %uint = OpTypeInt 32 0 |
| %v2uint = OpTypeVector %uint 2 |
| %_ptr_Output_v2uint = OpTypePointer Output %v2uint |
| %10 = OpConstantNull %v2uint |
| %prevent_dce_1 = OpVariable %_ptr_Output_v2uint Output %10 |
| %_ptr_Output_float = OpTypePointer Output %float |
| %13 = OpConstantNull %float |
| %vertex_point_size = OpVariable %_ptr_Output_float Output %13 |
| %prevent_dce_block = OpTypeStruct %v2uint |
| %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
| %17 = OpTypeFunction %v2uint %v2uint |
| %_ptr_Function_v2uint = OpTypePointer Function %v2uint |
| %uint_65535 = OpConstant %uint 65535 |
| %27 = OpConstantComposite %v2uint %uint_65535 %uint_65535 |
| %bool = OpTypeBool |
| %v2bool = OpTypeVector %bool 2 |
| %uint_16 = OpConstant %uint 16 |
| %32 = OpConstantComposite %v2uint %uint_16 %uint_16 |
| %uint_16777215 = OpConstant %uint 16777215 |
| %38 = OpConstantComposite %v2uint %uint_16777215 %uint_16777215 |
| %uint_8 = OpConstant %uint 8 |
| %41 = OpConstantComposite %v2uint %uint_8 %uint_8 |
| %uint_268435455 = OpConstant %uint 268435455 |
| %47 = OpConstantComposite %v2uint %uint_268435455 %uint_268435455 |
| %uint_4 = OpConstant %uint 4 |
| %50 = OpConstantComposite %v2uint %uint_4 %uint_4 |
| %uint_1073741823 = OpConstant %uint 1073741823 |
| %56 = OpConstantComposite %v2uint %uint_1073741823 %uint_1073741823 |
| %uint_2 = OpConstant %uint 2 |
| %59 = OpConstantComposite %v2uint %uint_2 %uint_2 |
| %uint_2147483647 = OpConstant %uint 2147483647 |
| %65 = OpConstantComposite %v2uint %uint_2147483647 %uint_2147483647 |
| %uint_1 = OpConstant %uint 1 |
| %68 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %78 = OpTypeFunction %v2uint |
| %void = OpTypeVoid |
| %86 = OpTypeFunction %void |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint |
| %VertexOutput = OpTypeStruct %v4float %v2uint |
| %98 = OpTypeFunction %VertexOutput |
| %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| %104 = OpConstantNull %VertexOutput |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %float_1 = OpConstant %float 1 |
| %tint_count_leading_zeros = OpFunction %v2uint None %17 |
| %v = OpFunctionParameter %v2uint |
| %20 = OpLabel |
| %x = OpVariable %_ptr_Function_v2uint Function %10 |
| OpStore %x %v |
| %25 = OpLoad %v2uint %x |
| %28 = OpULessThanEqual %v2bool %25 %27 |
| %24 = OpSelect %v2uint %28 %32 %10 |
| %33 = OpLoad %v2uint %x |
| %34 = OpShiftLeftLogical %v2uint %33 %24 |
| OpStore %x %34 |
| %36 = OpLoad %v2uint %x |
| %39 = OpULessThanEqual %v2bool %36 %38 |
| %35 = OpSelect %v2uint %39 %41 %10 |
| %42 = OpLoad %v2uint %x |
| %43 = OpShiftLeftLogical %v2uint %42 %35 |
| OpStore %x %43 |
| %45 = OpLoad %v2uint %x |
| %48 = OpULessThanEqual %v2bool %45 %47 |
| %44 = OpSelect %v2uint %48 %50 %10 |
| %51 = OpLoad %v2uint %x |
| %52 = OpShiftLeftLogical %v2uint %51 %44 |
| OpStore %x %52 |
| %54 = OpLoad %v2uint %x |
| %57 = OpULessThanEqual %v2bool %54 %56 |
| %53 = OpSelect %v2uint %57 %59 %10 |
| %60 = OpLoad %v2uint %x |
| %61 = OpShiftLeftLogical %v2uint %60 %53 |
| OpStore %x %61 |
| %63 = OpLoad %v2uint %x |
| %66 = OpULessThanEqual %v2bool %63 %65 |
| %62 = OpSelect %v2uint %66 %68 %10 |
| %70 = OpLoad %v2uint %x |
| %71 = OpIEqual %v2bool %70 %10 |
| %69 = OpSelect %v2uint %71 %68 %10 |
| %73 = OpBitwiseOr %v2uint %24 %35 |
| %74 = OpBitwiseOr %v2uint %73 %44 |
| %75 = OpBitwiseOr %v2uint %74 %53 |
| %76 = OpBitwiseOr %v2uint %75 %62 |
| %77 = OpIAdd %v2uint %76 %69 |
| OpReturnValue %77 |
| OpFunctionEnd |
| %countLeadingZeros_70783f = OpFunction %v2uint None %78 |
| %80 = OpLabel |
| %arg_0 = OpVariable %_ptr_Function_v2uint Function %10 |
| %res = OpVariable %_ptr_Function_v2uint Function %10 |
| OpStore %arg_0 %68 |
| %83 = OpLoad %v2uint %arg_0 |
| %82 = OpFunctionCall %v2uint %tint_count_leading_zeros %83 |
| OpStore %res %82 |
| %85 = OpLoad %v2uint %res |
| OpReturnValue %85 |
| OpFunctionEnd |
| %fragment_main = OpFunction %void None %86 |
| %89 = OpLabel |
| %92 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0 |
| %93 = OpFunctionCall %v2uint %countLeadingZeros_70783f |
| OpStore %92 %93 |
| OpReturn |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %86 |
| %95 = OpLabel |
| %96 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0 |
| %97 = OpFunctionCall %v2uint %countLeadingZeros_70783f |
| OpStore %96 %97 |
| OpReturn |
| OpFunctionEnd |
| %vertex_main_inner = OpFunction %VertexOutput None %98 |
| %101 = OpLabel |
| %out = OpVariable %_ptr_Function_VertexOutput Function %104 |
| %106 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| OpStore %106 %5 |
| %107 = OpAccessChain %_ptr_Function_v2uint %out %uint_1 |
| %108 = OpFunctionCall %v2uint %countLeadingZeros_70783f |
| OpStore %107 %108 |
| %109 = OpLoad %VertexOutput %out |
| OpReturnValue %109 |
| OpFunctionEnd |
| %vertex_main = OpFunction %void None %86 |
| %111 = OpLabel |
| %112 = OpFunctionCall %VertexOutput %vertex_main_inner |
| %113 = OpCompositeExtract %v4float %112 0 |
| OpStore %pos_1 %113 |
| %114 = OpCompositeExtract %v2uint %112 1 |
| OpStore %prevent_dce_1 %114 |
| OpStore %vertex_point_size %float_1 |
| OpReturn |
| OpFunctionEnd |