Cq-Include-Trybots: luci.chromium.try:linux_chromium_cfi_rel_ng
Bug: chromium:1137652, chromium:1137958
Change-Id: I8575b588f9a1ba89740b95382b2462338e34bec5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326478
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Instead of creating internal msaa VkImages for vulkan render targets we
now get a GrMSAAAttachment from the resource provider to use instead.
As of now only one GrVkRenderTarget can hold a ref to an msaa attachment
at a time.
Bug: skia:10830
Change-Id: I361a1687f10e047a5b61228f861326f2b1418f06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320272
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Cut & paste with some reorganization of includes & forward-decls.
Next up is GrContextPriv.
Change-Id: I72d2d95c62692e3b37608517b796c0041ffedea3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326157
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This allows us to clamp the X and Y axis at the same time.
This is a partial reland of http://review.skia.org/318436.
Change-Id: I711076e434d10d4d83593922ec31f0a75a300f9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324126
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Was more of a demo than a test. Complicates coming refactor to move
SkImage creation for this test into LazyYUVImage.
Bug: skia:10632
Change-Id: I6e2303acdd38724417bb51d11aca29c100a6f3ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326356
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 7563a48787.
Reason for revert: safe to reland once cc_unittest is suppressed: https://chromium-review.googlesource.com/c/chromium/src/+/2464093
Original change's description:
> Revert "SkDevice::drawSpecial accepts arbitrary matrix v2"
>
> This reverts commit 7c4aca04cc.
>
> Reason for revert: cc unit tests need to be rebased
>
> Original change's description:
> > SkDevice::drawSpecial accepts arbitrary matrix v2
> >
> > This opens up the door to render image filter results with an arbitrary
> > matrix, so we can skip the matrix filter DAG hack. It should also let
> > me simplify the handling of backdrop image filters and correctly apply
> > perspective to image filters.
> >
> > This is essentially the same as
> > https://skia-review.googlesource.com/c/skia/+/317862
> > but not parented to the CL that experimented with SkImagePaint.
> >
> > Some of the function declaration re-org that was done in its prior CL
> > has been directly integrated into this CL.
> >
> > Bug: skia:9545
> > Change-Id: Iad882bd306f3a4064fe60cfc0526226287ea7e29
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323597
> > Commit-Queue: Mike Klein <mtklein@google.com>
> > Reviewed-by: Mike Klein <mtklein@google.com>
>
> TBR=mtklein@google.com,robertphillips@google.com,reed@google.com,michaelludwig@google.com
>
> Change-Id: I6a248fe9e02d71fa340ed3227e77fff097b7b08e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:9545
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324704
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=mtklein@google.com,robertphillips@google.com,reed@google.com,michaelludwig@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:9545
Change-Id: I5784b3b49f9e3a32a52782fe683b8f85aaa6b88a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325856
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This fixes up a handful of places which weren't caught in the initial
work (at http://review.skia.org/325861) because they haven't been
converted to the new IRNode structure yet.
Change-Id: I86b61fe3c601711b5802fe35218ca2e6378634da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326357
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is a reland of b3c42efd25
with a few more signed/unsigned mismatches fixed up.
Original change's description:
> pack SkTArray
>
> Same idea as http://review.skia.org/325857; I just wanted to feel out
> the options myself. A couple key ideas:
>
> Prefer SkTo32() to separate range assertions and casts.
>
> Keep using int indices, counting to this->count() where
> fCount would have warned about signed/unsigned mismatch.
>
> I've kept new comments and assertions to minimum. In the end we won't
> change the max size of SkTArray, and I don't see much need to call out
> how much it hasn't changed. Reading back over the accumulated changes,
> I don't really see much that's newly error-prone.
>
> Change-Id: I86a8a161b9ae44f24fc25093741945b75fbfa770
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326106
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: I04d928ecc185fb5c7b9d32f60e94df9f8d137898
Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Debug-Vulkan,Build-Win-MSVC-x86-Debug
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326297
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: I40ceb5cab0473c08c92fbb6aa9afad6173c0fb37
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325624
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This will help us avoid allocations for arrays of statements.
Currently, this is a wash in Nanobench (~0% change). In the near
future, we expect to collapse the expression array and statement array
into a single hybrid array, and this helps bring us closer to that end
goal.
Change-Id: Id146907352799c41b568090ab65e454247b294c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325625
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This lets us declare it correctly depending on caps, rather than editing
the modifiers of a (shared) global variable.
Change-Id: Ifcdc5e0a8e9b852685ee03a46b537b986b5d35de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325623
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Cut & paste job, but I did replace some cases of just calling
inherited implementations with using-statements. There are
other methods on this class that are using-statements and
that pattern is cleaner.
Change-Id: Ie369c643e44bdb8f82dfffcf45c1f65d48606899
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
This reverts commit b3c42efd25.
Reason for revert: Build-Win-MSVC-x86_64-Debug-Vulkan
Original change's description:
> pack SkTArray
>
> Same idea as http://review.skia.org/325857; I just wanted to feel out
> the options myself. A couple key ideas:
>
> Prefer SkTo32() to separate range assertions and casts.
>
> Keep using int indices, counting to this->count() where
> fCount would have warned about signed/unsigned mismatch.
>
> I've kept new comments and assertions to minimum. In the end we won't
> change the max size of SkTArray, and I don't see much need to call out
> how much it hasn't changed. Reading back over the accumulated changes,
> I don't really see much that's newly error-prone.
>
> Change-Id: I86a8a161b9ae44f24fc25093741945b75fbfa770
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326106
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
TBR=mtklein@google.com,johnstiles@google.com
Change-Id: I8267a05e1ce075bfa7893c60f7c77dbf4f8cf061
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326296
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This will help us avoid allocations for simple expressions.
Nanobench shows ~5% improvement with an array size of 2:
http://screen/8oDEY7hjrhY8C6k
Other array sizes will show different levels of improvement, but I
haven't done an exhaustive trial. (2 was noticeably better than 1.)
Change-Id: I005a7896a0db83df4e3c2d3c0fa3321203f8a0b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325861
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
These don't return reliable portable results, so I don't want to promote
them as good ideas to use. You can get at least 5 different results
from these across the four main architectures we support, and they've
been the root cause of bugs uncovered only in production on undertested
platforms.
Luckily, unused outside of tests.
Change-Id: I532731fe4cddf127253341e5ace8d9c5c9ebb0f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326108
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Same idea as http://review.skia.org/325857; I just wanted to feel out
the options myself. A couple key ideas:
Prefer SkTo32() to separate range assertions and casts.
Keep using int indices, counting to this->count() where
fCount would have warned about signed/unsigned mismatch.
I've kept new comments and assertions to minimum. In the end we won't
change the max size of SkTArray, and I don't see much need to call out
how much it hasn't changed. Reading back over the accumulated changes,
I don't really see much that's newly error-prone.
Change-Id: I86a8a161b9ae44f24fc25093741945b75fbfa770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326106
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This reverts commit d34d56e279.
Reason for revert: Pinpoint
This is not a pure rollback (we keep the early-out checks for
fInlineThreshold to avoid breaking tests).
Original change's description:
> Clean up SkSL inliner and allow it to be disabled.
>
> - When fInlineThreshold is zero, the inliner doesn't need to run at all.
> - Inlining functionality outside of `analyze` can be made private now;
> it's not referenced by the IRGenerator any more.
>
> Change-Id: If61fd8998bc024201bf4489b7aa48ac4d117e449
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325617
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I288d82273abfc2587859cc92d5a4c663694c38a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325621
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Adds vec[N], mat[N], and mat[NxM] aliases when building runtime effect
code. Also moves the "shader" alias for fragmentProcessor so it's only
usable in that context.
Bug: skia:10679
Change-Id: Ia337bb680c50da32639bb1d4ffc3bc01df306b0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325620
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
As a prelude to going back to sharing global data (safely), we want to
eliminate as much mutation of shared state as possible. The special
cases for global variable declaration were unnecessary, so just remove
them. The editing of main's parameters immediately after they were
created is also unnecessary - just hoist the logic up so we create the
variables correctly in the first place.
There is still one use, related to invocation ID. That's more
complicated (?), so leaving it as a separate CL.
Change-Id: Ia3dad78dd5a634273b2e2239368be7adaff65f38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325661
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
This function was originally responsible for about ~1% of compilation
time, almost entirely due to unnecessary vector allocation. The call to
`coercibleTypes` was copying the result every time due to a missing &,
and the `outParameterTypes` vector was not calling reserve before being
populated. Additionally, converted the out-parameter array to an
SkSTArray so that in the common case, we should not need to allocate at
all.
Change-Id: Iad085cf4ebc61d1ae1a92cc5f214272580ab0959
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325862
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
0f55e3e5d2..df6b7298bb
2020-10-13 cclao@google.com Vulkan: Use StoreOp_None_QCOM for read only depth stencil buffer
2020-10-13 cclao@google.com Vulkan: Expand PackedAttachmentOpsDesc from uint16_t to two uint16_ts
2020-10-12 cclao@google.com Vulkan: TexSubImage3D using PBO should use correct layerCount
2020-10-12 jmadill@chromium.org Test Runner: Pass batch ID to child processes.
2020-10-12 cnorthrop@google.com FrameCapture: Move compressed texture cache to shared location
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 robertphillips@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: robertphillips@google.com
Test: Test: Asphalt 8 MECTest: Test: https://chromium-swarm.appspot.com/task?id=4f2b87c4f8234910
Change-Id: I0f889934b7b533fbc92d8b49c0afed1c12627a98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325895
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bug: skia:10419
Change-Id: I1544113b6ea2327674a48a0430146a859a547723
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322796
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:10205
Change-Id: I4dfb5b69009a41cf44ae1a2a06b71c067071a964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325665
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 21f8b51099.
Reason for revert: D3D traced resource assert from unit test
Original change's description:
> Revert "Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers.""
>
> This reverts commit f625e4ce45.
>
> Change-Id: Id73c53ec7ab8d4a5951712dc150d86e6349addbf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325658
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
# Not skipping CQ checks because this is a reland.
Change-Id: I407f1d522d5c4f28d070cc2ce87af7faffca11fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325860
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Declaring max_vertices before invocations fails to adjust max_vertices
when invocation support is not present. (It should be 4, not 2 in this
case).
Bug: skia:10827
Change-Id: Ief7af97eabf5414ea8363808fc1ad2e9c480fe10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325664
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: Idb10db5cc4fff4f10ce84c5ae021e4c0e7bfc49b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325662
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:10205
Change-Id: I9d9ead1d40c34cd31ce0235e773de20f36f93e32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325816
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:10205
Change-Id: I635936d3c0e9bcd1dfe825cbc1f1f67930370d10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325836
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The original SkIRect* crop rect argument was a little too onerous.
First, as a pointer, it required you to declare your crop rect separately
just to take a pointer to it. Now, you can pass an SkIRect or SkRect in
directly when you are explicitly constructing a cropped filter.
Second, the crop rect is transformed by the same matrix as the other
filter parameters, so it can be scaled and translated. Allowing SkRect
instead of just SkIRect gives more precision and flexibility for local
coordinate systems. Now a crop rect could be defined to be from [-.5, .5]
and still map to real pixels after transformation (this was a request
from the skia-discuss mailing list, and also better matches the SVG spec).
The crop rect argument was always meant to be a convenience, since I
plan to refactor cropping into an indenendent image filter that will
give more explicit control over when the crop is applied in the DAG.
To maintain the convenience for the factories, the constructors of
the new CropRect type are not explicit so that callers don't ever need
to concern themselves with it.
Bug: skia:9296
Change-Id: I29a684cb925f1fca4dabc803114ab2b125660aaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324622
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This basically adds the functionality to GrResourceProvider to handle
scrate MSAA attachments. There are not current users of this, but
users will be added in follow on changes.
Bug: skia:10727
Change-Id: Ieb8d247e034fb22ac9ff4fc549935310329a1c1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320267
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Just a little refactor no-op.
Change-Id: I1842a0190cd96c60da2fe3c7f88fa56c9f73af81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325681
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Previously we didn't have the format in the key since this was only used
for stencil which we always pick the same format for.
Bug: skia:10727
Change-Id: I3744846eb74d6b9a66990747cf17f6e881fc6eac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324708
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
The crop rect was already applied for output bounds / forward filter
bounds. However, it also is applied to the output of filterImage so it's
also a constraint on the target output that's passed through the filter
dag during an input/reverse bounds query.
When there aren't other content hints provided, the device clip bounds
used as the target can be much bigger than the crop rect, so this will
help reduce layer size for a filtered layer.
Once cropping is handled as its own image filter, this will happen
naturally as part of the crop filter's input/output bounds implementation.
Bug: skia:9296
Change-Id: I662b3d083e6797d426a5f7bb9d69454dda737184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323676
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Rewrite map() to allow any number of arguments,
now also used for 2-argument (pow) and 3-argument (fma) operations.
I left a note about fma()... I can't understand why, but calling as
map(fmaf, x,y,z) ends up with scalar calls to fmaf(), but with the
lambda indirection we see perfect vector codegen.
I had to break map() back into two parts. I don't see any way to pass
both a variadic number of arguments and play our trick with the default
std::index_sequence parameter. The lane lambda similarly exists only to
split up the expansion of the Rest... type pack from the I... index
pack; you can't use two pack expansions in the same expression.
Change-Id: Ia156a7fd846237f687d6018a7f95550c9fd4a56d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325736
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>