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_7c38a6 "countLeadingZeros_7c38a6"
|
|
|
|
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
|
|
|
|
%v3int = OpTypeVector %int 3
|
2023-03-06 18:25:08 +00:00
|
|
|
%prevent_dce_block = OpTypeStruct %v3int
|
|
|
|
%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
|
|
|
|
%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
|
|
|
|
%14 = OpTypeFunction %v3int %v3int
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint = OpTypeInt 32 0
|
|
|
|
%v3uint = OpTypeVector %uint 3
|
|
|
|
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
2023-03-06 18:25:08 +00:00
|
|
|
%23 = OpConstantNull %v3uint
|
2022-06-02 14:36:10 +00:00
|
|
|
%uint_65535 = OpConstant %uint 65535
|
2023-03-06 18:25:08 +00:00
|
|
|
%27 = OpConstantComposite %v3uint %uint_65535 %uint_65535 %uint_65535
|
2022-06-02 14:36:10 +00:00
|
|
|
%bool = OpTypeBool
|
|
|
|
%v3bool = OpTypeVector %bool 3
|
|
|
|
%uint_16 = OpConstant %uint 16
|
2023-03-06 18:25:08 +00:00
|
|
|
%32 = OpConstantComposite %v3uint %uint_16 %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 %v3uint %uint_16777215 %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 %v3uint %uint_8 %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 %v3uint %uint_268435455 %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 %v3uint %uint_4 %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 %v3uint %uint_1073741823 %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 %v3uint %uint_2 %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 %v3uint %uint_2147483647 %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 %v3uint %uint_1 %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 %v3int %int_1 %int_1 %int_1
|
2022-06-02 14:36:10 +00:00
|
|
|
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
2023-03-06 18:25:08 +00:00
|
|
|
%86 = OpConstantNull %v3int
|
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
|
|
|
|
%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 %v3int None %14
|
2022-06-02 14:36:10 +00:00
|
|
|
%v = OpFunctionParameter %v3int
|
2023-03-06 18:25:08 +00:00
|
|
|
%17 = OpLabel
|
|
|
|
%x = OpVariable %_ptr_Function_v3uint Function %23
|
|
|
|
%18 = OpBitcast %v3uint %v
|
|
|
|
OpStore %x %18
|
|
|
|
%25 = OpLoad %v3uint %x
|
|
|
|
%28 = OpULessThanEqual %v3bool %25 %27
|
|
|
|
%24 = OpSelect %v3uint %28 %32 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%33 = OpLoad %v3uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%34 = OpShiftLeftLogical %v3uint %33 %24
|
|
|
|
OpStore %x %34
|
|
|
|
%36 = OpLoad %v3uint %x
|
|
|
|
%39 = OpULessThanEqual %v3bool %36 %38
|
|
|
|
%35 = OpSelect %v3uint %39 %41 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%42 = OpLoad %v3uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%43 = OpShiftLeftLogical %v3uint %42 %35
|
|
|
|
OpStore %x %43
|
|
|
|
%45 = OpLoad %v3uint %x
|
|
|
|
%48 = OpULessThanEqual %v3bool %45 %47
|
|
|
|
%44 = OpSelect %v3uint %48 %50 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%51 = OpLoad %v3uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%52 = OpShiftLeftLogical %v3uint %51 %44
|
|
|
|
OpStore %x %52
|
|
|
|
%54 = OpLoad %v3uint %x
|
|
|
|
%57 = OpULessThanEqual %v3bool %54 %56
|
|
|
|
%53 = OpSelect %v3uint %57 %59 %23
|
2022-06-02 14:36:10 +00:00
|
|
|
%60 = OpLoad %v3uint %x
|
2023-03-06 18:25:08 +00:00
|
|
|
%61 = OpShiftLeftLogical %v3uint %60 %53
|
|
|
|
OpStore %x %61
|
|
|
|
%63 = OpLoad %v3uint %x
|
|
|
|
%66 = OpULessThanEqual %v3bool %63 %65
|
|
|
|
%62 = OpSelect %v3uint %66 %68 %23
|
|
|
|
%70 = OpLoad %v3uint %x
|
|
|
|
%71 = OpIEqual %v3bool %70 %23
|
|
|
|
%69 = OpSelect %v3uint %71 %68 %23
|
|
|
|
%73 = OpBitwiseOr %v3uint %24 %35
|
|
|
|
%74 = OpBitwiseOr %v3uint %73 %44
|
|
|
|
%75 = OpBitwiseOr %v3uint %74 %53
|
|
|
|
%76 = OpBitwiseOr %v3uint %75 %62
|
|
|
|
%77 = OpIAdd %v3uint %76 %69
|
|
|
|
%72 = OpBitcast %v3int %77
|
|
|
|
OpReturnValue %72
|
2022-06-02 14:36:10 +00:00
|
|
|
OpFunctionEnd
|
2023-03-06 18:25:08 +00:00
|
|
|
%countLeadingZeros_7c38a6 = OpFunction %void None %78
|
|
|
|
%81 = OpLabel
|
|
|
|
%arg_0 = OpVariable %_ptr_Function_v3int Function %86
|
|
|
|
%res = OpVariable %_ptr_Function_v3int Function %86
|
|
|
|
OpStore %arg_0 %83
|
|
|
|
%88 = OpLoad %v3int %arg_0
|
|
|
|
%87 = OpFunctionCall %v3int %tint_count_leading_zeros %88
|
|
|
|
OpStore %res %87
|
|
|
|
%92 = OpAccessChain %_ptr_StorageBuffer_v3int %prevent_dce %uint_0
|
|
|
|
%93 = OpLoad %v3int %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_7c38a6
|
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_7c38a6
|
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_7c38a6
|
2022-06-02 14:36:10 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|