Commit Graph

3976 Commits

Author SHA1 Message Date
Hal Canary
02eefbeca9 header self-sufficiency and idempotency
Change-Id: I4ec74a358e11d85c6eaf1658efd6f1391ee5e387
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223930
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-06-26 19:12:43 +00:00
Chris Dalton
b3c9745911 Remove "nvpr" configs
The majority of our gm testing has been disabling nvpr, which doesn't
match our real-world behavior where we use nvpr whenever available.
This CL fixes the issue by completely removing the explicit nvpr
configs. Now if we have nvpr, you get it.

This CL also lowers the nvpr priority in the path renderer chain and
adds a "NonNVPR" job on Quadro where we can continue to test our
non-nvpr codepaths on NVIDIA.

Bug: skia:
Change-Id: I6a36f1101c8218adcaaf10cab25d2c28e70371f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223828
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-06-26 16:53:50 +00:00
Ravi Mistry
832623902b [skottie-wasm-perf] Catch and exit with error if browser does not open
Might as well do the same in lottie-web-perf.
Also mark as infra failures to distinguish from real failures.

NoTry: true
Bug: skia:9207
Change-Id: Id1f3cc5719094d0bf0179ea1a84529c6f376e356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223917
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-26 14:11:20 +00:00
Brian Salomon
d628747dfb Make GrColorSpaceInfo store GrColorType.
This is largely redundant with GrPixelConfig. However, we intend to
remove GrPixelConfig.

Bug: skia:7580

Change-Id: I03d92303be832711f7821f8a97d36387c9b04a9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222883
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-25 14:29:09 +00:00
Chris Dalton
a1638a527e Rename "preferredInternalSampleCount" to "internalMultisampleCount"
Bug: skia:
Change-Id: If6e0287b3d631f4f3856875d94c84d1ddea44f22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223279
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-06-24 19:40:12 +00:00
Ravi Mistry
137822513c [lottie-web-perf] Make similar to skottie-wasm-perf
* Take 25 evenly distributed sample points.
* Fix bug where goToAndStop was not seeking to a frame.
* Make sure it draws to 1000x1000.

NoTry: true
Bug: skia:9195
Change-Id: I73139e41542d22329bb9e3383059ac50011a9882
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223300
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-24 19:05:30 +00:00
Ravi Mistry
f52bce41f7 [skottie-wasm-perf] Make sure we are drawing to 1000x1000
NoTry: true
Bug: skia:9195
Change-Id: I7f5bf641dc69b618f2dfa27200b0e770d9e7ca80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223298
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-24 19:01:32 +00:00
Brian Salomon
e7499c7e8a GrColorSpaceInfo stores SkAlphaType.
This means GrSurfaceContext's know their alpha type.
All GrRenderTargetSurfaceContexts are kPremul.

Make GrTextureProducer store GrColorSpaceInfo.

