| ; |
| ; fragment_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 70 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fragment_main "fragment_main" |
| OpExecutionMode %fragment_main OriginUpperLeft |
| OpMemberName %prevent_dce_block 0 "inner" |
| OpName %prevent_dce_block "prevent_dce_block" |
| OpName %firstTrailingBit_110f2c "firstTrailingBit_110f2c" |
| OpName %arg_0 "arg_0" |
| OpName %res "res" |
| OpName %fragment_main "fragment_main" |
| OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| OpDecorate %prevent_dce_block Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 Coherent |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %prevent_dce_block = OpTypeStruct %v4uint |
| %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
| %7 = OpTypeFunction %v4uint |
| %_ptr_Function_v4uint = OpTypePointer Function %v4uint |
| %uint_1 = OpConstant %uint 1 |
| %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 |
| %uint_65535 = OpConstant %uint 65535 |
| %15 = OpConstantComposite %v4uint %uint_65535 %uint_65535 %uint_65535 %uint_65535 |
| %18 = OpConstantNull %v4uint |
| %bool = OpTypeBool |
| %v4bool = OpTypeVector %bool 4 |
| %uint_16 = OpConstant %uint 16 |
| %22 = OpConstantComposite %v4uint %uint_16 %uint_16 %uint_16 %uint_16 |
| %uint_255 = OpConstant %uint 255 |
| %26 = OpConstantComposite %v4uint %uint_255 %uint_255 %uint_255 %uint_255 |
| %uint_8 = OpConstant %uint 8 |
| %30 = OpConstantComposite %v4uint %uint_8 %uint_8 %uint_8 %uint_8 |
| %uint_15 = OpConstant %uint 15 |
| %34 = OpConstantComposite %v4uint %uint_15 %uint_15 %uint_15 %uint_15 |
| %uint_4 = OpConstant %uint 4 |
| %38 = OpConstantComposite %v4uint %uint_4 %uint_4 %uint_4 %uint_4 |
| %uint_3 = OpConstant %uint 3 |
| %42 = OpConstantComposite %v4uint %uint_3 %uint_3 %uint_3 %uint_3 |
| %uint_2 = OpConstant %uint 2 |
| %46 = OpConstantComposite %v4uint %uint_2 %uint_2 %uint_2 %uint_2 |
| %uint_4294967295 = OpConstant %uint 4294967295 |
| %58 = OpConstantComposite %v4uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %uint_4294967295 |
| %void = OpTypeVoid |
| %64 = OpTypeFunction %void |
| %_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint |
| %uint_0 = OpConstant %uint 0 |
| %firstTrailingBit_110f2c = OpFunction %v4uint None %7 |
| %8 = OpLabel |
| %arg_0 = OpVariable %_ptr_Function_v4uint Function |
| %res = OpVariable %_ptr_Function_v4uint Function |
| OpStore %arg_0 %11 |
| %13 = OpLoad %v4uint %arg_0 None |
| %14 = OpBitwiseAnd %v4uint %13 %15 |
| %17 = OpIEqual %v4bool %14 %18 |
| %21 = OpSelect %v4uint %17 %22 %18 |
| %24 = OpShiftRightLogical %v4uint %13 %21 |
| %25 = OpBitwiseAnd %v4uint %24 %26 |
| %28 = OpIEqual %v4bool %25 %18 |
| %29 = OpSelect %v4uint %28 %30 %18 |
| %32 = OpShiftRightLogical %v4uint %24 %29 |
| %33 = OpBitwiseAnd %v4uint %32 %34 |
| %36 = OpIEqual %v4bool %33 %18 |
| %37 = OpSelect %v4uint %36 %38 %18 |
| %40 = OpShiftRightLogical %v4uint %32 %37 |
| %41 = OpBitwiseAnd %v4uint %40 %42 |
| %44 = OpIEqual %v4bool %41 %18 |
| %45 = OpSelect %v4uint %44 %46 %18 |
| %48 = OpShiftRightLogical %v4uint %40 %45 |
| %49 = OpBitwiseAnd %v4uint %48 %11 |
| %50 = OpIEqual %v4bool %49 %18 |
| %51 = OpSelect %v4uint %50 %11 %18 |
| %52 = OpBitwiseOr %v4uint %45 %51 |
| %53 = OpBitwiseOr %v4uint %37 %52 |
| %54 = OpBitwiseOr %v4uint %29 %53 |
| %55 = OpBitwiseOr %v4uint %21 %54 |
| %56 = OpIEqual %v4bool %48 %18 |
| %57 = OpSelect %v4uint %56 %58 %55 |
| OpStore %res %57 |
| %61 = OpLoad %v4uint %res None |
| OpReturnValue %61 |
| OpFunctionEnd |
| %fragment_main = OpFunction %void None %64 |
| %65 = OpLabel |
| %66 = OpFunctionCall %v4uint %firstTrailingBit_110f2c |
| %67 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0 |
| OpStore %67 %66 None |
| OpReturn |
| OpFunctionEnd |
| ; |
| ; compute_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 70 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %compute_main "compute_main" |
| OpExecutionMode %compute_main LocalSize 1 1 1 |
| OpMemberName %prevent_dce_block 0 "inner" |
| OpName %prevent_dce_block "prevent_dce_block" |
| OpName %firstTrailingBit_110f2c "firstTrailingBit_110f2c" |
| OpName %arg_0 "arg_0" |
| OpName %res "res" |
| OpName %compute_main "compute_main" |
| OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| OpDecorate %prevent_dce_block Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 Coherent |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %prevent_dce_block = OpTypeStruct %v4uint |
| %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
| %7 = OpTypeFunction %v4uint |
| %_ptr_Function_v4uint = OpTypePointer Function %v4uint |
| %uint_1 = OpConstant %uint 1 |
| %11 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 |
| %uint_65535 = OpConstant %uint 65535 |
| %15 = OpConstantComposite %v4uint %uint_65535 %uint_65535 %uint_65535 %uint_65535 |
| %18 = OpConstantNull %v4uint |
| %bool = OpTypeBool |
| %v4bool = OpTypeVector %bool 4 |
| %uint_16 = OpConstant %uint 16 |
| %22 = OpConstantComposite %v4uint %uint_16 %uint_16 %uint_16 %uint_16 |
| %uint_255 = OpConstant %uint 255 |
| %26 = OpConstantComposite %v4uint %uint_255 %uint_255 %uint_255 %uint_255 |
| %uint_8 = OpConstant %uint 8 |
| %30 = OpConstantComposite %v4uint %uint_8 %uint_8 %uint_8 %uint_8 |
| %uint_15 = OpConstant %uint 15 |
| %34 = OpConstantComposite %v4uint %uint_15 %uint_15 %uint_15 %uint_15 |
| %uint_4 = OpConstant %uint 4 |
| %38 = OpConstantComposite %v4uint %uint_4 %uint_4 %uint_4 %uint_4 |
| %uint_3 = OpConstant %uint 3 |
| %42 = OpConstantComposite %v4uint %uint_3 %uint_3 %uint_3 %uint_3 |
| %uint_2 = OpConstant %uint 2 |
| %46 = OpConstantComposite %v4uint %uint_2 %uint_2 %uint_2 %uint_2 |
| %uint_4294967295 = OpConstant %uint 4294967295 |
| %58 = OpConstantComposite %v4uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %uint_4294967295 |
| %void = OpTypeVoid |
| %64 = OpTypeFunction %void |
| %_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint |
| %uint_0 = OpConstant %uint 0 |
| %firstTrailingBit_110f2c = OpFunction %v4uint None %7 |
| %8 = OpLabel |
| %arg_0 = OpVariable %_ptr_Function_v4uint Function |
| %res = OpVariable %_ptr_Function_v4uint Function |
| OpStore %arg_0 %11 |
| %13 = OpLoad %v4uint %arg_0 None |
| %14 = OpBitwiseAnd %v4uint %13 %15 |
| %17 = OpIEqual %v4bool %14 %18 |
| %21 = OpSelect %v4uint %17 %22 %18 |
| %24 = OpShiftRightLogical %v4uint %13 %21 |
| %25 = OpBitwiseAnd %v4uint %24 %26 |
| %28 = OpIEqual %v4bool %25 %18 |
| %29 = OpSelect %v4uint %28 %30 %18 |
| %32 = OpShiftRightLogical %v4uint %24 %29 |
| %33 = OpBitwiseAnd %v4uint %32 %34 |
| %36 = OpIEqual %v4bool %33 %18 |
| %37 = OpSelect %v4uint %36 %38 %18 |
| %40 = OpShiftRightLogical %v4uint %32 %37 |
| %41 = OpBitwiseAnd %v4uint %40 %42 |
| %44 = OpIEqual %v4bool %41 %18 |
| %45 = OpSelect %v4uint %44 %46 %18 |
| %48 = OpShiftRightLogical %v4uint %40 %45 |
| %49 = OpBitwiseAnd %v4uint %48 %11 |
| %50 = OpIEqual %v4bool %49 %18 |
| %51 = OpSelect %v4uint %50 %11 %18 |
| %52 = OpBitwiseOr %v4uint %45 %51 |
| %53 = OpBitwiseOr %v4uint %37 %52 |
| %54 = OpBitwiseOr %v4uint %29 %53 |
| %55 = OpBitwiseOr %v4uint %21 %54 |
| %56 = OpIEqual %v4bool %48 %18 |
| %57 = OpSelect %v4uint %56 %58 %55 |
| OpStore %res %57 |
| %61 = OpLoad %v4uint %res None |
| OpReturnValue %61 |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %64 |
| %65 = OpLabel |
| %66 = OpFunctionCall %v4uint %firstTrailingBit_110f2c |
| %67 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0 |
| OpStore %67 %66 None |
| OpReturn |
| OpFunctionEnd |
| ; |
| ; vertex_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 89 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main_loc0_Output %vertex_main___point_size_Output |
| OpName %vertex_main_position_Output "vertex_main_position_Output" |
| OpName %vertex_main_loc0_Output "vertex_main_loc0_Output" |
| OpName %vertex_main___point_size_Output "vertex_main___point_size_Output" |
| OpName %firstTrailingBit_110f2c "firstTrailingBit_110f2c" |
| OpName %arg_0 "arg_0" |
| OpName %res "res" |
| OpName %vertex_main_inner "vertex_main_inner" |
| OpMemberName %VertexOutput 0 "pos" |
| OpMemberName %VertexOutput 1 "prevent_dce" |
| OpName %VertexOutput "VertexOutput" |
| OpName %out "out" |
| OpName %vertex_main "vertex_main" |
| OpDecorate %vertex_main_position_Output BuiltIn Position |
| OpDecorate %vertex_main_loc0_Output Location 0 |
| OpDecorate %vertex_main_loc0_Output Flat |
| OpDecorate %vertex_main___point_size_Output BuiltIn PointSize |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %_ptr_Output_v4uint = OpTypePointer Output %v4uint |
| %vertex_main_loc0_Output = OpVariable %_ptr_Output_v4uint Output |
| %_ptr_Output_float = OpTypePointer Output %float |
| %vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output |
| %12 = OpTypeFunction %v4uint |
| %_ptr_Function_v4uint = OpTypePointer Function %v4uint |
| %uint_1 = OpConstant %uint 1 |
| %16 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 |
| %uint_65535 = OpConstant %uint 65535 |
| %20 = OpConstantComposite %v4uint %uint_65535 %uint_65535 %uint_65535 %uint_65535 |
| %23 = OpConstantNull %v4uint |
| %bool = OpTypeBool |
| %v4bool = OpTypeVector %bool 4 |
| %uint_16 = OpConstant %uint 16 |
| %27 = OpConstantComposite %v4uint %uint_16 %uint_16 %uint_16 %uint_16 |
| %uint_255 = OpConstant %uint 255 |
| %31 = OpConstantComposite %v4uint %uint_255 %uint_255 %uint_255 %uint_255 |
| %uint_8 = OpConstant %uint 8 |
| %35 = OpConstantComposite %v4uint %uint_8 %uint_8 %uint_8 %uint_8 |
| %uint_15 = OpConstant %uint 15 |
| %39 = OpConstantComposite %v4uint %uint_15 %uint_15 %uint_15 %uint_15 |
| %uint_4 = OpConstant %uint 4 |
| %43 = OpConstantComposite %v4uint %uint_4 %uint_4 %uint_4 %uint_4 |
| %uint_3 = OpConstant %uint 3 |
| %47 = OpConstantComposite %v4uint %uint_3 %uint_3 %uint_3 %uint_3 |
| %uint_2 = OpConstant %uint 2 |
| %51 = OpConstantComposite %v4uint %uint_2 %uint_2 %uint_2 %uint_2 |
| %uint_4294967295 = OpConstant %uint 4294967295 |
| %63 = OpConstantComposite %v4uint %uint_4294967295 %uint_4294967295 %uint_4294967295 %uint_4294967295 |
| %VertexOutput = OpTypeStruct %v4float %v4uint |
| %69 = OpTypeFunction %VertexOutput |
| %_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput |
| %73 = OpConstantNull %VertexOutput |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %uint_0 = OpConstant %uint 0 |
| %77 = OpConstantNull %v4float |
| %void = OpTypeVoid |
| %83 = OpTypeFunction %void |
| %float_1 = OpConstant %float 1 |
| %firstTrailingBit_110f2c = OpFunction %v4uint None %12 |
| %13 = OpLabel |
| %arg_0 = OpVariable %_ptr_Function_v4uint Function |
| %res = OpVariable %_ptr_Function_v4uint Function |
| OpStore %arg_0 %16 |
| %18 = OpLoad %v4uint %arg_0 None |
| %19 = OpBitwiseAnd %v4uint %18 %20 |
| %22 = OpIEqual %v4bool %19 %23 |
| %26 = OpSelect %v4uint %22 %27 %23 |
| %29 = OpShiftRightLogical %v4uint %18 %26 |
| %30 = OpBitwiseAnd %v4uint %29 %31 |
| %33 = OpIEqual %v4bool %30 %23 |
| %34 = OpSelect %v4uint %33 %35 %23 |
| %37 = OpShiftRightLogical %v4uint %29 %34 |
| %38 = OpBitwiseAnd %v4uint %37 %39 |
| %41 = OpIEqual %v4bool %38 %23 |
| %42 = OpSelect %v4uint %41 %43 %23 |
| %45 = OpShiftRightLogical %v4uint %37 %42 |
| %46 = OpBitwiseAnd %v4uint %45 %47 |
| %49 = OpIEqual %v4bool %46 %23 |
| %50 = OpSelect %v4uint %49 %51 %23 |
| %53 = OpShiftRightLogical %v4uint %45 %50 |
| %54 = OpBitwiseAnd %v4uint %53 %16 |
| %55 = OpIEqual %v4bool %54 %23 |
| %56 = OpSelect %v4uint %55 %16 %23 |
| %57 = OpBitwiseOr %v4uint %50 %56 |
| %58 = OpBitwiseOr %v4uint %42 %57 |
| %59 = OpBitwiseOr %v4uint %34 %58 |
| %60 = OpBitwiseOr %v4uint %26 %59 |
| %61 = OpIEqual %v4bool %53 %23 |
| %62 = OpSelect %v4uint %61 %63 %60 |
| OpStore %res %62 |
| %66 = OpLoad %v4uint %res None |
| OpReturnValue %66 |
| OpFunctionEnd |
| %vertex_main_inner = OpFunction %VertexOutput None %69 |
| %70 = OpLabel |
| %out = OpVariable %_ptr_Function_VertexOutput Function %73 |
| %74 = OpAccessChain %_ptr_Function_v4float %out %uint_0 |
| OpStore %74 %77 None |
| %78 = OpAccessChain %_ptr_Function_v4uint %out %uint_1 |
| %79 = OpFunctionCall %v4uint %firstTrailingBit_110f2c |
| OpStore %78 %79 None |
| %80 = OpLoad %VertexOutput %out None |
| OpReturnValue %80 |
| OpFunctionEnd |
| %vertex_main = OpFunction %void None %83 |
| %84 = OpLabel |
| %85 = OpFunctionCall %VertexOutput %vertex_main_inner |
| %86 = OpCompositeExtract %v4float %85 0 |
| OpStore %vertex_main_position_Output %86 None |
| %87 = OpCompositeExtract %v4uint %85 1 |
| OpStore %vertex_main_loc0_Output %87 None |
| OpStore %vertex_main___point_size_Output %float_1 None |
| OpReturn |
| OpFunctionEnd |