Trickiest bit is probably the override provider in kSampleExplicit?
Change-Id: Ib0ada157825c844ff4b7b43efac9f27f3552f3d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297775
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I82592c5bb3c6fb7a0e61970d0a8980855c04ce50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297798
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Also allows internal creation of rectangle textures, only used by unit
tests currently.
Previously GrContext::createBackendTexture() would ignore the request
for RECTANGLE or EXTERNAL and always make 2D. Now it makes RECTANGLE if
supported and always fails for EXTERNAL.
Change-Id: Iafbb3f5acddb37bfb8d39740f2590177a07dae78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297472
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
In OOPR/DDL mode, images wrapping backend textures must be able to exist past the end of the GM - residing in the DDL.
Change-Id: Icc78e407b45f91d3d47eebde2c316ff6bd962afb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297380
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This also adds a GPUTEST_FOR_D3D_CONTEXT macro to help with debugging
tests.
Change-Id: I72db01d148755c3bbbbb4d948d441a31dcf9482b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297717
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is enough to get the colorcube GM working on the CPU backend.
(It's not blazingly fast, but it works!)
Change-Id: Ic069861bab162ed49f876fd03af2cbaaec2da628
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297718
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The flippity GM doesn't create backend textures but it does perform some custom proxy creation (i.e., using MakeTextureProxyFromData to set the origin) that requires a direct context. This work must be done in onGpuSetup but doesn't entail any fancy lifetime management.
TBR=egdaniel@google.com
Change-Id: I258c0cb66746ca6853a4e228e10407671d7d55d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297697
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:10139
Change-Id: I18bd5c078c785bf7faa3e2e20e93efca082951ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297359
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:10403
Change-Id: I875b1a4bb7cacbe6721a69aa8ed02118b989729d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297596
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit ddca6ab54a.
Reason for revert: breaking abandoned context bot
Original change's description:
> Fix flippity GM for *ooprddl configs
>
> The flippity GM doesn't create backend textures but it does perform some custom proxy creation (i.e., using MakeTextureProxyFromData to set the origin) that requires a direct context. This work must be done in onGpuSetup but doesn't entail any fancy lifetime management.
>
> Change-Id: Ica4f4f7476778cdf934c3be9ef8c9a28d0d4ba2e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297445
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,robertphillips@google.com
Change-Id: Ie66a4187a5ff2efee21f60bb9c0d00e2aab3d1e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297696
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Previously, we were limiting our calls to appendVAList to 512-byte
chunks to avoid a potential buffer overflow. This had two problems:
1 - it did not avoid the buffer overflow :(
see chromium:1092743
2 - every call to appendVAList is expensive; it incurs a resize of the
code buffer (alloc new, memcpy, free old)
This CL removes the 512-byte cap as the buffer overflow issue was
resolved at http://review.skia.org/297276
This CL also includes a few more minor improvements.
- `codeAppendf` now uses a raw string so the gencode is easier to read.
- Optimized `SkStringPrintf("%s", foo)` to `SkString(foo)`.
- Optimized `strA = strB` to `strA.swap(strB)` where safe to do so.
Change-Id: Ia0909a68719848dd2ca655066a9bc6929c8fd09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297358
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The flippity GM doesn't create backend textures but it does perform some custom proxy creation (i.e., using MakeTextureProxyFromData to set the origin) that requires a direct context. This work must be done in onGpuSetup but doesn't entail any fancy lifetime management.
Change-Id: Ica4f4f7476778cdf934c3be9ef8c9a28d0d4ba2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297445
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Unit tests for SkString::appendVAList would have preemptively caught the
associated fuzzer failure.
Change-Id: I19a414e5e937f9e3fbe0f75e062b4befa6e2877b
Bug: chromium:1092743
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297473
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
fa3d64bf72..c81f0b7b92
2020-06-18 cnorthrop@google.com Tests: Update trace timestamps
2020-06-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from bfa95c7ad8b7 to 23498d296498 (1 revision)
2020-06-18 syoussefi@chromium.org Disable ES3 perf tests on Nvidia/windows7/Vulkan
2020-06-18 syoussefi@chromium.org Fix restricted_traces/.gitignore
2020-06-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from a7112d544b2e to 99651228b238 (2 revisions)
2020-06-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 763957e6b4fc to 7a1d99d0be42 (4 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 djsollen@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
Bug: chromium:1096510
Tbr: djsollen@google.com
Test: Test: angle_perftests --gtest_filter="*Trace*"
Change-Id: If2cfc7beb35bc2401e3edf149ddcbbec9ecdfb2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297616
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
nearest + repeat doesn't need to operate in unnorm coords.
Restores behavior previos to:
https://skia-review.googlesource.com/c/skia/+/297189y
Change-Id: Id78fb1a1526e0703ed17a3c46082209447cac2dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297464
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Another peephole where we're happy to trade a bit of interpreter
performance for less code size and easier translation to SkVM now.
Change-Id: I0de7962194fa4dbbc5d77f68831f1374333de9c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297536
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Also remove unused buffers. FPs no longer support reading from buffers.
Bug: skia:10139
Change-Id: Id1e2d7ef2cfa7f11a95cb0ce448c69af755c2b65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297176
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I44eab9976aa4820a74f9246f1244c1a293e1fff6
Bug: gn:175, gn:158
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297463
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
These were peephole optimizations that help the interpreter a bit, but
I'd like to favor code size and ease of translation to SkVM now.
We can now run: sample(child, p.yx) on the CPU backend, for example.
Change-Id: I90f2f649d95d5c4c50e470988590491e3b56ba34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297465
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
With the CPU backend, there is no GrContext on the canvas, so we were
sending errors to the default handler (SkDebugf + assert), so editing
shaders was impossible. Now they fail gracefully (and produce a popup
window with the message).
Change-Id: I29bad24f201be59ba1cec45f446a433c01cf86dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297461
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This will let the threshold_rt GM draw even if --skvm isn't forced.
I don't see any GM diffs beyond that.
PS3 expands the same basic idea just a little wider.
Change-Id: I714c0fd2d4e6814c307a189a9f004e8ed729819a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297419
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
I don't see us ever really saying dstCS == nullptr --> dstCS = sRGB.
It's too handy a feature to have a legacy dst.
Change-Id: I20576962eeb5a2ce7d0da09ffe1bbba860dad086
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297418
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This creates a funnel in the drawing manager (removeRenderTasks) that
opens the door for tighter integration between the two classes. Also we
add some assertions about the relationship and cut out duplicated code.
Bug: skia:10372
Change-Id: I0781ba7d45ac090cf7f6d430f0d56afe0f98b7e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297195
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Mostly plumbing and misc instructions to draw threshold_rt.
Backends differ in what we return when sampling alpha-only
images, so I've switched threshold_rt to use the .a channel,
which everyone agrees on.
I'm pretty confused about what CTM and local matrix to pass
to the child program() calls, so I've just passed no-ops.
Change-Id: I004b428b4e5e27f3963a27dea0ef44e1f57bc3e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297384
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a reland of c34344989a
Original change's description:
> Allow building with Wuffs v0.3, not just v0.2
>
> This is step 1 of a multi-step, multi-repository transition:
>
> 1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
> defaults to v0.3 but other repositories' defaults remain at v0.2.
> 2. Update users' Skia version (automatic if they update regularly).
> 3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
> 4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
> 5. Remove the option for Skia to work wih Wuffs v0.2.
>
> Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
Change-Id: Iafc4acf69c3d61d512ffde25cc7e405092e384c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296758
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Change-Id: I2523b79e6cf5654daba03aa837d05a76d8ca9f66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297189
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Cleaned up SkString formatting APIs for consistency and removed hard-to-
use macros. Added printVAList API for orthogonality with existing
(append|prepend)VAList methods. Optimized append/prepend methods to
use printf if appending/prepending to an empty string, a surprisingly
common case.
Change-Id: I6fbc6dc84ebb060ca452f582cb4f13a3c0f7f6ec
Bug: chromium:1092743
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297276
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:10139
Change-Id: Ie7e4cf0cd583c8cb6eafd7ab30b729ee755f5042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297060
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:10139
Change-Id: Ic306775bb8d1f5d8b29cc38c116d0f8c3e0d55a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297193
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
fChildren/fChildCount was replaced with fChildVector and Chromium
migrated to the new API a while back, it's now safe to remove the
older interface.
Bug: chromium:607777
Change-Id: I7311d3b51f1b71209dcc024ae51637536d560619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297260
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The general issue is that d3d returns a fragcoord with the "w" coord
is given as w. But gl, vulkan, and others get a 1/w. So skia assumes
a 1/w value here. Thus we must flip for d3d.
Change-Id: I4ff9fb363310c1ca52e631246413ab76322def54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297182
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This doesn't implement sampling of child shaders (that's going to be
nearly impossible in the interpreter). But it does plumb the information
about sample calls to the byte code, so that SkVM can attempt to
translate those calls into evaluation of child shaders.
Change-Id: I3762eb7a613e4377d482a50f2dc301075d89ce36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297192
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Recent ANGLE changes require BUILD.gn updates to make use of new
zlib functions as well as changes to SystemInfo that requires adding
new source dictionaries to our list of build sources.
Bug: skia:10391
Change-Id: I993a9f78e4585618ad4cd16b3bfc81874d7b5b17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297116
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Previously textures were sampled in clamp mode with
the wrapping ocurring in shader code.
Change-Id: Id4fcba6525e6c0664aa9fafb6c11a4bb62433c72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297059
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>