Bug: skia:7580
Change-Id: I5ff321ef52c0edd32e5fac99dff95d44aa66f592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223184
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-24 17:48:01 +00:00
Mike Klein
2b7b2a2331 add bit_clear
I was just reading the ARM docs and realized that their BIC ("BIt
Clear") is the same as SSE's ANDN ("AND Not") instruction.  It's kind of
a neat little tool to have laying around... comes up more than you'd
think, and it's sometimes the clearest way to express what you're doing,
as in the changed program here where the comment is "mask away the low
bits".  That's a bit_clear with a mask for what you want to clear away!

And the real reason to write this up is that I want to have a CL to
point to that shows how to add an instruction top to bottom.

Change-Id: I99690ed9c1009427b3986955e7ae6264de4d215c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223120
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-06-24 16:31:15 +00:00
Emircan Uysaler
23ca4e7dc5 Enable creating protected vulkan backend
This CL allows user to indicate that they have a protected content in
GrVkBackendContext creation which results in protected CommandPool and Queue
usage.

Bug: skia:9016
Change-Id: I6a478d688b6988c2c5e5e98f18f58fb21f9d26ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210067
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Emircan Uysaler <emircan@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-24 16:04:00 +00:00
Chris Dalton
6ce447a4ec Eliminate mixed samples as an FBO type or AA type
From now on, sample counts always refer to the number of actual color
samples, and render targets don't have separate color and stencil
sample counts.

If mixed samples support is available when making a
"GrAAType::kCoverage" draw, then an op may attach and use a mixed
sampled stencil buffer internally. But this will all be invisible to
the client.

After this CL, we temporarily won't have a mode to use nvpr with mixed
samples. That will soon be fixed by a follow-on CL that enables nvpr
with mixed samples in the normal "gl" and "gles" configs.

Bug: skia:
Change-Id: I1cb8277f0d2d0d371f24bb9f39cd473ed5c5c83b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221878
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-06-24 04:08:45 +00:00
Herb Derby
9b06f2168d Add API for glyph image data
Move the invariants for glyph image data into SkGlyph.

Change-Id: I1958612bb73cfffe42df19a11c8899048559013b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222876
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-21 19:56:17 +00:00
Nathaniel Nifong
0426c38daa Reland "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This is a reland of 7635013ad1

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

Bug: 9176
Change-Id: Ifef1ff45ac0013ba3015f88c7ecd75527b28b604
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222505
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-06-21 15:49:21 +00:00
Jim Van Verth
87bda3dabe Fix Mac viewer on command line launch.
If you launch the Mac viewer from the command line, it will sit there
until you click on the thumbnail in the dock, and only then will bring
up the window. This fixes that so it will open the window immediately.

Change-Id: I5628dc6c59833f808a61dedde457774114dd0e94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222783
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-06-21 15:45:22 +00:00
Brian Salomon
384981be3d Revert "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This reverts commit 7635013ad1.

Reason for revert: breaking bots 

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=djsollen@google.com,mtklein@google.com,kjlubick@google.com,reed@google.com,nifong@google.com

Change-Id: Ie5e5dac46ba1beeb8de0a29c1a7be1264616fe92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222502
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-20 18:52:01 +00:00
Mike Klein
397fc88fc0 first VEX ymm vector ops
- 32x8 i32 add,sub,mul
   - add I32_Naive bench/test builder to get better i32 mul coverage
   - minor refactoring all over

Change-Id: I13cc19ff37a2da0bcff289ba51baac08f456d6c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222485
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-20 18:20:00 +00:00
Nathaniel Nifong
7635013ad1 Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-06-20 17:33:04 +00:00
Brian Salomon
f30b1c1bd5 Revert "Revert "Make SkASSERT not break build in constexpr GrSwizzle method on GCC""
This reverts commit 27239e456a.

Revert "Revert "Add function to GrDataUtils to handle color conversions.""

This reverts commit c34d993b62.

Change-Id: Iac1bdaa6f8380e63bbb87394e7fca96808572131
Bug: skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222039
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-20 16:56:15 +00:00
Ravi Mistry
b2ca0067a7 [lottie-web-perf] Add LottieWeb CPU and GPU bots
* Added support for LottieWeb bots in perf_skottiewasm_lottieweb.py
* Adds a LOTTIE_WEB_BLACKLIST for lottie files that crash lottie-web as described in https://bugs.chromium.org/p/skia/issues/detail?id=9187#c4

NoTry: true
Bug: skia:9187
Change-Id: I8dbf485e7162e027cb4c4db2bf8f8e9c3ec4d966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222157
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-20 16:49:13 +00:00
Robert Phillips
b520476ee6 Swap GrSurfaceProxy over to being held via sk_sp
This CL:
   replaces GrProxyRef with sk_sp
   streamlines GrIORefProxy to be more like SkRefCntBase (i.e., move the fTarget pointer to GrSurfaceProxy)

Change-Id: I17d515100bb2d9104eed64269bd3bf75c1ebbbb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221997
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-06-20 11:43:45 +00:00
Ravi Mistry
0233b1edf2 [lottie-web-perf] Use latest lottie-web version and use install location
NoTry: true
Bug: skia:9187
Change-Id: Id0a35b77e41c2b8ef8f3b0b61558c9d96db1c09a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222177
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-19 20:57:20 +00:00
Ravi Mistry
6ac3795ebf [lottie-web-perf] Command line application to measure perf
Uses puppeteer to bring up Chrome headless and then calls lottie-web-perf.html with endpoints for lottie.min.js and the target lottie file.

NoTry: true
Bug: skia:9187
Change-Id: Ic1f4c9fc1cd68b3f747e58bdbf1ea51387e5e139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221717
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-19 17:06:35 +00:00
Brian Osman
f0095cf86a Add option to use a program binary cache in DM, etc
Change-Id: I2117e41388962682a40f9db9ffc62150b30c7847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221779
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-19 00:00:11 +00:00
Brian Osman
064729e439 Implement program binary caching in ES2 (with GL_OES_get_program_binary)
Change-Id: I6f9ee51f7c063ca03bf48fccd413dae244edd191
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 23:49:11 +00:00
Brian Osman
88c05343dd Cast to fix Linux ANGLE builds
Change-Id: I4badf65abc63c592195d0ef9e15c015f7adb54b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221718
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 19:50:08 +00:00
Brian Osman
dbe7cf9c42 Connect ANGLE's trace events to Skia's tracing
ANGLE has a collection of platform hooks for embedding. Setting these
four allows us to get trace events related to shader compile and other
ANGLE work.

Change-Id: I11c32155023c6f4bda72daddfecc2dbe48b00675
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221657
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 18:22:11 +00:00
Brian Osman
fb32ddf622 Revert "Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU""
This reverts commit 37a59ef1af.

Change-Id: If38da265ebbb196e72c7d035ba51028438787e2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221541
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-18 14:47:12 +00:00
Greg Daniel
f91aeb259e Move a bunch of gpu files out of include/private and into src/gpu.
In GrRecordingContext I moved the auditTrail onto the heap and only there
when compiling for tests. This allowed us to move a lot of files out of
include private.

Change-Id: Ib76ac211c0c6fd10bacaccf0c5f93f21a59f35d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221344
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2019-06-18 14:24:42 +00:00
Ravi Mistry
517be93cab [skottie-wasm-perf] Command line application to measure perf
Uses puppeteer to bring up Chrome headless and then calls
skottie-wasm-perf-html with endpoints for canvaskit.js, canvaskit.wasm,
and the target lottie file.

Notry: true
Bug: skia:9179
Change-Id: I3250f2edf92329dce6e3f0bf125fa26b70bed632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221557
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-06-18 13:24:15 +00:00
Ravi Mistry
cb5ed84589 [skottie-wasm-perf] Date.now() has millisecs precision, we need microsecs
Uses performance.now() which should be within 5us.
performance.now() was increased to be within 100us in https://chromium-review.googlesource.com/c/chromium/src/+/853505 but this has been undone since then with https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/timing/time_clamper.h?l=26

Verified that the version of puppeteer we will use (1.17.0) uses crrev.com/662092 from puppeteer's package.json that revision is from May/2019 so it does include the 5us change.

NoTry: true
Bug: skia:9179
Change-Id: Ie6a42bae618b2f3a2be1bc229d1e8f8a503259d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221556
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-18 13:06:45 +00:00
Robert Phillips
37a59ef1af Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU"
This reverts commit 90507286cc.

Reason for revert: Seems to be breaking some builds

Original change's description:
> Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU
> 
> Change-Id: I7236a30040ab532086e68d6e9de2898dd7acaa32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221098
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,kjlubick@google.com,brianosman@google.com,ethannicholas@google.com,reed@google.com

Change-Id: Ie230315a72ebcfae32bc9ce7bafec1f87106cff2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221536
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-06-18 11:35:18 +00:00
Chris Dalton
1e6c5b8dee Add a "preferredInternalSampleCount" cap
This new cap tells Ganesh how many samples to use when performing
internal draws with MSAA or mixed samples. The default is always 4x,
but the client can change that with
GrContextOptions::fPreferredInternalMSAASampleCount.

Also adds a command line flag to viewer to control
fPreferredInternalMSAASampleCount.

Bug: skia:
Change-Id: Iba369273e802aa1bee796b576b3c18af347b0494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221156
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-06-17 23:47:59 +00:00
Mike Reed
4b203ad7ac add motion blur params to skottie2movie
--motion_angle ... [default is 180]
--motion_samples ... [default is 1, for no motion blur]

Change-Id: Iec0f31655b3369f51e0b398efb2d5b156dcbaf2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221416
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-06-17 23:13:16 +00:00
Brian Osman
b500ef7a76 Add some precision back to timestamps when using --trace
Optimizations to JSON size (%f -> %g) changed the meaning of the digits
argument, causing these timestamps to become severely truncated. Traces
have been fairly useless as a result (too many events starting/stopping
at the same time). This adds enough digits back that things are better.

Change-Id: I3f2d2a3dd064daf8449ac34ab5440f95e339a392
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221346
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-17 22:08:06 +00:00
Brian Osman
90507286cc Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU
Change-Id: I7236a30040ab532086e68d6e9de2898dd7acaa32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221098
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-17 21:16:18 +00:00
Mike Klein
342b1b2753 proposed: add bytes() op
I'm staring at this assembly,

	vmovups	(%rsi), %ymm3
	vpsrld	$24, %ymm3, %ymm4
	vpslld	$16, %ymm4, %ymm15
	vorps	%ymm4, %ymm15, %ymm4
	vpsubw	%ymm4, %ymm0, %ymm4

Just knowing that could be

	vmovups	(%rsi), %ymm3
	vpshufb	 0x??(%rip), %ymm3, %ymm4
	vpsubw	%ymm4, %ymm0, %ymm4

That is, instead of shifting, shifting, and bit-oring
to create the 0a0a scale factor from ymm3, we could just
byte shuffle directly using some pre-baked control pattern
(stored at the end of the program like other constants)

pshufb lets you arbitrarily remix bytes from its argument and
zero bytes, and NEON has a similar family of vtbl instructions,
even including that same feature of injecting zeroes.

I think I've got this working, and the speedup is great,
from 0.19 to 0.16 ns/px for I32_SWAR, and
from 0.43 to 0.38 ns/px for I32.

Change-Id: Iab850275e826b4187f0efc9495a4b9eab4402c38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220871
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-17 15:29:34 +00:00
Kevin Lubick
5f11dd74ce add html for perfing skottie-wasm
Change-Id: I7ce4d869565d57756b17587fcb612ccbfdbea9e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220747
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-06-14 17:51:25 +00:00
Derek Sollenberger
d7a959726d Update CtsSkQPTestCases to non-shardable in release script
The curent SKQP runner doesn't support sharding.

Bug: b/134522828
Change-Id: Ia4e147fea36551e71737b16218e316570384f507
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220296
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-06-14 17:05:51 +00:00
Mike Klein
4c4945a252 trim another instruction of I32_SWAR
Now that we've got shr_16x2, extract(..., 8, splat(0x00ff00ff)) is
better done as shr_16x2(..., 8).  This swaps a 16-bit shift in for
the 32-bit shift, a wash, but lets us drop the bit_and at the end,
saving one whole instruction.

This places I32_SWAR a tiny little bit faster than the code in Opts,
like .19 ns/px vs .20 ns/px for Opts.

Change-Id: I4160dc03ecc8b855c0773a927f1510ad5cbb4b87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220856
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-13 21:58:05 +00:00
Mike Klein
7f061fb53b streamline srcover math in I32_SWAR
This is the final bunny I've got in my hat, I think...

Remembering that none of the s += d*invA adds can overflow,
we can use a single 32-bit add to add them all at once.

This means we don't have to unpack the src pixel into rb/ga
halves.  We need only extract the alpha for invA.

This brings I32_SWAR even with the Opts code!

curr/maxrss	loops	min	median	mean	max	stddev	samples   	config	bench
  36/36  MB	133	0.206ns	0.211ns	0.208ns	0.211ns	1%	▁▇▁█▁▇▁▇▁▇	nonrendering	SkVM_4096_I32_SWAR
  37/37  MB	152	0.432ns	0.432ns	0.434ns	0.444ns	1%	▃▁▁▁▁▃▁▁█▁	nonrendering	SkVM_4096_I32
  37/37  MB	50	0.781ns	0.794ns	0.815ns	0.895ns	5%	▆▂█▃▅▂▂▁▂▁	nonrendering	SkVM_4096_F32
  37/37  MB	76	0.773ns	0.78ns	0.804ns	0.907ns	6%	▄█▅▁▁▁▁▂▁▁	nonrendering	SkVM_4096_RP
  37/37  MB	268	0.201ns	0.203ns	0.203ns	0.204ns	0%	█▇▆▆▆▆▁▆▆▆	nonrendering	SkVM_4096_Opts

Change-Id: Ibf0a9c5d90b35f1e9cf7265868bd18b7e0a76c43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220805
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-13 21:32:45 +00:00
Mike Klein
57cb5ba122 i16x2 sub/shr
More i16x2 ops, as seemed immediately useful in I32_SWAR.

   I32_SWAR: 0.27 ns/px  --> 0.25 ns/px
   I32:      0.43 ns/px
   F32:      0.76 ns/px
   RP:       0.8  ns/px
   Opts:     0.2  ns/px

Change-Id: I04fed0d1ed1c4218d0cafb45fd0ee6d68880de80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220801
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-13 19:17:34 +00:00
Mike Klein
3538908983 baby steps into 16-bit ops
I figure the easiest way to expose 16-bit operations
is to expose 16x2 pair operations... this means we
can continue to always work with the same size vector.

Switching from 32-bit multiplies to 16-bit multiplies
is going to deliver the most oomph... they cost roughly
half what 32-bit multiplies do on x86.

Speed now:

   I32_SWAR: 0.27 ns/px
   I32:      0.43 ns/px
   F32:      0.76 ns/px
   RP:       0.8  ns/px
   Opts:     0.2  ns/px

Change-Id: I8350c71722a9bde714ba18f97b8687fe35cc749f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220709
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-13 18:44:44 +00:00
Mike Klein
821f5e8dfe remove mul_unorm8/mad_unorm8
I just kind of remembered that if we're doing (xy+x)/256
and x is a destination channel and y is 255-sa, then you
can get the +x for free by multiplying by 256-sa instead.

  (d * (255-sa) + d)
  (d * (255-sa + 1))
  (d * (256-sa)    )

Duh.  This is a trick we play in a lot of legacy code and
I've just now realized it's exactly equivalent to the trick
I want to play here... sigh.

Folding this math in kind of makes mul/mad_unorm8 moot.

Speed's getting good:

  I32_SWAR: 0.3  ns/px
  I32     : 0.55 ns/px
  F32     : 0.8  ns/px
  RP      : 0.8  ns/px
  Opts    : 0.2  ns/px

Change-Id: I4d10db51ea80a3258c36e97b6b334ad253804613
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220708
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-13 18:21:44 +00:00
Mike Klein
3f593799da expand unit tests, fix extract
The mask-only special case for extract is wrong...
it never looked it its input!

This not only makes things correct-er, but oddly it also
makes them faster by breaking inter-loop data dependencies.

Disable tests for _I32... they're actually still broken
because of a much more systemic flaw in how I've evaluated
programs.  The _F32 and _I32_SWAR JIT code and all interpreted
code is just getting lucky.  o_O

While here, update the I32_SWAR code to use the same math as I32,
(x*y+x)/256 for unorm8 mul.  This just helps keep me sane.

Change-Id: I1acc09adb84c426fca4b2be5ca8c2d46d9678dd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220577
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-12 18:58:56 +00:00
Brian Osman
072e6fc374 Remove version string from Viewer's "highlight" SkSL shader
Change-Id: Id61b7b9d9bc7611727a27be0172fcabc2ef4345a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220522
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-06-12 16:03:36 +00:00
Jim Van Verth
d6199ec723 Use new retain() method to set up window context.
This makes our usage of sk_cf_obj consistent with Chrome.

Bug: skia:8243
Change-Id: I159339577a0e8595e7cdd47ffb9ab0653269e108
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218973
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-06-11 13:08:58 +00:00
Robert Phillips
cb1adb40d0 Add srcData version of createBackendTexture API
Change-Id: I9679774d69e087a4ceb24de78e98585382bf8593
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218553
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-10 19:39:33 +00:00
Jim Van Verth
8429422986 Change GrCFResource to sk_cf_obj and move to include/ports.
This makes GrCFResource a template class with similar semantics to sk_sp.

Change-Id: I9ae9988dac6b39477b16d65591ef6fff44903c36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218376
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-06-10 18:44:28 +00:00
Robert Phillips
d1d869d96e Make GL & Vk backends create uninitialized backend textures
We want the non-color, non-pixel-data version of createBackendTexture to truly create uninitialized textures.

Change-Id: I08867508ea181b7ba3685638cc7a3ea11d527a24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218396
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-10 16:27:07 +00:00
Mike Klein
a630732c36 revise extract instruction
Convert extract(x,bits,z) to be (x >> bits) & z,
now a more explicit parallel to pack().

This lets us eliminate the funky bit counting required from the old
instruction, but more saliently it makes it more likely that the masks
we AND with will be the same value.

Ultimately down at the x86 or ARM ISA level, the AND instructions don't
really benefit from having an immediate argument (while the shifts do).
We might as well treat the mask as a normal value, letting it get
commoned with identical values, loop hoisted, etc.

Change-Id: I48a38468b46f2c730574c025f412262296472447
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219597
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-06-10 15:08:19 +00:00