2022-06-02 14:36:10 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2023-03-06 18:25:08 +00:00
|
|
|
; Bound: 108
|
2022-06-02 14:36:10 +00:00
|
|
|
; 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"
|
2023-03-06 18:25:08 +00:00
|
|
|
OpName %prevent_dce_block "prevent_dce_block"
|
|
|
|
OpMemberName %prevent_dce_block 0 "inner"
|
|
|
|
OpName %prevent_dce "prevent_dce"
|
2022-06-02 14:36:10 +00:00
|
|
|
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
|
2023-03-06 18:25:08 +00:00
|
|
|
OpDecorate %prevent_dce_block Block
|
|
|
|
OpMemberDecorate %prevent_dce_block 0 Offset 0
|
|
|
|
OpDecorate %prevent_dce DescriptorSet 2
|
|
|
|
OpDecorate %prevent_dce Binding 0
|
2022-06-02 14:36:10 +00:00
|
|
|
%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
|
2023-03-06 18:25:08 +00:00
|
|
|
%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
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint = OpTypeInt 32 0
|
|
|
|
%v2uint = OpTypeVector %uint 2
|
|
|
|
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
2023-03-06 18:25:08 +00:00
|
|
|
%23 = OpConstantNull %v2uint
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_65535 = OpConstant %uint 65535
|
2023-03-06 18:25:08 +00:00
|
|
|
%27 = OpConstantComposite %v2uint %uint_65535 %uint_65535
|
2022-06-02 14:36:10 +00:00
|
|
|
%bool = OpTypeBool
|
|
|
|
%v2bool = OpTypeVector %bool 2
|
|
|
|
%uint_16 = OpConstant %uint 16
|
2023-03-06 18:25:08 +00:00
|
|
|
%32 = OpConstantComposite %v2uint %uint_16 %uint_16
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_16777215 = OpConstant %uint 16777215
|
2023-03-06 18:25:08 +00:00
|
|
|
%38 = OpConstantComposite %v2uint %uint_16777215 %uint_16777215
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_8 = OpConstant %uint 8
|
2023-03-06 18:25:08 +00:00
|
|
|
%41 = OpConstantComposite %v2uint %uint_8 %uint_8
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_268435455 = OpConstant %uint 268435455
|
2023-03-06 18:25:08 +00:00
|
|
|
%47 = OpConstantComposite %v2uint %uint_268435455 %uint_268435455
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_4 = OpConstant %uint 4
|
2023-03-06 18:25:08 +00:00
|
|
|
%50 = OpConstantComposite %v2uint %uint_4 %uint_4
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_1073741823 = OpConstant %uint 1073741823
|
2023-03-06 18:25:08 +00:00
|
|
|
%56 = OpConstantComposite %v2uint %uint_1073741823 %uint_1073741823
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_2 = OpConstant %uint 2
|
2023-03-06 18:25:08 +00:00
|
|
|
%59 = OpConstantComposite %v2uint %uint_2 %uint_2
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_2147483647 = OpConstant %uint 2147483647
|
2023-03-06 18:25:08 +00:00
|
|
|
%65 = OpConstantComposite %v2uint %uint_2147483647 %uint_2147483647
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_1 = OpConstant %uint 1
|
2023-03-06 18:25:08 +00:00
|
|
|
%68 = OpConstantComposite %v2uint %uint_1 %uint_1
|
2022-06-02 14:36:10 +00:00
|
|
|
%void = OpTypeVoid
|
2023-03-06 18:25:08 +00:00
|
|
|
%78 = OpTypeFunction %void
|
2022-07-26 14:27:25 +00:00
|
|
|
%int_1 = OpConstant %int 1
|
2023-03-06 18:25:08 +00:00
|
|
|
%83 = OpConstantComposite %v2int %int_1 %int_1
|
2022-06-02 14:36:10 +00:00
|
|
|
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
2023-03-06 18:25:08 +00:00
|
|
|
%86 = OpConstantNull %v2int
|
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
|
|
|
|
%94 = OpTypeFunction %v4float
|
2022-06-02 14:36:10 +00:00
|
|
|
%float_1 = OpConstant %float 1
|
2023-03-06 18:25:08 +00:00
|
|
|
%tint_count_leading_zeros = OpFunction %v2int None %14
|
2022-06-02 14:36:10 +00:00
|
|
|
%v = OpFunctionParameter %v2int
|
2023-03-06 18:25:08 +00:00
|
|
|
%17 = OpLabel
|
|
|
|
%x = OpVariable %_ptr_Function_v2uint Function %23
|
|
|
|
%18 = OpBitcast %v2uint %v
|
|
|
|
OpStore %x %18
|
|
|
|
%25 = OpLoad %v2uint %x
|
|
|
|
%28 = OpULessThanEqual %v2bool %25 %27
|
|
|
|
%24 = OpSelect %v2uint %28 %32 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%33 = OpLoad %v2uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%34 = OpShiftLeftLogical %v2uint %33 %24
|
|
|
|
OpStore %x %34
|
|
|
|
%36 = OpLoad %v2uint %x
|
|
|
|
%39 = OpULessThanEqual %v2bool %36 %38
|
|
|
|
%35 = OpSelect %v2uint %39 %41 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%42 = OpLoad %v2uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%43 = OpShiftLeftLogical %v2uint %42 %35
|
|
|
|
OpStore %x %43
|
|
|
|
%45 = OpLoad %v2uint %x
|
|
|
|
%48 = OpULessThanEqual %v2bool %45 %47
|
|
|
|
%44 = OpSelect %v2uint %48 %50 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%51 = OpLoad %v2uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%52 = OpShiftLeftLogical %v2uint %51 %44
|
|
|
|
OpStore %x %52
|
|
|
|
%54 = OpLoad %v2uint %x
|
|
|
|
%57 = OpULessThanEqual %v2bool %54 %56
|
|
|
|
%53 = OpSelect %v2uint %57 %59 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%60 = OpLoad %v2uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%61 = OpShiftLeftLogical %v2uint %60 %53
|
|
|
|
OpStore %x %61
|
|
|
|
%63 = OpLoad %v2uint %x
|
|
|
|
%66 = OpULessThanEqual %v2bool %63 %65
|
|
|
|
%62 = OpSelect %v2uint %66 %68 %23
|
|
|
|
%70 = OpLoad %v2uint %x
|
|
|
|
%71 = OpIEqual %v2bool %70 %23
|
|
|
|
%69 = OpSelect %v2uint %71 %68 %23
|
|
|
|
%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
|
|
|
|
%72 = OpBitcast %v2int %77
|
|
|
|
OpReturnValue %72
|
2022-06-02 14:36:10 +00:00
|
|
|
OpFunctionEnd
|
2023-03-06 18:25:08 +00:00
|
|
|
%countLeadingZeros_858d40 = OpFunction %void None %78
|
|
|
|
%81 = OpLabel
|
|
|
|
%arg_0 = OpVariable %_ptr_Function_v2int Function %86
|
|
|
|
%res = OpVariable %_ptr_Function_v2int Function %86
|
|
|
|
OpStore %arg_0 %83
|
|
|
|
%88 = OpLoad %v2int %arg_0
|
|
|
|
%87 = OpFunctionCall %v2int %tint_count_leading_zeros %88
|
|
|
|
OpStore %res %87
|
|
|
|
%92 = OpAccessChain %_ptr_StorageBuffer_v2int %prevent_dce %uint_0
|
|
|
|
%93 = OpLoad %v2int %res
|
|
|
|
OpStore %92 %93
|
2022-06-02 14:36:10 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2023-03-06 18:25:08 +00:00
|
|
|
%vertex_main_inner = OpFunction %v4float None %94
|
|
|
|
%96 = OpLabel
|
|
|
|
%97 = OpFunctionCall %void %countLeadingZeros_858d40
|
2022-06-02 14:36:10 +00:00
|
|
|
OpReturnValue %5
|
|
|
|
OpFunctionEnd
|
2023-03-06 18:25:08 +00:00
|
|
|
%vertex_main = OpFunction %void None %78
|
|
|
|
%99 = OpLabel
|
|
|
|
%100 = OpFunctionCall %v4float %vertex_main_inner
|
|
|
|
OpStore %value %100
|
2022-06-02 14:36:10 +00:00
|
|
|
OpStore %vertex_point_size %float_1
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2023-03-06 18:25:08 +00:00
|
|
|
%fragment_main = OpFunction %void None %78
|
|
|
|
%103 = OpLabel
|
|
|
|
%104 = OpFunctionCall %void %countLeadingZeros_858d40
|
2022-06-02 14:36:10 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2023-03-06 18:25:08 +00:00
|
|
|
%compute_main = OpFunction %void None %78
|
|
|
|
%106 = OpLabel
|
|
|
|
%107 = OpFunctionCall %void %countLeadingZeros_858d40
|
2022-06-02 14:36:10 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|