Restrict enforcement of CTS unit tests to only be applied to devices
that have a vendor image whose API level is >= when the SkQP unit tests were introduced into CTS.
Bug: b/235849228
Bug: b/229804433
Change-Id: Ie69a12dc320a65e4cceb42095dfa26ac38324e0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/559156
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
They aren't called yet, but they are visible in the output SkSL.
A followup CL will invoke them when `eval` is called.
Change-Id: I8c28c332d718a9a773365c6a18e476da97bff9ad
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/559096
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Refactor the blend modes impl to always use SkBlenders.
This is in preparation of non-standard blend mode support.
No functional changes.
Change-Id: Id4ed8a2e2f90261978f48c74bc6d40c91ea4a35e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/559097
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Preparing for glyph zero-padding optimization.
This is the main reason for this change: the current data
structures do not support the optimization.
After I put this change under supportBilerpFromGlyphAtlas flag I could not even compare the results with and without this change (the flag increases glyph sizes). But from my previous measurement it gives saves about 1% of the memory (or 1 plot eviction) on the test.
Change-Id: Ibb66821d220a98487acba88f0ce27ece23e5a669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550617
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This gives us a building block that mimics the effect of evaluating a
missing child effect.
Change-Id: Ic091f0692febc3370debcd4742751b175e98fde9
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/559076
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Previously, snippets held a single callback which had two separate
responsibilities:
1 - If needed, emit helper functions into the preamble
2 - Return an expression that invokes the snippet
This works great when you only call a snippet exactly one time, but
poses a problem if you need to invoke a snippet more than once;
the callback would also emit all of that snippet's helper functions
again!
This CL splits the callbacks into two pieces: a "preamble generator"
and an "expression generator." The preamble generator is responsible
for bullet point 1 above; the expression generator is responsible
for bullet point 2.
The preamble generator will run exactly once for every entry in a
shader info, and is in charge of advancing the entry-index through
the shader (a surprisingly non-trivial concern when children are
involved!). The expression generator can be called any number of
times for an entry, does not advance the entry index, and cannot
change the preamble.
At present, we do not actually have any use cases where we generate
the expression for a given snippet more than once, but this is a
feature that Runtime Shaders will need to leverage in a followup.
Change-Id: I3b75fc894351ac459b13763331e8bf64694de1df
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558920
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Add a mutex around the glyphID to Path lookup.
Cleanup: remove noexcept
This is a reland of commit 2910d7bf6c
Original change's description:
> Delay generating SkPaths in PathOpSubmitter
>
> In order to allow the RemoteStrike cache to convert Blobs to Slugs,
> the code must create SubRuns using only SkPackedGlyphIDs. Building
> PathSubRuns with SkPackedGlyphIDs instead of SkPaths is the first
> of 5 conversion.
>
> This code builds a PathSubRun with glyph ids, and delays looking
> up the SkPaths until the submitDraw call. The submitDraw uses an
> SkStrike which has the facility to generate the path data on demand.
>
> Change-Id: I3270d21b797229117664d10b2f17881afff3c5d9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558651
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: Ic6025194c6c55bfff8a36e95119fdf69d9491edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558935
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Similar to angle and chromium command buffer, treat virgl as a separate
abstraction on top of real vendor driver.
Bug: chromium:1331350
Change-Id: Ib26707aa301e03a677f6dd9036851f66b30437f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558919
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
The two macros (GR_GL_VER and GR_GLSL_VER) are equivalent, but
everywhere else (including in this function), we're careful to
use them based on the type of version (GL or GLSL). These uses
were inconsistent.
Change-Id: Iefcaf207f29f62541a2fe9252095f6601171a8d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558931
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit 2910d7bf6c.
Reason for revert: Race in TSAN
Original change's description:
> Delay generating SkPaths in PathOpSubmitter
>
> In order to allow the RemoteStrike cache to convert Blobs to Slugs,
> the code must create SubRuns using only SkPackedGlyphIDs. Building
> PathSubRuns with SkPackedGlyphIDs instead of SkPaths is the first
> of 5 conversion.
>
> This code builds a PathSubRun with glyph ids, and delays looking
> up the SkPaths until the submitDraw call. The submitDraw uses an
> SkStrike which has the facility to generate the path data on demand.
>
> Change-Id: I3270d21b797229117664d10b2f17881afff3c5d9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558651
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I716d7030dc6d06a69b8c65e788102e098df770f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558934
Auto-Submit: Herb Derby <herb@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
In order to allow the RemoteStrike cache to convert Blobs to Slugs,
the code must create SubRuns using only SkPackedGlyphIDs. Building
PathSubRuns with SkPackedGlyphIDs instead of SkPaths is the first
of 5 conversion.
This code builds a PathSubRun with glyph ids, and delays looking
up the SkPaths until the submitDraw call. The submitDraw uses an
SkStrike which has the facility to generate the path data on demand.
Change-Id: I3270d21b797229117664d10b2f17881afff3c5d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558651
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
go_repositories.bzl is generated by Gazelle, which does not add
module/function docstrings. Skipping the buildifier check on this
file to prevent presubmit failure.
Bug: none
Change-Id: I242319f25f2ba686efc2b0ade42852bbe28aabe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558925
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Mumford <cmumford@google.com>
4b20c309fb..ea1382365f
2022-07-15 syoussefi@chromium.org Remove suppression for passing dEQP tests
2022-07-15 abdolrashidi@google.com Disable mutable texture upload on Win/Intel devs
2022-07-15 b.schade@samsung.com Fix linkValidateTransformFeedback for glLinkProgram
2022-07-15 qyearsley@chromium.org Update version of lucicfg for angle repo and regen config
2022-07-14 cclao@google.com Vulkan: Destroy descriptorSet cache when shader image is destroyed
2022-07-14 cclao@google.com Vulkan: Move DescriptorSet cache to DynamicDescriptorPool
2022-07-14 syoussefi@chromium.org Vulkan: Only apply MSAA FF fix up if executable has FF
2022-07-14 kpiddington@apple.com Metal fails to compile uniform blocks in ternary statements
2022-07-14 ynovikov@chromium.org Skip EGLBufferAgeTest.QueryBufferAge on Linux Intel Vulkan
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 scroggo@google.com on the revert to ensure that a human
is aware of the problem.
To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
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/main/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: scroggo@google.com
Change-Id: Ib49d68bba61406a83110273a5c8e5ed11ecc1ff3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558670
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Creates a new package mesa_intel_driver_linux_22 for
version 22+ Mesa drivers, since Mesa dropped a large number
of "legacy" drivers in 22.0.
Bug: skia:13401
Change-Id: Ib0a2639a798a76f5d2a744ca37902efccd83737d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557586
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Instead of allocating new texture and sampler arrays for each draw we can reuse
the memory by just creating them for the max size for any draws at the start.
Bug: skia:13357
Change-Id: Ibf0fc20cbbd3e03501f8e202cba5986e5e345cbe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558722
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:13357
Change-Id: I845872fd70771f273b339becc2064ec732884988
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557390
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
A runtime effect needs to be able to invoke a child snippet from
a `child.eval()` expression anywhere. Because `eval` occurs in an
expression context, we don't have the ability to emit multiple
statements. This CL restructures our glue-code generation functions to
return expressions instead of outputting statements, so that they can
be used as subexpressions.
Change-Id: I930bfef2c668323d68f6fd5795621cf42e1bf4eb
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558542
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
A runtime effect needs to be able to invoke a child snippet from
a `child.eval()` expression anywhere. Because `eval` occurs in an
expression context, we don't have the ability to emit multiple
statements, or declare new variables. That means all of our glue code
needs to eventually become glue-expressions.
When there are no children, the default glue code is just a function
call to a snippet, so this will actually work fine as an expression.
However, when there _are_ children, the glue code becomes arbitrarily
complex. (We need to call child snippets, which could themselves call
more children.)
Now, when children exist, the default glue code emits a helper
function which invokes all of the children first, followed by
invoking the shader snippet passing along all the child outputs.
This gives us some of that Ganesh-like tree structure when
it's needed, but simple flat code when it's not.
Change-Id: I85e42f0794872c9f378ec63581364e0ed55f6047
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558308
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
These changes reduce failing targets for skia_unittest when adding
"//build/config/compiler:prevent_unsafe_narrowing" to component("skia")
from 588 to 484 on my local Mac build.
Bug: chromium:1292951
Change-Id: Ice8210e1a2f038feb84184c88e6a34f52168952f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552376
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
We are going to need to treat shaders with children differently than
those without; when children exist, we will need to add a helper
function to the preamble allow all the children to be invoked. This CL
prepares for this change by adding a new
`GenerateDefaultGlueCodeWithChildren` function. At present, it doesn't
change much; it just restructures existing code and updates the
existing snippets to call the new function.
Change-Id: Iae40df25eb1ba82e2e0568bceef5d57994e1deb4
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558547
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This ended up not adding value, so cleaning it up.
Change-Id: Ice06874ea786b5b7839441e8339f091474acff34
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558643
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This add 2 hooks for SkColorFilters:
adds SkColorFilter ref to PaintParams
adds addToKey virtual to SkColorFilterBase
Bug: b/238755762
Change-Id: I6ad1d4407763fe9516bdf4e4531466c570092148
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558307
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Lets use this to test special behavior that's normally gated behind
SK_BUILD_FOR_ANDROID_FRAMEWORK (or preferably: feature flags that are
only enabled in the framework).
Change-Id: If272ed118d712dc1a49b6e2fc9660f86566e2220
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557576
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Restore the old behavior behind a flag, so it can be maintained in the
Android framework.
This reverts commit f1660bf1ba.
Bug: b/231400686
Change-Id: I01fadaed52eecc42416deb2307d03499bca85a4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557391
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Bug: b/238755762
Change-Id: I033fe66dd37d84dd747f9c8608d887798dfccd76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557900
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Because the viewer's device matrix supports higher dpi, the
GM_slug view asserts because there is no padding to support
bi-lerp glyph drawing. Always turn on bi-lerp atlas padding
in viewer.
Change-Id: I34dc29f5097a28aab272efc59cfc6bcde2400f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558641
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: Id28311d2a7de96edbc8bcd7fa6eadb66223e5278
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558438
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
I introduced a bug in http://review.skia.org/558157. We would lose
track of the `entryIndex` value during nested calls to
`emit_child_glue_code`. The generated SkSL contained unnecessary work
and sometimes produced incorrect results. This could be reproduced in
test cases that intentionally introduced very deep nesting, such as
`localmatrixshader_nested`.
Change-Id: I6402498439f0ab944ac138cd467f18c64b5deaf3
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558548
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:11301
Change-Id: Ib644235ef35f9fb37a1373ada6a6896005dc4451
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558537
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This fuzz creates a blur that has w = 1 and h = 2^31 - epsilon.
And a filter sigma of 360. This causes the intermediate
buffer size > 2^31. This causes the multiply in the following
code SkMaskBlurFilter.cpp:1023:
tmpStart + tmpW * tmpH
to overflow. Because tmpW = source height, which is near 2^31,
and tmpH is about 3*360.
Cause the blur to fail if the intermediate buffer is > INT_MAX.
Bug: oss-fuzz:49061
Change-Id: I4f9f6bbe76cd71da1ac86562771ca393852452c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558305
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: Ic1fe443197fd7ed0c46f01330f125102ed5359c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558310
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>