This CL enables Vulkan Test bots on the NexusPlayer
TBR:bsalomon@google.com
BUG=skia:
Change-Id: I0cc8b01107afcc84e0cb0631f361f3615fc8dd9b
Reviewed-on: https://skia-review.googlesource.com/5681
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
We can use SSE's 16 bit mul-hi to get a very good approximation to the
ideal multiplier. This lets us trim several instructions.
This removes the need for the constant 0x0001 and instead uses 0x8081.
I've reordered the constants so that 0x8000 comes first, which helps
trim an instruction here and there on ARM.
Change-Id: I3d490c802df39a89424230c4cfc491f52210c275
Reviewed-on: https://skia-review.googlesource.com/7282
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
A trivial change but it does better indicate the nature of the method
Change-Id: I44a0e77dba28df892f4200496d78797ed5fd37df
Reviewed-on: https://skia-review.googlesource.com/7331
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
I noticed scale_u8 is implemented in SkSplicer_stages but not _lowp.
That's not for any good reason... scale_u8 makes fine sense in _lowp.
All other stages missing in _lowp are nuts to attempt without floats.
This also renames the to_fixed15 lambdas to from_u8 functions.
Everything in the file converts to or from fixed15; the interesting
question is the other format. Similarly, from_fixed15 becomes to_u8.
Change-Id: I10616b6772c65bd1acb9857f4f5b5f70a4f01bf4
Reviewed-on: https://skia-review.googlesource.com/7323
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
I recentely removed the only call site of this so it should be
safe to delete now.
BUG=skia:
Change-Id: Id7fa94b9af5d73c4f7bb5e5a657d6fc6728923b5
Reviewed-on: https://skia-review.googlesource.com/7330
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I7b11a323b0c74ee70f52b1bd8be376fb7188cb19
Reviewed-on: https://skia-review.googlesource.com/7204
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This lands the rest of the original CL.
It fixes some flawed logic in SkSwizzler handling Gray8
images.
Original CL:
https://skia-review.googlesource.com/c/7085/
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-x86_64-Release-Fast
Change-Id: Ie2f0c545ea474f1872f284dfb286987b6eadf03d
Reviewed-on: https://skia-review.googlesource.com/7320
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: Ifd221365a7b9f9a4a4fc5382621e0da7189e1148
Reviewed-on: https://skia-review.googlesource.com/6526
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
UBSAN sees copying non-bool (uninitialized) values into this bool. Not
really a big deal, as we'll never actually use it in that case, but it's
best to just initialize it to true or false.
Change-Id: I38137d46a8aa6e6651325002b71ae5e33ff24c4a
Reviewed-on: https://skia-review.googlesource.com/7321
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This lands all the new xform hooks but no change to src/codec.
So the new decode features are turned off.
I'm relanding this in pieces to try to bisect a
strange MSAN error.
Original CL:
https://skia-review.googlesource.com/c/7085/
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-x86_64-Release-Fast
Change-Id: I451a2a29c73ca475e9e7a5ded58d4948d6b8be19
Reviewed-on: https://skia-review.googlesource.com/7277
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Add lowp variants for most stages in SkSplicer. These double the number
of pixels handled by representing each channel with 16 bits, ranging from
0x0000 as 0 to 0x8000 as 1. This format lets us use the Q15 multiply
instructions available in NEON and SSSE3 at full register width, with
a little platform-specific fix up to smooth over the fact that these
aren't quite Q15 values.
When a lowp stage is unavailable, the entire pipeline upgrades to
floats. So by simply not implementing sRGB, f16, matrix multiplication,
etc, we naturally express that they're best handled with floats.
These lowp stages ended up different enough that I've found it clearer
to have them live in their own files, noting where they differ from the
float stages. HSW, aarch64, and armv7 are all supported.
I've seen very good things performance-wise on all platforms.
Change-Id: Ib4f820c6665f2c9020f7449a2b51bbaf6c408a63
Reviewed-on: https://skia-review.googlesource.com/7098
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
BUG=skia:6134
Change-Id: If9c8fb55973815d378cd8a9d956735656d4c097c
Reviewed-on: https://skia-review.googlesource.com/7276
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reset the Arena state.
* Call all the dtors before deleting the blocks.
Change-Id: I6d90463966ac7bf9f0a4fda229f67d508c86bebb
Reviewed-on: https://skia-review.googlesource.com/7308
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
These may be better at -fsanitize=object-size.
No need to loop more than once in nanobench for these bots.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-ASAN,Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN,Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN
Change-Id: If89e94390d473434717cfe28de6be9055b68d8d4
Reviewed-on: https://skia-review.googlesource.com/7278
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This allows skslc to track the values of variables with constant
values across multiple statements and replace variable references with
constant values where appropriate.
The improved liveness tracking allows skslc to realize that a
variable is no longer alive if all references to it have been
replaced. It is not yet doing much with this information; better
dead code elimination is coming in a followup change.
BUG=skia:
Change-Id: I068c5d2e9a362e75299b1de1f4575339f5ddc3bb
Reviewed-on: https://skia-review.googlesource.com/7302
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This is just the new test images.
I'm relanding this in pieces to try to bisect a
strange MSAN error.
Original CL:
https://skia-review.googlesource.com/c/7085/
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-x86_64-Release-Fast,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN
Change-Id: Iec6b8cf52134992591651bf46bd6cd67d53fad52
Reviewed-on: https://skia-review.googlesource.com/7201
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Change-Id: I5e3cbac5caa483dfebd17444d9fb98e1adf1fdff
Reviewed-on: https://skia-review.googlesource.com/7267
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
This reverts commit f54b07121f.
Reason for revert: ASAN failure
Original change's description:
> Added constant propagation and better variable liveness tracking to
> skslc.
>
> This allows skslc to track the values of variables with constant
> values across multiple statements and replace variable references with
> constant values where appropriate.
>
> The improved liveness tracking allows skslc to realize that a
> variable is no longer alive if all references to it have been
> replaced. It is not yet doing much with this information; better
> dead code elimination is coming in a followup change.
>
> BUG=skia:
>
> Change-Id: I6bf267d478b769caf0063ac3597dc16bbe618cb4
> Reviewed-on: https://skia-review.googlesource.com/7033
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
>
TBR=egdaniel@google.com,ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Id2e26bce96b27df73948f8b32d3dff2e358ae0d6
Reviewed-on: https://skia-review.googlesource.com/7274
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
skslc.
This allows skslc to track the values of variables with constant
values across multiple statements and replace variable references with
constant values where appropriate.
The improved liveness tracking allows skslc to realize that a
variable is no longer alive if all references to it have been
replaced. It is not yet doing much with this information; better
dead code elimination is coming in a followup change.
BUG=skia:
Change-Id: I6bf267d478b769caf0063ac3597dc16bbe618cb4
Reviewed-on: https://skia-review.googlesource.com/7033
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
An RLE bmp reports how many bytes it should contain. This number may be
incorrect, or it may be a very large number. Previously, we buffered
all bytes in a single allocation. Instead, use a fixed size buffer and
only read what fits into the buffer. We already have code to refill the
buffer if there is more data, so rely on that to keep reading.
Choose an arbitrary size for the buffer. It is larger than the maximum
possible number of bytes we need to read at once.
Add a test with a test image that reports a very large number for
the number of bytes it should contain. With the old method, we would
allocate 4 gigs of memory to decode this image, which is unnecessary
and may result in OOM.
BUG=b/33251605
Change-Id: I6d66eace626002725f62237617140cab99ce42f3
Reviewed-on: https://skia-review.googlesource.com/7028
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
BUG=skia:
Change-Id: Ic5b2b07fb3f408edf1f2b982235424c22795fe50
Reviewed-on: https://skia-review.googlesource.com/7187
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
* Reset the Arena state.
* Call all the dtors before deleting the blocks.
TBR=mtklein@google.com
Change-Id: Iac320fec16e572cc9a6184c1f580089ab720f036
Reviewed-on: https://skia-review.googlesource.com/7221
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This simplifies the slope computation because we don't have to check dy
!= 0.
BUG=skia:
Change-Id: I5c09a9217ceed65f81f9d82cb045e33a70218077
Reviewed-on: https://skia-review.googlesource.com/7180
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
This reverts commit ccfd1083a7.
Reason for revert: Roll is failing.
Original change's description:
> Disallow readPixels() conversions from untagged srcs to tagged dsts
>
> This might break the roll into Chrome. But let's see how.
>
> BUG=skia:6021
>
> Change-Id: I2698b5d6fe72d01bed0dc64703b592a03d441a80
> Reviewed-on: https://skia-review.googlesource.com/7127
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>
TBR=msarett@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6021
Change-Id: I4b62178fd7c23f43cf69ca69fc14526ecd503956
Reviewed-on: https://skia-review.googlesource.com/7205
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
This might break the roll into Chrome. But let's see how.
BUG=skia:6021
Change-Id: I2698b5d6fe72d01bed0dc64703b592a03d441a80
Reviewed-on: https://skia-review.googlesource.com/7127
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Eventually ops can use this to hold their ops and create GrPipelines at flush time.
For now it is used by GrPipelineBuilder.
Change-Id: I0db3892032f2d07238e4c847a790678b3aab456f
Reviewed-on: https://skia-review.googlesource.com/7132
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>