This reverts commit 49e5b3a339.
Reason for revert: Going back to deferred proxies
Original change's description:
> SW mask gen: release scratch bitmap after upload
>
> This fixes a regression introduced in 366716, where we
> were retaining the scratch bitmap. Before that change we were
> destroying it after upload which is what we should do.
>
> Bug: skia:11288
> Change-Id: Ib567be037a2ff7595cd305a2ef3502d336795c46
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367880
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>
TBR=egdaniel@google.com,robertphillips@google.com,adlai@google.com
Change-Id: I454622563ad899691fa55cd99853261e2ce66086
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11288
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368253
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
It turns out that walking an expression to update the refKind of its
embedded VariableReference is so useful that we had implemented it
twice. I will need to do it a third time in a followup CL.
Change-Id: Idd2794ea50f8c71725bb998ac8a625b36d076746
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368118
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Each patch has one join and one set of stroke parameters, so the
vertex shader is the correct place to do it. This is also an important
cleanup that will allow us to create "dynamic" stroking parameters and
batch together strokes with different join types or stroke widths.
Bug: chromium:1172543
Bug: skia:10419
Change-Id: Icef0c20858fba6c18685006550dc75246710cd35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368043
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
We ought to reject all of these in the parser, but even if they slip
through, we don't want to be emitting them for the backend. This leaves
'const' until we decide how to resolve the difference in semantics
between SkSL and GLSL.
Bug: skia:11301, skia:10837
Change-Id: I62730f6f971be04bcc3d367ceb7f211436b197c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368256
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:11226
Change-Id: I5f507a0d3ffe0a2698b10b0535486986c2a8b5b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367977
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This avoids an error case where the definition map points to an
expression that is later eliminated, leaving the definition map holding
a dangling pointer.
In practice we only use values from the definition map if they are
compile-time constants, so this generates the same code during
optimization.
Change-Id: I314ce8e1f9b4e0c90fbfe7c97e2a3950b65a5819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368059
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
See previous patchsets for what we can delete after lifting this guard.
Change-Id: Ia87a9b77e53bb79279f1305d6411b0a7fe5dbb9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367016
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 1a2326363a.
Reason for revert: breaking win10 quadro400 perf bot on vk and vkmsaa
Original change's description:
> Only store resources in the GrResourceCache::fScratchMap that are available to be scratch.
>
> Currently when we create a scratch resource, we immediately add it to
> scratch map and it will stay there until we delete the resource. The one
> exception to this is adding a unique key will remove a resource from
> the scratch map. This means there are resources in the scratch map that
> can't be returned when looking for a scratch because they are either
> already in use by something else or their budget was changed to
> unbudgeted. This means everything time we do a scratch lookup, even
> after finding the list of resources that match a key, we still have to
> iterate that list to see if we can use that resource or not.
>
> The problem comes when we may have lots of resources that all match the
> same key (think 1000s of identical buffers). Then the cost of iterating
> this list starts to get very high.
>
> This change makes it so only resources that can actively be used as a
> scratch at that moment are stored in the scratch map. Thus when we find
> a scratch resource we pull it out of the scratch map. When that resources
> refs go back to zero it is added back to the scratch map. Similar removal
> is also now used for changing a resource to and from budgeted.
>
> Change-Id: I52b415d0e035dfc589f3d712be85799a56827bf0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367976
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: I1e57e10e75f930adfecb0e4167c1d6269798c893
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368236
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I2a09249cefc2f1aab123afa1a07d4ae494284e05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324632
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
6b20e1c884..4968f6f2b1
2021-02-08 jonahr@google.com Move getRendererDescription from ContextImpl to DisplayImpl
2021-02-08 jonahr@google.com GL: Consolidate glGetString calls
2021-02-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 38d88d12b2fd to d6c9a9f3f705 (29 revisions)
2021-02-08 jmadill@chromium.org infra: Remove ssd:0 from builderless config.
2021-02-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ff010f9f0131 to 266614a36dbd (2 revisions)
2021-02-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 19ae187233a0 to 82fe35376dee (607 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC borenet@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: borenet@google.com
Change-Id: Id84947300cb7fb492cfd537acca0c050a2e3803e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368150
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Prior to this change Viewer would crash in debug or act quite strangely
in release when attempting to filter any RSXForm blobs. This adds the
ability to allocate an RSXForm run and directly query the number of
positioning scalers per glyph it contains.
Change-Id: I90e118102a0f4d535e97026eecad9ac2f70e448f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367957
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
I don't intend to improve SkRP beyond fixing bugs.
SK_DISABLE_LOWP_BILERP_CLAMP_CLAMP_STAGE guards the largest chunk here;
I never got that flag to flip in Chromium.
Change-Id: Ic71e9d058ae3dae75bd5006dc76faba7de1df300
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368039
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This doesn't change any functionality. It just compartmentalizes a large
chunk of logic that was previously intertwined in the Compiler class.
This logic stands alone and doesn't need anything from the Compiler at
all except the generic "Defined" expression from the Context.
In followup CLs I intend to experiment with changes to the API and
logic, but factoring the code out seemed like a big enough change that
it deserved its own CL.
Change-Id: I3e1a7c62812c6f284167c967086ef4dd828a0b2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367879
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
ResourceProviderProxyBase is supposed to forward all virtuals to fProxy,
but it currently drops loadAudioAsset().
TBR=
Change-Id: I8c690802cd3ba6078232e210b032aa67499d7ba8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368116
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
There is now PipelineStage::ConvertProgram, which takes a collection of
callbacks, and processes an entire program. For program objects that may
need name mangling, the callbacks return the new name, which is recorded
and used for future references to that object (eg uniforms & functions).
The callbacks let the FP inject new elements programmatically:
- Declare uniforms and get handles
- Emit child functions
- Invoke child processors for calls to sample()
In a follow-up CL, we can add an skslc `.rte -> .sksl` mode, where the
callbacks just emit the description() of the relevant element. We can
also follow the same pattern to emit declarations of types (structs,
enums), and global variables.
Change-Id: I81df68a2f41bcb48f866d37af3b77ad43e880236
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367058
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This was here for deferred proxies, which are gone now.
Bug: skia:11288
Change-Id: Idc8a3aef7c3cce62d9397338a0c77d41435527a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367881
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The leftover tests in shared/ are not easily testable as Runtime
Effects; they do things that ES2 doesn't support or use a feature not
exposed directly by Runtime Effects.
Change-Id: I7ebe170cf713c4a0d2dbef333c1fcbac2410c67f
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367059
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:11226
Change-Id: I7939233559e673b10c9e471137d44282b9612f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366317
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Currently when we create a scratch resource, we immediately add it to
scratch map and it will stay there until we delete the resource. The one
exception to this is adding a unique key will remove a resource from
the scratch map. This means there are resources in the scratch map that
can't be returned when looking for a scratch because they are either
already in use by something else or their budget was changed to
unbudgeted. This means everything time we do a scratch lookup, even
after finding the list of resources that match a key, we still have to
iterate that list to see if we can use that resource or not.
The problem comes when we may have lots of resources that all match the
same key (think 1000s of identical buffers). Then the cost of iterating
this list starts to get very high.
This change makes it so only resources that can actively be used as a
scratch at that moment are stored in the scratch map. Thus when we find
a scratch resource we pull it out of the scratch map. When that resources
refs go back to zero it is added back to the scratch map. Similar removal
is also now used for changing a resource to and from budgeted.
Change-Id: I52b415d0e035dfc589f3d712be85799a56827bf0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367976
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This fixes a regression introduced in 366716, where we
were retaining the scratch bitmap. Before that change we were
destroying it after upload which is what we should do.
Bug: skia:11288
Change-Id: Ib567be037a2ff7595cd305a2ef3502d336795c46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367880
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This enforces write-only access to the mapped buffers, will enable
chaining of indirect strokes, and gives us the ability to reorder the
fields for Metal.
Bug: chromium:1172543
Bug: skia:11291
Bug: skia:10419
Change-Id: I4449ff85dd0019f6d6d6781ede52bcf26dee8b02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367416
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
We can of course use allow_jit to test with and without JIT!
This testing was the only reason Program::dropJIT() was public. Given
how tricky its implementation is, I'd rather keep it a private detail
than exposed API, in case one day we find need to make it impossible.
Change-Id: Ifa256355309d9baf1bae506d75951381dce9b53c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367896
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
We have a global flag controlling whether skvm::Programs JIT,
and this adds a per-Program flag to skvm::Builder::done().
Use it for single-color color filtering, and add a unit test.
Change-Id: I3a87761c8c6b818111d03c97b31f8b30d9f2c194
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367856
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a reland of 3f95357c4c
Original change's description:
> Don't simplify strokes that could have been tessellated
>
> Bug: chromium:1172543
> Change-Id: I3be0d822ca0a338118059c7aa37b2fd7822869b8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: chromium:1172543
Change-Id: I514211c3d46e62d3bacb0beb8fc9ea6959144e4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367022
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
store() returns a success bool only because it can, because it wasn't
going to return any sort of skvm::Value anyway. But it should never
fail given a well-formed skvm::PixelFormat, e.g. one from
SkColorType_to_PixelFormat. So move the "error handling" inside, really
just asserting/assuming it doesn't fail.
And similarly, skvm::SkColorType_to_PixelFormat() can no longer fail, so
have it return the skvm::PixelFormat directly instead of the bool I used
to stage things back when building this out.
Change-Id: I6dc3b6da32cdaaef377fe59b8c94846e902841ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367796
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
- Treat randomly generated control points as pre-projected
- Use double-precision conic evaluation for "within tolerance" test.
This allows us to test with larger magnitude control points (the
SkConic/SkGeometry single-precision functions lose too much accuracy).
Bug: skia:10419
Change-Id: Iba0915dccb50131e1a1b28a7d556863497f636e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367057
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Cusps are rare, and simply detecting if a curve has one or not is
cheap. This CL handles cusps on the CPU side by chopping them into two
different patches joined by a bowtie. By removing cusps on the GPU
side, we greatly reduce the amount of complexity required in the
tessellation shaders. For now we only remove the line detection in
order to fix a rendering artifact, but in the future we will be able
to significantly simplifty these shaders.
Bug: chromium:1172543
Bug: skia:10419
Change-Id: I9c27c3cf002e0cbd91d4877f0ce7ec5a9136ef2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367018
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
These aren't used any more in favor of lazy proxies.
Bug: skia:11288
Change-Id: I992e1a3dd343e0ebc7f3a4f18c0054453dfebbaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366896
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
These cover new ground; when combined with some additional optimization
work, they can cause crashes in the optimizer that we don't see from any
existing test.
Change-Id: I3958a5522cfe0929d0753e6e617d72e032c7f5a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367063
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
b2de0688d7..6b20e1c884
2021-02-08 cnorthrop@google.com Tests: Add Hill Climb Racing trace
2021-02-08 cnorthrop@google.com Tests: Add Worms Zone io trace
2021-02-07 doughorn@google.com Micro-optimizations for setUniform*
2021-02-06 natsu@google.com Use __system_property* to read Android props
2021-02-05 cnorthrop@google.com Tests: Add Romancing Saga trace
2021-02-05 geofflang@chromium.org Skip happy_color trace on Windows AMD Vulkan
2021-02-05 ianelliott@google.com Create MSAA-swapchain windows' VkImages differently
2021-02-05 cnorthrop@google.com Tests: Add Rise of Kingdoms trace
2021-02-05 cnorthrop@google.com Tests: Add Clash Royale trace
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC borenet@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: borenet@google.com
Test: Test: Run the dEQP shader tests.Test: Test: angle_perftests --gtest_filter="*clash_royale*"Test: Test: angle_perftests --gtest_filter="*hill_climb_racing*"Test: Test: angle_perftests --gtest_filter="*rise_of_kingdoms*"Test: Test: angle_perftests --gtest_filter="*romancing_saga*"Test: Test: angle_perftests --gtest_filter="*worms_zone_io*"Test: Test: aosp/1574848 presubmitTest: Test: roll_aosp.sh && m && launch Cuttlefish w/ SwANGLE
Change-Id: I2ac7b4deec28f1f6ec6c00868b66cdaaaead9d32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367636
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>