2022-01-13 18:53:00 +00:00
|
|
|
OpCapability Shader
|
|
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
|
|
OpMemoryModel Logical GLSL450
|
|
|
|
OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor %sk_Clockwise
|
|
|
|
OpExecutionMode %_entrypoint_v OriginUpperLeft
|
|
|
|
OpName %sk_FragColor "sk_FragColor"
|
|
|
|
OpName %sk_Clockwise "sk_Clockwise"
|
|
|
|
OpName %minus "minus"
|
|
|
|
OpName %star "star"
|
|
|
|
OpName %slash "slash"
|
|
|
|
OpName %_UniformBuffer "_UniformBuffer"
|
|
|
|
OpMemberName %_UniformBuffer 0 "colorGreen"
|
|
|
|
OpMemberName %_UniformBuffer 1 "colorRed"
|
|
|
|
OpName %_entrypoint_v "_entrypoint_v"
|
|
|
|
OpName %test_bifffff22 "test_bifffff22"
|
|
|
|
OpName %one "one"
|
|
|
|
OpName %m2 "m2"
|
|
|
|
OpName %main "main"
|
|
|
|
OpName %f1 "f1"
|
|
|
|
OpName %f2 "f2"
|
|
|
|
OpName %f3 "f3"
|
|
|
|
OpName %f4 "f4"
|
|
|
|
OpName %_0_expected "_0_expected"
|
|
|
|
OpName %_1_one "_1_one"
|
|
|
|
OpName %_2_m2 "_2_m2"
|
|
|
|
OpDecorate %sk_FragColor RelaxedPrecision
|
|
|
|
OpDecorate %sk_FragColor Location 0
|
|
|
|
OpDecorate %sk_FragColor Index 0
|
|
|
|
OpDecorate %sk_Clockwise BuiltIn FrontFacing
|
|
|
|
OpMemberDecorate %_UniformBuffer 0 Offset 0
|
|
|
|
OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
|
|
|
|
OpMemberDecorate %_UniformBuffer 1 Offset 16
|
|
|
|
OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
|
|
|
|
OpDecorate %_UniformBuffer Block
|
|
|
|
OpDecorate %19 Binding 0
|
|
|
|
OpDecorate %19 DescriptorSet 0
|
|
|
|
OpDecorate %48 RelaxedPrecision
|
|
|
|
OpDecorate %49 RelaxedPrecision
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
OpDecorate %135 RelaxedPrecision
|
|
|
|
OpDecorate %136 RelaxedPrecision
|
2022-04-18 14:57:14 +00:00
|
|
|
OpDecorate %139 RelaxedPrecision
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
OpDecorate %140 RelaxedPrecision
|
|
|
|
OpDecorate %141 RelaxedPrecision
|
|
|
|
OpDecorate %145 RelaxedPrecision
|
|
|
|
OpDecorate %146 RelaxedPrecision
|
|
|
|
OpDecorate %147 RelaxedPrecision
|
|
|
|
OpDecorate %151 RelaxedPrecision
|
|
|
|
OpDecorate %152 RelaxedPrecision
|
|
|
|
OpDecorate %153 RelaxedPrecision
|
|
|
|
OpDecorate %164 RelaxedPrecision
|
|
|
|
OpDecorate %165 RelaxedPrecision
|
|
|
|
OpDecorate %275 RelaxedPrecision
|
|
|
|
OpDecorate %277 RelaxedPrecision
|
2022-04-18 14:57:14 +00:00
|
|
|
OpDecorate %278 RelaxedPrecision
|
2022-01-13 18:53:00 +00:00
|
|
|
%float = OpTypeFloat 32
|
|
|
|
%v4float = OpTypeVector %float 4
|
|
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
|
|
%sk_FragColor = OpVariable %_ptr_Output_v4float Output
|
|
|
|
%bool = OpTypeBool
|
|
|
|
%_ptr_Input_bool = OpTypePointer Input %bool
|
|
|
|
%sk_Clockwise = OpVariable %_ptr_Input_bool Input
|
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%_ptr_Private_int = OpTypePointer Private %int
|
|
|
|
%minus = OpVariable %_ptr_Private_int Private
|
|
|
|
%int_2 = OpConstant %int 2
|
|
|
|
%star = OpVariable %_ptr_Private_int Private
|
|
|
|
%int_3 = OpConstant %int 3
|
|
|
|
%slash = OpVariable %_ptr_Private_int Private
|
|
|
|
%int_4 = OpConstant %int 4
|
|
|
|
%_UniformBuffer = OpTypeStruct %v4float %v4float
|
|
|
|
%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
|
|
|
|
%19 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
|
|
|
|
%void = OpTypeVoid
|
|
|
|
%24 = OpTypeFunction %void
|
|
|
|
%float_0 = OpConstant %float 0
|
2022-04-12 21:02:43 +00:00
|
|
|
%v2float = OpTypeVector %float 2
|
2022-01-13 18:53:00 +00:00
|
|
|
%28 = OpConstantComposite %v2float %float_0 %float_0
|
|
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
2022-04-13 18:37:36 +00:00
|
|
|
%mat2v2float = OpTypeMatrix %v2float 2
|
2022-01-13 18:53:00 +00:00
|
|
|
%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
|
2022-04-13 18:37:36 +00:00
|
|
|
%36 = OpTypeFunction %bool %_ptr_Function_int %_ptr_Function_float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_mat2v2float
|
2022-01-13 18:53:00 +00:00
|
|
|
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
|
|
|
|
%int_1 = OpConstant %int 1
|
|
|
|
%float_1 = OpConstant %float 1
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%69 = OpConstantComposite %v2float %float_1 %float_1
|
|
|
|
%70 = OpConstantComposite %mat2v2float %69 %69
|
2022-01-13 18:53:00 +00:00
|
|
|
%float_2 = OpConstant %float 2
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%84 = OpConstantComposite %v2float %float_2 %float_2
|
|
|
|
%85 = OpConstantComposite %mat2v2float %84 %84
|
2022-01-13 18:53:00 +00:00
|
|
|
%false = OpConstantFalse %bool
|
|
|
|
%int_0 = OpConstant %int 0
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%130 = OpTypeFunction %v4float %_ptr_Function_v2float
|
2022-01-13 18:53:00 +00:00
|
|
|
%float_3 = OpConstant %float 3
|
|
|
|
%float_4 = OpConstant %float 4
|
|
|
|
%float_0_5 = OpConstant %float 0.5
|
|
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
|
|
|
%_entrypoint_v = OpFunction %void None %24
|
|
|
|
%25 = OpLabel
|
|
|
|
%29 = OpVariable %_ptr_Function_v2float Function
|
|
|
|
OpStore %29 %28
|
|
|
|
%31 = OpFunctionCall %v4float %main %29
|
|
|
|
OpStore %sk_FragColor %31
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-04-13 18:37:36 +00:00
|
|
|
%test_bifffff22 = OpFunction %bool None %36
|
2022-01-13 18:53:00 +00:00
|
|
|
%37 = OpFunctionParameter %_ptr_Function_int
|
|
|
|
%38 = OpFunctionParameter %_ptr_Function_float
|
|
|
|
%39 = OpFunctionParameter %_ptr_Function_float
|
|
|
|
%40 = OpFunctionParameter %_ptr_Function_float
|
|
|
|
%41 = OpFunctionParameter %_ptr_Function_float
|
|
|
|
%42 = OpFunctionParameter %_ptr_Function_mat2v2float
|
|
|
|
%43 = OpLabel
|
|
|
|
%one = OpVariable %_ptr_Function_float Function
|
|
|
|
%m2 = OpVariable %_ptr_Function_mat2v2float Function
|
|
|
|
%45 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1
|
|
|
|
%48 = OpLoad %v4float %45
|
|
|
|
%49 = OpCompositeExtract %float %48 0
|
|
|
|
OpStore %one %49
|
|
|
|
%51 = OpLoad %float %38
|
2022-04-18 14:57:14 +00:00
|
|
|
%52 = OpFMul %float %51 %49
|
|
|
|
%53 = OpLoad %float %39
|
|
|
|
%54 = OpFMul %float %53 %49
|
|
|
|
%55 = OpLoad %float %40
|
|
|
|
%56 = OpFMul %float %55 %49
|
|
|
|
%57 = OpLoad %float %41
|
|
|
|
%58 = OpFMul %float %57 %49
|
|
|
|
%59 = OpCompositeConstruct %v2float %52 %54
|
|
|
|
%60 = OpCompositeConstruct %v2float %56 %58
|
|
|
|
%61 = OpCompositeConstruct %mat2v2float %59 %60
|
|
|
|
OpStore %m2 %61
|
|
|
|
%62 = OpLoad %int %37
|
|
|
|
OpSelectionMerge %63 None
|
|
|
|
OpSwitch %62 %63 1 %64 2 %65 3 %66 4 %67
|
|
|
|
%64 = OpLabel
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%71 = OpFAdd %v2float %59 %69
|
|
|
|
%72 = OpFAdd %v2float %60 %69
|
|
|
|
%73 = OpCompositeConstruct %mat2v2float %71 %72
|
|
|
|
OpStore %m2 %73
|
2022-04-18 14:57:14 +00:00
|
|
|
OpBranch %63
|
|
|
|
%65 = OpLabel
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%74 = OpLoad %mat2v2float %m2
|
|
|
|
%75 = OpCompositeExtract %v2float %74 0
|
|
|
|
%76 = OpFSub %v2float %75 %69
|
|
|
|
%77 = OpCompositeExtract %v2float %74 1
|
|
|
|
%78 = OpFSub %v2float %77 %69
|
|
|
|
%79 = OpCompositeConstruct %mat2v2float %76 %78
|
|
|
|
OpStore %m2 %79
|
2022-04-18 14:57:14 +00:00
|
|
|
OpBranch %63
|
|
|
|
%66 = OpLabel
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%80 = OpLoad %mat2v2float %m2
|
|
|
|
%82 = OpMatrixTimesScalar %mat2v2float %80 %float_2
|
|
|
|
OpStore %m2 %82
|
2022-04-18 14:57:14 +00:00
|
|
|
OpBranch %63
|
2022-01-13 18:53:00 +00:00
|
|
|
%67 = OpLabel
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%83 = OpLoad %mat2v2float %m2
|
|
|
|
%86 = OpCompositeExtract %v2float %83 0
|
|
|
|
%87 = OpFDiv %v2float %86 %84
|
|
|
|
%88 = OpCompositeExtract %v2float %83 1
|
|
|
|
%89 = OpFDiv %v2float %88 %84
|
|
|
|
%90 = OpCompositeConstruct %mat2v2float %87 %89
|
|
|
|
OpStore %m2 %90
|
2022-04-18 14:57:14 +00:00
|
|
|
OpBranch %63
|
|
|
|
%63 = OpLabel
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%93 = OpAccessChain %_ptr_Function_v2float %m2 %int_0
|
|
|
|
%94 = OpLoad %v2float %93
|
|
|
|
%95 = OpCompositeExtract %float %94 0
|
|
|
|
%96 = OpAccessChain %_ptr_Function_v2float %42 %int_0
|
2022-04-18 14:57:14 +00:00
|
|
|
%97 = OpLoad %v2float %96
|
|
|
|
%98 = OpCompositeExtract %float %97 0
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%99 = OpFOrdEqual %bool %95 %98
|
|
|
|
OpSelectionMerge %101 None
|
|
|
|
OpBranchConditional %99 %100 %101
|
|
|
|
%100 = OpLabel
|
|
|
|
%102 = OpAccessChain %_ptr_Function_v2float %m2 %int_0
|
|
|
|
%103 = OpLoad %v2float %102
|
|
|
|
%104 = OpCompositeExtract %float %103 1
|
|
|
|
%105 = OpAccessChain %_ptr_Function_v2float %42 %int_0
|
2022-04-18 14:57:14 +00:00
|
|
|
%106 = OpLoad %v2float %105
|
|
|
|
%107 = OpCompositeExtract %float %106 1
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%108 = OpFOrdEqual %bool %104 %107
|
|
|
|
OpBranch %101
|
|
|
|
%101 = OpLabel
|
|
|
|
%109 = OpPhi %bool %false %63 %108 %100
|
|
|
|
OpSelectionMerge %111 None
|
|
|
|
OpBranchConditional %109 %110 %111
|
|
|
|
%110 = OpLabel
|
|
|
|
%112 = OpAccessChain %_ptr_Function_v2float %m2 %int_1
|
|
|
|
%113 = OpLoad %v2float %112
|
|
|
|
%114 = OpCompositeExtract %float %113 0
|
|
|
|
%115 = OpAccessChain %_ptr_Function_v2float %42 %int_1
|
2022-04-18 14:57:14 +00:00
|
|
|
%116 = OpLoad %v2float %115
|
|
|
|
%117 = OpCompositeExtract %float %116 0
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%118 = OpFOrdEqual %bool %114 %117
|
|
|
|
OpBranch %111
|
|
|
|
%111 = OpLabel
|
|
|
|
%119 = OpPhi %bool %false %101 %118 %110
|
|
|
|
OpSelectionMerge %121 None
|
|
|
|
OpBranchConditional %119 %120 %121
|
|
|
|
%120 = OpLabel
|
|
|
|
%122 = OpAccessChain %_ptr_Function_v2float %m2 %int_1
|
|
|
|
%123 = OpLoad %v2float %122
|
|
|
|
%124 = OpCompositeExtract %float %123 1
|
|
|
|
%125 = OpAccessChain %_ptr_Function_v2float %42 %int_1
|
2022-04-18 14:57:14 +00:00
|
|
|
%126 = OpLoad %v2float %125
|
|
|
|
%127 = OpCompositeExtract %float %126 1
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%128 = OpFOrdEqual %bool %124 %127
|
|
|
|
OpBranch %121
|
|
|
|
%121 = OpLabel
|
|
|
|
%129 = OpPhi %bool %false %111 %128 %120
|
|
|
|
OpReturnValue %129
|
2022-01-13 18:53:00 +00:00
|
|
|
OpFunctionEnd
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%main = OpFunction %v4float None %130
|
|
|
|
%131 = OpFunctionParameter %_ptr_Function_v2float
|
|
|
|
%132 = OpLabel
|
2022-01-13 18:53:00 +00:00
|
|
|
%f1 = OpVariable %_ptr_Function_float Function
|
|
|
|
%f2 = OpVariable %_ptr_Function_float Function
|
|
|
|
%f3 = OpVariable %_ptr_Function_float Function
|
|
|
|
%f4 = OpVariable %_ptr_Function_float Function
|
|
|
|
%_0_expected = OpVariable %_ptr_Function_mat2v2float Function
|
|
|
|
%_1_one = OpVariable %_ptr_Function_float Function
|
|
|
|
%_2_m2 = OpVariable %_ptr_Function_mat2v2float Function
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%217 = OpVariable %_ptr_Function_int Function
|
|
|
|
%218 = OpVariable %_ptr_Function_float Function
|
|
|
|
%219 = OpVariable %_ptr_Function_float Function
|
|
|
|
%220 = OpVariable %_ptr_Function_float Function
|
2022-04-18 14:57:14 +00:00
|
|
|
%221 = OpVariable %_ptr_Function_float Function
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%229 = OpVariable %_ptr_Function_mat2v2float Function
|
|
|
|
%235 = OpVariable %_ptr_Function_int Function
|
|
|
|
%236 = OpVariable %_ptr_Function_float Function
|
|
|
|
%237 = OpVariable %_ptr_Function_float Function
|
|
|
|
%238 = OpVariable %_ptr_Function_float Function
|
2022-04-18 14:57:14 +00:00
|
|
|
%239 = OpVariable %_ptr_Function_float Function
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%247 = OpVariable %_ptr_Function_mat2v2float Function
|
|
|
|
%253 = OpVariable %_ptr_Function_int Function
|
|
|
|
%254 = OpVariable %_ptr_Function_float Function
|
|
|
|
%255 = OpVariable %_ptr_Function_float Function
|
|
|
|
%256 = OpVariable %_ptr_Function_float Function
|
2022-04-18 14:57:14 +00:00
|
|
|
%257 = OpVariable %_ptr_Function_float Function
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%266 = OpVariable %_ptr_Function_mat2v2float Function
|
|
|
|
%269 = OpVariable %_ptr_Function_v4float Function
|
2022-01-13 18:53:00 +00:00
|
|
|
OpStore %minus %int_2
|
|
|
|
OpStore %star %int_3
|
|
|
|
OpStore %slash %int_4
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%134 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0
|
|
|
|
%135 = OpLoad %v4float %134
|
|
|
|
%136 = OpCompositeExtract %float %135 1
|
|
|
|
OpStore %f1 %136
|
|
|
|
%138 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0
|
|
|
|
%139 = OpLoad %v4float %138
|
|
|
|
%140 = OpCompositeExtract %float %139 1
|
|
|
|
%141 = OpFMul %float %float_2 %140
|
|
|
|
OpStore %f2 %141
|
|
|
|
%144 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0
|
|
|
|
%145 = OpLoad %v4float %144
|
|
|
|
%146 = OpCompositeExtract %float %145 1
|
|
|
|
%147 = OpFMul %float %float_3 %146
|
|
|
|
OpStore %f3 %147
|
|
|
|
%150 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0
|
|
|
|
%151 = OpLoad %v4float %150
|
|
|
|
%152 = OpCompositeExtract %float %151 1
|
|
|
|
%153 = OpFMul %float %float_4 %152
|
|
|
|
OpStore %f4 %153
|
|
|
|
%155 = OpFAdd %float %136 %float_1
|
|
|
|
%156 = OpFAdd %float %141 %float_1
|
|
|
|
%157 = OpFAdd %float %147 %float_1
|
|
|
|
%158 = OpFAdd %float %153 %float_1
|
|
|
|
%159 = OpCompositeConstruct %v2float %155 %156
|
|
|
|
%160 = OpCompositeConstruct %v2float %157 %158
|
|
|
|
%161 = OpCompositeConstruct %mat2v2float %159 %160
|
|
|
|
OpStore %_0_expected %161
|
|
|
|
%163 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1
|
|
|
|
%164 = OpLoad %v4float %163
|
|
|
|
%165 = OpCompositeExtract %float %164 0
|
|
|
|
OpStore %_1_one %165
|
|
|
|
%167 = OpFMul %float %136 %165
|
|
|
|
%168 = OpFMul %float %141 %165
|
|
|
|
%169 = OpFMul %float %147 %165
|
|
|
|
%170 = OpFMul %float %153 %165
|
|
|
|
%171 = OpCompositeConstruct %v2float %167 %168
|
|
|
|
%172 = OpCompositeConstruct %v2float %169 %170
|
|
|
|
%173 = OpCompositeConstruct %mat2v2float %171 %172
|
|
|
|
OpStore %_2_m2 %173
|
|
|
|
%174 = OpFAdd %v2float %171 %69
|
|
|
|
%175 = OpFAdd %v2float %172 %69
|
2022-04-18 14:57:14 +00:00
|
|
|
%176 = OpCompositeConstruct %mat2v2float %174 %175
|
|
|
|
OpStore %_2_m2 %176
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%177 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_0
|
|
|
|
%178 = OpLoad %v2float %177
|
|
|
|
%179 = OpCompositeExtract %float %178 0
|
|
|
|
%180 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_0
|
2022-04-18 14:57:14 +00:00
|
|
|
%181 = OpLoad %v2float %180
|
|
|
|
%182 = OpCompositeExtract %float %181 0
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%183 = OpFOrdEqual %bool %179 %182
|
|
|
|
OpSelectionMerge %185 None
|
|
|
|
OpBranchConditional %183 %184 %185
|
|
|
|
%184 = OpLabel
|
|
|
|
%186 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_0
|
|
|
|
%187 = OpLoad %v2float %186
|
|
|
|
%188 = OpCompositeExtract %float %187 1
|
|
|
|
%189 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_0
|
2022-04-18 14:57:14 +00:00
|
|
|
%190 = OpLoad %v2float %189
|
|
|
|
%191 = OpCompositeExtract %float %190 1
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%192 = OpFOrdEqual %bool %188 %191
|
|
|
|
OpBranch %185
|
|
|
|
%185 = OpLabel
|
|
|
|
%193 = OpPhi %bool %false %132 %192 %184
|
|
|
|
OpSelectionMerge %195 None
|
|
|
|
OpBranchConditional %193 %194 %195
|
|
|
|
%194 = OpLabel
|
|
|
|
%196 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_1
|
|
|
|
%197 = OpLoad %v2float %196
|
|
|
|
%198 = OpCompositeExtract %float %197 0
|
|
|
|
%199 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_1
|
2022-04-12 21:17:15 +00:00
|
|
|
%200 = OpLoad %v2float %199
|
|
|
|
%201 = OpCompositeExtract %float %200 0
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%202 = OpFOrdEqual %bool %198 %201
|
|
|
|
OpBranch %195
|
|
|
|
%195 = OpLabel
|
|
|
|
%203 = OpPhi %bool %false %185 %202 %194
|
|
|
|
OpSelectionMerge %205 None
|
|
|
|
OpBranchConditional %203 %204 %205
|
|
|
|
%204 = OpLabel
|
|
|
|
%206 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_1
|
|
|
|
%207 = OpLoad %v2float %206
|
|
|
|
%208 = OpCompositeExtract %float %207 1
|
|
|
|
%209 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_1
|
2022-04-18 14:57:14 +00:00
|
|
|
%210 = OpLoad %v2float %209
|
|
|
|
%211 = OpCompositeExtract %float %210 1
|
Move store-cache handling into writeLabel.
Previously, every expression/statement type was responsible for
pruning or clearing the store-cache when branches were involved. This
was difficult to reason about and easy to get wrong, particularly if
the details are not fresh in your mind.
Now, `writeLabel` takes care of the details for you. Pass in the
location of the branch(es) which use the label, and the proper cache
updating behavior will occur automatically.
Some of the label enum types are not strictly necessary and exist for
the benefit of a reader. Specifically:
- `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms
- `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms
The hope is that extra enum names will be easier for a reader to
follow, versus fewer but very-verbose enum names (like
`kBranchIsBelowOrOnBothSides`).
This change earned some very minor switch-related dividends. Previously,
every label in a switch was treated as a forward-branch, but in fact,
the very first label in a switch is privileged. This is because we are
branching from the previous line, and the store cache is trustworthy in
this case. (Versus "branching from above," where the store cache needs
to be pruned before it can be trusted.)
Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-19 14:33:52 +00:00
|
|
|
%212 = OpFOrdEqual %bool %208 %211
|
|
|
|
OpBranch %205
|
|
|
|
%205 = OpLabel
|
|
|
|
%213 = OpPhi %bool %false %195 %212 %204
|
|
|
|
OpSelectionMerge %215 None
|
|
|
|
OpBranchConditional %213 %214 %215
|
|
|
|
%214 = OpLabel
|
|
|
|
%216 = OpLoad %int %minus
|
|
|
|
OpStore %217 %216
|
|
|
|
OpStore %218 %136
|
|
|
|
OpStore %219 %141
|
|
|
|
OpStore %220 %147
|
|
|
|
OpStore %221 %153
|
|
|
|
%222 = OpFSub %float %136 %float_1
|
|
|
|
%223 = OpFSub %float %141 %float_1
|
|
|
|
%224 = OpFSub %float %147 %float_1
|
|
|
|
%225 = OpFSub %float %153 %float_1
|
|
|
|
%226 = OpCompositeConstruct %v2float %222 %223
|
|
|
|
%227 = OpCompositeConstruct %v2float %224 %225
|
|
|
|
%228 = OpCompositeConstruct %mat2v2float %226 %227
|
|
|
|
OpStore %229 %228
|
|
|
|
%230 = OpFunctionCall %bool %test_bifffff22 %217 %218 %219 %220 %221 %229
|
|
|
|
OpBranch %215
|
|
|
|
%215 = OpLabel
|
|
|
|
%231 = OpPhi %bool %false %205 %230 %214
|
|
|
|
OpSelectionMerge %233 None
|
|
|
|
OpBranchConditional %231 %232 %233
|
|
|
|
%232 = OpLabel
|
|
|
|
%234 = OpLoad %int %star
|
|
|
|
OpStore %235 %234
|
|
|
|
OpStore %236 %136
|
|
|
|
OpStore %237 %141
|
|
|
|
OpStore %238 %147
|
|
|
|
OpStore %239 %153
|
|
|
|
%240 = OpFMul %float %136 %float_2
|
|
|
|
%241 = OpFMul %float %141 %float_2
|
|
|
|
%242 = OpFMul %float %147 %float_2
|
|
|
|
%243 = OpFMul %float %153 %float_2
|
|
|
|
%244 = OpCompositeConstruct %v2float %240 %241
|
|
|
|
%245 = OpCompositeConstruct %v2float %242 %243
|
|
|
|
%246 = OpCompositeConstruct %mat2v2float %244 %245
|
|
|
|
OpStore %247 %246
|
|
|
|
%248 = OpFunctionCall %bool %test_bifffff22 %235 %236 %237 %238 %239 %247
|
|
|
|
OpBranch %233
|
|
|
|
%233 = OpLabel
|
|
|
|
%249 = OpPhi %bool %false %215 %248 %232
|
|
|
|
OpSelectionMerge %251 None
|
|
|
|
OpBranchConditional %249 %250 %251
|
|
|
|
%250 = OpLabel
|
|
|
|
%252 = OpLoad %int %slash
|
|
|
|
OpStore %253 %252
|
|
|
|
OpStore %254 %136
|
|
|
|
OpStore %255 %141
|
|
|
|
OpStore %256 %147
|
|
|
|
OpStore %257 %153
|
|
|
|
%259 = OpFMul %float %136 %float_0_5
|
|
|
|
%260 = OpFMul %float %141 %float_0_5
|
|
|
|
%261 = OpFMul %float %147 %float_0_5
|
|
|
|
%262 = OpFMul %float %153 %float_0_5
|
|
|
|
%263 = OpCompositeConstruct %v2float %259 %260
|
|
|
|
%264 = OpCompositeConstruct %v2float %261 %262
|
|
|
|
%265 = OpCompositeConstruct %mat2v2float %263 %264
|
|
|
|
OpStore %266 %265
|
|
|
|
%267 = OpFunctionCall %bool %test_bifffff22 %253 %254 %255 %256 %257 %266
|
|
|
|
OpBranch %251
|
|
|
|
%251 = OpLabel
|
|
|
|
%268 = OpPhi %bool %false %233 %267 %250
|
|
|
|
OpSelectionMerge %273 None
|
|
|
|
OpBranchConditional %268 %271 %272
|
|
|
|
%271 = OpLabel
|
|
|
|
%274 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0
|
|
|
|
%275 = OpLoad %v4float %274
|
|
|
|
OpStore %269 %275
|
|
|
|
OpBranch %273
|
|
|
|
%272 = OpLabel
|
|
|
|
%276 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1
|
|
|
|
%277 = OpLoad %v4float %276
|
|
|
|
OpStore %269 %277
|
|
|
|
OpBranch %273
|
|
|
|
%273 = OpLabel
|
|
|
|
%278 = OpLoad %v4float %269
|
|
|
|
OpReturnValue %278
|
2022-01-13 18:53:00 +00:00
|
|
|
OpFunctionEnd
|