This will allow us to use a single FBO for
EXT_multisampled_render_to_texture, that we modify on-demand depending
on whether we need MSAA.
Bug: chromium:1222095
Change-Id: Ife2d743e28833521d785e4bf0e20de593c492a9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442736
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: If3e838f22f1b99fd7a3b1c6bca0affd39f5573b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449843
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Change-Id: I0d924a2bce1f1a90b2603c593b786bb1610e3d04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449597
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This will allow us to use AutoSymbolTable in more places (and helps cut
down IRGenerator, as we transition away from it).
Change-Id: Ie88c149e0f7eee080a8a4c8cbbc34c8a2a5401d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449756
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit ae59426ea6.
Bug: skia:12182
Change-Id: I591a0a89ffad1a3d5d867dd247ceeec71b6041a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449516
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: chromium:1203327
Change-Id: I36de6f9ad0bba04854911cf8d060b7a754e116f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449058
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
We're being stricter in V2 wrt this. This CL is an experiment to see if this fallback is actually relied on.
If this sticks we can unify the two (SFC & SDC) code paths in makeSFCFromBackendTexture.
Change-Id: I77815e0aa63d0910d8f8f38ec1f047b83750e109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449678
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: I334cdeb75db1a80a35d333faa26aec4999bd6bb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449677
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
As of http://review.skia.org/449518 we no longer allow matrix
constructors containing vectors that spill across multiple columns; it
doesn't reliably work on all GPUs. The tessellator needed a small fixup
to support this new limitation.
Change-Id: I82853b6c8ae83597aab3eab611dd10072d23eca5
Bug: skia:12443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449836
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
The existing define wasn't being used to compile :skia
(but it is for building the fuzzer code).
After this lands, oss-fuzz will be updated to set that
flag too. https://github.com/google/oss-fuzz/pull/6462
The change to SkTypes.h is to remove bit-rotted code that
prevents oss-fuzz from working.
Change-Id: I95b48d76dd3878d04ba3a5d021359ca200c20a0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449576
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This will allow the code to be reused outside of the Inliner.
Change-Id: I9e68a12d14143add6a5a24f408a645af20d4e2b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449193
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
The GLSL spec allows matrix constructors containing vectors that would
split between multiple columns of the matrix. However, in practice, this
does not actually work well on a lot of GPUs!
- "cast not allowed", "internal error":
Tegra 3
Quadro P400
GTX 660
GTX 960
- Compiles, but generates wrong result:
RadeonR9M470X
RadeonHD7770
Since this isn't a pattern we expect to see in user code, we now report
it as an error at compile time. mat2(vec4) is treated as an exceptional
case and still allowed.
Change-Id: Id6925984a2d1ec948aec4defcc790a197a96cf86
Bug: skia:12443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449518
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
It now lives in the Compiler instead of the Inliner, and we have a
pointer to it inside the Context. I also took the opportunity to remove
a few unnecessary #includes from Context and fixed up the fallout from
this.
POTENTIALLY IMPORTANT FOOTNOTE: DSLWriter has its own Mangler object
inside of it. I experimented with removing this and having it share the
Mangler object inside the Context, but this caused failures in
"testThreading" and "testpersistentcache" CQ bots; the Expected and
Actual images would mismatch. (The Expected would be missing some
draws.) This particularly affected some blur-related tests which are
likely to be GaussianConvolution--i.e. it uses DSL.
This might be a canary in the coalmine for some quirky DSL threading
issue? e.g. using the same Context on two threads at once?
Change-Id: I2290b810d9487c40a3dbef119c95d1572b14a5ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449357
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Not a big deal from a performance standpoint, but it's still unnecessary
work that produces uglier code.
Change-Id: Id0153fffe0bac7275f8d2b0d68fb6977de5f9e8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449676
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Bug 36932:
Adds a lower limit when fuzzing dash path effects, since it can produce
paths with > 140k verbs. While this is not that much memory on its own,
the triangulating path renderer can require 3+GB to complete its work
(although it doesn't actually fail).
Bug 36945, 37042:
Also has PathToTriangles check for finite paths before starting any
triangulation work. These paths were created with infinities and NaNs.
Normally such a path would be rejected at a higher level in SkCanvas.
Since the triangulator is being fuzzed directly, this emulates this.
It's included in GrTriangulator and not the fuzzer's main function
because it's a cheap test and theoretically we could encounter a path
that was built lower down (e.g. dashing or transformed to device space)
that then overflowed.
Bug: oss-fuzz:36923, oss-fuzz:36945, oss-fuzz:37042
Change-Id: If97212bf410f771b42cebaedb5733af1abbfc4b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449520
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
DSLParser is #ifdef'ed out, so this doesn't currently impact anything,
but is necessary to be able to reenable the DSLParser.
Change-Id: I76d48b1b855f42ba3bc8b0734199af6e2a88becb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449517
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:11837
Change-Id: Iaa0349749a5d79d7915fb37ef1b30b46f0aa58d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448796
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is more lightweight than String and avoids a handful of copies.
Change-Id: Iad72a1b1027877f41bab10eeeaa340f2823a0896
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449359
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>
Derivative tests don't really make intuitive sense in a 1x1 surface.
This should give the derivatives a better workout.
Change-Id: I09e5ff2b7815d42d1874e5deef360e9bc2e83aff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449195
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This reverts commit efb7ae16dd.
Reason for revert: Excluding all non-linux tests
Original change's description:
> Revert "The very first version of a new SkText API."
>
> This reverts commit 8a20cea604.
>
> Reason for revert: Breaking some tests
>
> Original change's description:
> > The very first version of a new SkText API.
> >
> > SkText public API added.
> > Interface.h updated.
> >
> > Change-Id: I82a87f33e6cf1394fa2520387f6895d33601376e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442003
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: I879b198bc6fb44c46d11d967118f8d69eb74fee0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449296
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: Ieb65b45532d8c7455f091cf7a9e21fa7dea47606
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449297
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This reverts commit 8a20cea604.
Reason for revert: Breaking some tests
Original change's description:
> The very first version of a new SkText API.
>
> SkText public API added.
> Interface.h updated.
>
> Change-Id: I82a87f33e6cf1394fa2520387f6895d33601376e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442003
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: I879b198bc6fb44c46d11d967118f8d69eb74fee0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449296
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
If a command list failed to submit, it was remaining the current
command list, which put things in an invalid state. This CL
sets things back to something reasonable.
Bug: skia:12359
Change-Id: Ia64d993925999b69eded790358ee0d922bc45bcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448377
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Resolves appear to be very slow on non-tiled desktop GPUs.
Bug: skia:12447
Change-Id: Ic6fcad667c63cac764fe0ee3d3797159df45d27a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449176
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Not a big deal necessarily, but considering using this logic in GLSL as
well, and I'm less confident that your average GLSL ES driver will
optimize away the separate array loads.
Change-Id: I6a9f0d18c0fac138f64ad6426670f615e17f3492
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449099
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>
Bug: skia:12414
Change-Id: I5910239cab20e088367cbb9ededb3211b8b5f3b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449177
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
The fuzzer discovered that it could overflow the program-size value.
Rewrote the logic to use SkSafeMath everywhere, and to early-exit as
soon as a statement manages to exceed the program size.
Change-Id: I01511b2201173c95ebc1ac602901410ac9d74d73
Bug: oss-fuzz:38697
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449098
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Adjusted default caps in skslc to be consistent with runtime behavior,
and added optional settings mode to enable the feature. Tests for both
scenarios. (The error test crashed prior to the fix).
Bug: oss-fuzz:38726
Change-Id: I5270d4837ac982085d7baf5abd4b361f7bfb8562
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449062
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 7e33d95f4f.
Reason for revert: Breaking QuadroP400 Direct3D bots.
Original change's description:
> Direct3D: Be sure to set correct heaps for current descriptor tables.
>
> When binding descriptor tables, their associated heaps need to be bound
> as well. Previously we would bind those heaps when allocating from them.
> However, if we re-use a descriptor table later, its heap may no longer
> be bound. So we need to be sure to bind heaps for the current set.
>
> To avoid unnecessary refs, rather than store a
> sk_sp<GrD3DDescriptorTableManager::Heap> in each descriptor table, we
> only store its ID3D12DescriptorHeap pointer. The Heap only needs to be
> added to the command list once, when it is first used to allocate for
> the current submit.
>
> Bug: skia:12359
> Change-Id: I70018368e4f08bf7757969b9e878b0ff42059486
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448836
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12359
Change-Id: Icc7ab446c674e51e51d000717562dfb40c5a46d6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449063
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:11837
Change-Id: If0bfb3009693b203b2080a1d43cc3b1865c3ab9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448274
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is a reland of db38ad7b14
Original change's description:
> Fixed DSL assertion error on source files containing nulls
>
> The assertion was there to make sure we weren't running off the end of
> the source, but naturally fails in the presence of legitimate embedded
> nulls.
>
> Change-Id: I3b80499e9b182c9ea046c479f35d7a965d548401
> Bug: oss-fuzz:38107
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447182
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: oss-fuzz:38107
Change-Id: Idb1a6b7c64d2bb954edadae828d6de808158fd3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448660
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>