ffc9dec755
We now have two functions `writeOpLoad` and `writeOpStore` which are in charge of writing SpvOpLoad and SpvOpStore instructions. `writeOpStore` also keeps track of pointer stores in a "store cache." Subsequent loads from that same pointer will be found in the cache and will return the value stored in that pointer instead. Such a cache definitely cannot work in the face of control flow, so we make the following concessions: - `pruneReachableOps` is now `pruneConditionalOps`. Any pointers that are altered inside a potentially-unreachable block are cleared from the cache entirely. - The entire store cache is cleared at all OpLabels within a loop. The cache also cannot work in the presence of swizzled stores, so we make another significant concession: - The entire store cache is cleared whenever we store into a non-memory pointer (e.g., assigning into a swizzled LValue, such as `foo.xz`). Despite these significant limitations, this manages to dramatically shrink many real-world examples. Change-Id: I0981a0cf7b45b064e153e9ada271494c8e00cad5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530054 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> |
||
---|---|---|
.. | ||
AbsInt.glsl | ||
AbsIntStandaloneSettings.glsl | ||
BlendGuardedDivide.glsl | ||
BlendGuardedDivideStandaloneSettings.glsl | ||
FractNegative.glsl | ||
FractNegativeStandaloneSettings.glsl | ||
FragCoords.glsl | ||
FragCoordsStandaloneSettings.glsl | ||
LoopCondition.glsl | ||
LoopConditionStandaloneSettings.glsl | ||
MinAndAbsTogether.glsl | ||
MinAndAbsTogetherStandaloneSettings.glsl | ||
NegatedAtan.glsl | ||
NegatedAtanStandaloneSettings.glsl | ||
NegatedLdexp.glsl | ||
NegatedLdexpStandaloneSettings.glsl | ||
PowWithConstantExponent.glsl | ||
PowWithConstantExponentStandaloneSettings.glsl | ||
RewriteDoWhileLoops.glsl | ||
RewriteDoWhileLoopsStandaloneSettings.glsl | ||
RewriteMatrixComparisons.glsl | ||
RewriteMatrixComparisonsStandaloneSettings.glsl | ||
RewriteMatrixVectorMultiply.asm.frag | ||
RewriteMatrixVectorMultiply.glsl | ||
RewriteMatrixVectorMultiplyStandaloneSettings.glsl | ||
TernaryShortCircuit.glsl | ||
TernaryShortCircuitStandaloneSettings.glsl |