Most of the code generated by the fuzzer is nonsense, but there is a
method to its madness. The crash is only triggered under specific
conditions:
- The runtime effect has enough helper functions to mostly fill up the
call graph hash-map. It won't rehash until it gets close to capacity.
- There must be several calls to built-in functions, in order to add
elements to the call graph to force a rehash.
The fuzzer-generated code manages to satisfy both these requirements.
Change-Id: I9a1d7535557fedd4e9bfece3930ac86ede291ffe
Bug: oss-fuzz:36655
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437118
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We assumed that any time a function call was emitted, we could look up
the mangled function name in our function-name map and it would exist.
This was not true for self-recursive calls, as the function name is
only added to the map after the function is emitted.
We now use the `functionName()` accessor to retrieve the function name,
which will synthesize a mangled name and add it to the map if it is
missing.
(It looks like recursive calls will not actually work properly, though,
because `writeFunctionPrototype` doesn't emit any code, and the SkVM
compiler can't handle recursion at all.)
Change-Id: I021f5009709d9eed8306eb71cb7f42cbc4c29ae9
Bug: oss-fuzz:36655
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437117
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
GLSL allows an array of `lowp float` to be compared against `highp
float` seamlessly because the types are considered to be the same. SkSL,
however, treats these as different types, so we need to coerce the types
to allow this comparison to work.
In other words, these comparisons can cause an array to be implicitly
casted. The expression `myHalf2Array == float[2](a, b)` should be
allowed when narrowing conversions are enabled. To allow this to work,
we need a dedicated IR node representing this type coercion.
We now allow implicit coercion of array types when the array's component
types would be implicitly coercible, and have a new IR node representing
that implicit conversion.
This CL fixes array comparisons, but array assignment needs additional
fixes. It currently results in:
"type mismatch: '=' cannot operate on (types)".
Bug: skia:12248
Change-Id: I99062486c081f748f65be4b36a3a52e95b559812
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436571
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
CMake is the only build system which ensures all the referenced headers
actually exist. In the last HarfBuzz roll a header file was removed
because support for an old table was dropped but the header was not
removed from the BUILD.gn file. Remove the file from the build since it
no longer exists.
Change-Id: I3093e215cfa001534247208787a365db73629f2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437196
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
3a74ee5282..368e957887
Additionally adds a build option that switches to the new
harfbuzz subsetting api which is coming in the next version
of harfbuzz.
Change-Id: I924a7b4978412d636d4c8d19f5c6021ea3c73d21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433737
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The implementation of skgpu::v2::Device::surfaceFillContext() was
recently removed, also remove its declaration to revent link time
errors.
Change-Id: I2c2d7673e9bb824d79c47c4e00423c63228c9161
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437120
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
GPURenderPipelineDescriptor2 is a typedef of GPURenderPipelineDescriptor
in Dawn, so this change does not affect functionality. It will allow
Dawn to remove the deprecated type.
Bug: dawn:751
Change-Id: Id345f7feb92b4b4ec9d558acbca0d37e76b4c81f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437076
Reviewed-by: John Stiles <johnstiles@google.com>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: John Stiles <johnstiles@google.com>
A path effect is allowed to modify the stroke, which may affect whether
or not the final path is hairline or not. Handle this similarly to
SkPaint::getFillPath by taking an out parameter which states if the path
is hairline (should be zero stroked) or is an actual fill path.
This simplifies the internal handling of hairlines in SkScalerContext as
well as making the result more in line with the way hairlines are
handled elsewhere. It should also make the removal of
SkPaint::kStrokeAndFill_Style simpler.
Change-Id: I8ae8e3d6ee8a9f686f983cbcf723925b11c4a707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437020
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
We were performing lookups in fCallGraph using `operator[]` while
looping through fCallGraph via range-based for. `operator[]` will add
entries to the map if the key is not found. This happens if built-in
functions are called, such as `sin`, `cos`, `tan`, etc; this mutates
the call graph mid-loop, which causes unpredictable behavior. In
practice, this can occasionally cause a rehash, which reorders the hash
map and causes items to be skipped over or checked twice.
This flaw meant that over many repeated runs, recursion was occasionally
not detected, and compiling a program with recursion would succeed a
small percentage of the time. The PipelineStageCodeGenerator asserts and
then crashes when presented with such a program.
The fCallGraph is now held as a const pointer, which makes it
impossible to mutate, and lookups are done via .find() which are
non-mutating. Compiling the fuzzer-generated program 10,000 times now
succeeds.
Change-Id: I6915fcfa4a0b1e9f86e5eb4ffd053bc718aed9fb
Bug: oss-fuzz:36655
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437096
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
The optimization logic for swizzling a constructor assumed that every
argument to the constructor was a scalar or vector. When it was written,
this assumption was true. However, we recently added support for casting
mat2x2 to float4 which violates the assumption.
We now check every argument and do not attempt to optimize if a
non-scalar, non-vector arg is found.
Change-Id: Ia2b297bd62dfdf4af56712164fbc80c29c9611eb
Bug: oss-fuzz:36852
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437017
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Update Wuffs to match the version currently used by Chromium
(updated in http://crrev.com/c/3041153)
Change-Id: Id8d74dacef69d27bce48e470b5de42ea277b61d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436717
Auto-Submit: Nigel Tao <nigeltao@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Bug: skia:11837
Change-Id: Id7aa117af3e026d71caeed3ee6489394e869eed1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436568
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I0e093fd35b11e9a765ef9c09f3b6346086ff66bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435983
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
No functional change, just code simplification.
Change-Id: Ie67d515195c462a57954256f045797c3a906d6a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435877
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
OSSFuzz discovered a minor variation of oss-fuzz:36770 which tickled a
different bug in SPIR-V RTFlip handling; we did not properly handle the
case where the InterfaceBlock is an array. SPIR-V does not support this
at all, but the IRGenerator allows it, and we don't detect it an an
error until later in the compilation process.
Change-Id: I80bd67a13dad878717dc122462132a2ed675532d
Bug: oss-fuzz:36850
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437018
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Not having this available on GrContextThreadSafeProxy was an oversight.
This will allow Chrome to correctly prepare the correct type of compressed promise image.
Change-Id: I3002609fef00a130fe409f318ae0f442ef7591d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437016
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
Change-Id: Ic582c59b9f7dfee2d7e90e50bfb36c57e958c673
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436641
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
FWIW, our PowerVRGE8320 reports that it has integer shader support.
Bug: b/195281495
Change-Id: Ie969d8e978404a5b8963bb5c71dedfa8945b2a2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436563
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
These objects are ~48 bytes apiece.
(Added bsalomon@ for public API review)
Change-Id: I41207929ec2c33caaf877d8530ad7c89b24b63cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436823
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
(Added bsalomon@ for public API review)
Change-Id: Id0e7f656d68f2c7bec2c38ca7ccc8c6bb49e7e91
Bug: skia:12248
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436570
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Fix a number of warnings as errors about unused private methods when
skia_use_gl is set to false and SK_GL is not set.
Change-Id: Idcc08a1434ec11a6ce9c8df034c9fa472bf08d08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436822
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This is a reland of 03b7935068
Original change's description:
> Reland "Enable the atlas path renderer for GrAAType::kCoverage"
>
> This is a reland of 8cd8e27c2c
>
> Original change's description:
> > Enable the atlas path renderer for GrAAType::kCoverage
> >
> > This will definitely cause regressions on a whole slew of benchmarks
> > that were carelessly regurgitating cached bitmaps until the system
> > memory was blown. But the well defined memory limits of the atlas and
> > resilience to animation are worth it. If a client still wants this
> > type of caching they can always render their own bitmaps using Skia
> > and cache them.
> >
> > Bug: chromium:928984
> > Bug: skia:12258
> > Change-Id: I277f50cb9192f1cf5fe8d4b7f629abe72432150a
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433917
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> Bug: chromium:928984
> Bug: skia:12258
> Change-Id: I59d7b0684b7569d62939b6a8035fa6e92f4c02f3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436356
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: chromium:928984
Bug: skia:12258
Change-Id: I5259e86692e66f52795dde0da1a84c062c223b96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436860
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 68587ae274.
Reason for revert: breaking path clipping tests in Android?
Original change's description:
> Add SkClipStack::replaceClip() separate from deprecated clip op
>
> The replaceClip functionality was added to allow Android to move off of
> generalized expanding clips. At the time, SkClipStack simply used the
> kReplace_SkClipOp to handle it. In order to remove those expanding ops,
> SkClipStack will need a proper implementation of replaceClip().
>
> The clip elements have an additional field to mark if
> it's a replace (and it's op will be kIntersect). Adds a temporary
> getRegionOp() function to unify elements that use this field vs.
> elements that use the deprecated clip op (i.e. if they were deserialized
> from an SKP that recorded an expanding op).
>
> Clients of SkClipOp that checked for replace ops use the new function
> instead of referring to the enum value directly.
>
> Bug: skia:10209
> Change-Id: I1c16c87fadb2becfe181db717c05e240ac87fd34
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436158
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: If3f99a7d2f2df99c2b99d431d494ca28da66b1d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10209
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436956
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This reverts commit d1c51b2572.
Reason for revert: blocking revert that might be breaking android
Original change's description:
> Avoid expanding clip ops in tests that will remain after feature removal
>
> Bug: skia:10208
> Change-Id: I4fb2c8181bfb8cac3c8ab95c833094c98f8ee6fc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436159
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Ib62cc03f99793f8f1cb0180145b7557101a23ead
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10208
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436957
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit 03b7935068.
Reason for revert: suspected of breaking some Android CTS tests
Original change's description:
> Reland "Enable the atlas path renderer for GrAAType::kCoverage"
>
> This is a reland of 8cd8e27c2c
>
> Original change's description:
> > Enable the atlas path renderer for GrAAType::kCoverage
> >
> > This will definitely cause regressions on a whole slew of benchmarks
> > that were carelessly regurgitating cached bitmaps until the system
> > memory was blown. But the well defined memory limits of the atlas and
> > resilience to animation are worth it. If a client still wants this
> > type of caching they can always render their own bitmaps using Skia
> > and cache them.
> >
> > Bug: chromium:928984
> > Bug: skia:12258
> > Change-Id: I277f50cb9192f1cf5fe8d4b7f629abe72432150a
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433917
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> Bug: chromium:928984
> Bug: skia:12258
> Change-Id: I59d7b0684b7569d62939b6a8035fa6e92f4c02f3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436356
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Id90ae67d90eff84f4085d2faa97976db5d9b73b7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:928984
Bug: skia:12258
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436817
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Swarming appears to have changed recently to fail loudly
if it cannot delete any files. This can happen for
our docker outputs (e.g. the /OUT/obj folder).
I am hopeful that in a Bazel world, we won't have
issues like this because of Bazel's ability to keep
things more hermetic.
Change-Id: I21d9138bc25b42794006322e1b8987787222d5da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436816
Reviewed-by: Eric Boren <borenet@google.com>
35bdaf8dc4..9da4e52b5b
2021-08-05 cnorthrop@google.com Tests: Add PUBG Mobile battle royale trace
2021-08-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 0b6b7ef9940d to 9177048d3b1a (237 revisions)
2021-08-04 ynovikov@chromium.org Roll googletest
2021-08-04 syoussefi@chromium.org Remove support for WEBGL_debug_shader_precision
2021-08-04 cnorthrop@google.com Tests: Add PUBG Mobile skydive trace
2021-08-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from b3e57670ca16 to 0b6b7ef9940d (588 revisions)
2021-08-04 syoussefi@chromium.org Reland "Reland "GL: Fix GPU detection""
2021-08-04 syoussefi@chromium.org GL: Remove the rewriteVectorScalarArithmetic workaround
2021-08-04 syoussefi@chromium.org Revert "Reland "GL: Fix GPU detection""
2021-08-04 ggabu423@gmail.com D3D11: Add validation for storages size in updateBufferStorage
2021-08-04 b.schade@samsung.com Vulkan: Add support for EXT_primitive_bounding_box
2021-08-04 jmadill@chromium.org Perf Bots: Upload proper build URL.
2021-08-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from dcfc0a6e2d84 to d4483095765e (2 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 nifong@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/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: nifong@google.com
Test: Test: angle_perftests --gtest_filter="*pubg_mobile_battle_royale"
Test: Test: angle_perftests --gtest_filter="*pubg_mobile_skydive"
Test: Test: dEQP-GLES31.functional.primitive_bounding_box.*
Change-Id: I9d05938551130e9ce41581c0784bf5b6d0083804
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436667
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This reverts commit ea17e2499d.
Reason for revert: blocking the android roll on a build failure
Original change's description:
> Reland "uniform Ptr (UPtr) is a sub class of Ptr"
>
> This is a reland of cef047a490
>
> Fix strides in SkVMTest to be the right size.
>
> Original change's description:
> > uniform Ptr (UPtr) is a sub class of Ptr
> >
> > A pointer for a Uniform (UPtr) is a sub type of a Ptr. Everywhere you
> > can use a Ptr a UPtr will work, but you can't use Ptr where you need
> > a UPtr. All the UPtr instructions uniformF, gather32, etc are expected
> > to be hoisted and therefore loaded only once. While the varyings
> > instructions like load32, etc. are expected to remain in the body
> > of the loop, and be evaluated each time through the loop.
> >
> > Change-Id: I4fe6458c2a4614872ed67cda1e81b05ea8a9e69e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436297
> > Commit-Queue: Herb Derby <herb@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> Change-Id: I858fa1224452ec801b6186fede353849edc895b5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436564
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=herb@google.com,brianosman@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: I0ffc93a04f5329838d422ad9e42aba09b9ba0064
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436639
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
used.
The current approach doesn't consider that there may be additional
stages between the VS and FS.
Bug: skia:12198
Change-Id: I62a802c91a76689e7c78b2e269b76c9bcd5ae5d2
Cq-Include-Trybots: luci.skia.skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436573
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This CL does not update the DSLParser to honor these precision
qualifiers; that will be done in a followup.
Change-Id: Ib629bc99c0e6c7afb550a381d4e3b6ccc26aa64e
Bug: skia:12248
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436337
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
These parse into new modifier bits; the IR generator does not yet
support these bits. That's coming in a followup CL.
Change-Id: I362e9227694f9b862eaad100f6afca45a9b62a01
Bug: skia:12248
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436336
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This is a reland of cef047a490
Fix strides in SkVMTest to be the right size.
Original change's description:
> uniform Ptr (UPtr) is a sub class of Ptr
>
> A pointer for a Uniform (UPtr) is a sub type of a Ptr. Everywhere you
> can use a Ptr a UPtr will work, but you can't use Ptr where you need
> a UPtr. All the UPtr instructions uniformF, gather32, etc are expected
> to be hoisted and therefore loaded only once. While the varyings
> instructions like load32, etc. are expected to remain in the body
> of the loop, and be evaluated each time through the loop.
>
> Change-Id: I4fe6458c2a4614872ed67cda1e81b05ea8a9e69e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436297
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I858fa1224452ec801b6186fede353849edc895b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436564
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I9772da0c0a61d5fdb3114cd836053275bfb359df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436156
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The only really interesting parts are:
src/gpu/SurfaceFillContext.*
src/gpu/v1/SurfaceFillContext.*
Everything else is mostly mechanical.
TBR=michaelludwig@google.com
Bug: skia:11837
Change-Id: Ia208e9a73d1529804c06d4f805d8ca3674851496
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436558
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:10208
Change-Id: I4fb2c8181bfb8cac3c8ab95c833094c98f8ee6fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436159
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This moves SkImageFilter's API closer to SkColorFilter's, and also
updates SkRecordDraw's PaintMayAffectTransparentBlack to be less
conservative.
Originally:
-canComputeFastBounds() handled aggregating behavior of the entire graph
but it's a public API
-affectsTransparentBlack() was the private virtual for a specific node
Now:
-affectsTransparentBlack() handles aggregating behavior of the graph and
is part of SkImageFilter_Base (mirroring SkColorFilter_Base).
-added onAffectsTransparentBlack() to clarify the per-node virtual that
they can override.
-canComputeFastBounds() simply returns !affectsTransparentBlack().
There are some usages in our code that I kept using canComputeFastBounds
(e.g. SkPaint's computefastBounds) because it kept naming consistent.
In other places I updated to use affectsTransparentBlack since I thought
that made it clearer why we were checking that behavior.
Bug: skia:12282
Change-Id: I7b58372c127b4d8d9097d6c0de64486e822d2342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436296
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
We don't currently support this. There's no explicit syntax to cast an
array's type, but it can be implicitly required in some situations, like
`halfArray == floatArray` (when fAllowNarrowingConversions is on).
Change-Id: I00fe0ddd4f2682b2950e828dd78bb941d5f0430e
Bug: skia:12248
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436560
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>