Commit Graph

47198 Commits

Author SHA1 Message Date
skia-recreate-skps
4d4369414d Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I950cf69cd83bcd9e629feabfc2d8083865c2e761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276838
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-13 00:25:31 +00:00
Mike Klein
c2da769716 dot for JIT
That's what we care about at the moment.

Change-Id: I71a6538492d1d26be12a8d7a02c9d47667813e92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276752
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-12 21:24:52 +00:00
Mike Klein
5caf7dee25 restore Op::round
While I think trunc(mad(x, scale, 0.5)) is fine for doing our float
to fixed point conversions, round(mul(x, scale)) was kind of better
all around:

   - better rounding than +0.5 and trunc
   - faster when mad() is not an fma
   - often now no need to use the constant 0.5f or have it in a register
   - allows the mul() in to_unorm to use mul_f32_imm

Those last two points are key... this actually frees up 2 registers in
the x86 JIT when using to_unorm().

So I think maybe we can resurrect round and still guarantee our desired
intra-machine stability by committing to using instructions that follow
the current rounding mode, which is what [v]cvtps2dq inextricably uses.

Left some notes on the ARM impl... we're rounding to nearest even there,
which is probably the current mode anyway, but to be more correct we
need a slightly longer impl that rounds float->float then "truncates".
Unsure whether it matters in practice.  Same deal in the unit test that
I added back, now testing negative and 0.5 cases too. The expectations
assume the current mode is nearest even.

I had the idea to resurrect this when I was looking at adding _imm Ops
for fma_f32.  I noticed that the y and z arguments to an fma_f32 were by
far most likely to be constants, and when they are, they're by far likely
to both be constants, e.g. 255.0f & 0.5f from to_unorm(8,...).

llvm disassembly for SkVM_round unit test looks good:

~ $ llc -mcpu=haswell /tmp/skvm-jit-1231521224.bc -o -
	.section	__TEXT,__text,regular,pure_instructions
	.macosx_version_min 10, 15
	.globl	"_skvm-jit-1231521224"  ## -- Begin function skvm-jit-1231521224
	.p2align	4, 0x90
"_skvm-jit-1231521224":                 ## @skvm-jit-1231521224
	.cfi_startproc
	cmpl	$8, %edi
	jl	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ## %loopK
                                        ## =>This Inner Loop Header: Depth=1
	vcvtps2dq	(%rsi), %ymm0
	vmovupd	%ymm0, (%rdx)
	addl	$-8, %edi
	addq	$32, %rsi
	addq	$32, %rdx
	cmpl	$8, %edi
	jge	LBB0_2
LBB0_3:                                 ## %hoist1
	xorl	%eax, %eax
	testl	%edi, %edi
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## %loop1
                                        ## =>This Inner Loop Header: Depth=1
	vcvtss2si	(%rsi,%rax), %ecx
	movl	%ecx, (%rdx,%rax)
	decl	%edi
	addq	$4, %rax
	testl	%edi, %edi
	jg	LBB0_5
LBB0_6:                                 ## %leave
	vzeroupper
	retq
	.cfi_endproc
                                        ## -- End function

Change-Id: Ib59eb3fd8a6805397850d93226c6c6d37cc3ab84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276738
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-12 21:10:34 +00:00
Chris Dalton
bb7684276a Migrate GrMeshTest to the new bind/draw API
Also adds a drawIndexPattern() helper method to GrOpsRenderPass, and
starts testing a base index with drawIndexedInstanced.

Change-Id: I3fbb1b5a2a1012a4fcbe126c54ddbc8c17ce80b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276739
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-12 19:24:07 +00:00
Mike Reed
019385eb1d remove LerpRed shader
Seems very one-off (esp. given SkSL). No one seems to use it.

Change-Id: Iaded54c5b4183fa4aa9c318b5dbe1d410cca539a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276617
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-12 18:37:17 +00:00
Mike Reed
5929535315 add draw-via-serialize mode to viewer
'$' lets you see what the serialized version looks like. Helps diagnose
failures in dm/fm

Change-Id: I0c3acdeb6e7f170f5caeba1c0516b449eb7402ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276756
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-12 18:36:27 +00:00
Robert Phillips
2669a7b74a More programInfo cleanup
This CL moves the boiler-plate implementation of onPrePrepareDraws up to GrMeshDrawOp. This, unfortunately, required the addition of a 'programInfo' virtual but that may go away in the future.


The only GrMeshDrawOp-derived classes left are:
  AAHairlineOp - which has 3 programInfos
  AAFlatteningConvexPathOp - which has >=1 mesh (but just 1 programInfo)
  GrAtlasTextOp - which has inline uploads
  SmallPathOp - which, maybe, has inline uploads
  TextureOp - which has chaining

Bug: skia:9455
Change-Id: Id10f70e764054134751545ad38b99f0a0778de76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276642
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-12 18:29:37 +00:00
Mike Reed
84a9eb5e6b add gm for clipShader in a layer
Change-Id: I3435ccbf0f391a08dfde9d0cb40ce797144c6b9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276616
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-03-12 18:20:30 +00:00
Brian Osman
334380e342 More GrDrawVerticesOp cleanup, to reduce redundant state
Directly compute things like stride and vertex attribute types from the
underlying state, rather than trying to keep two tiers of flags
correctly in sync.

With these changes, createProgramInfo can be pushed to onExecute.

Change-Id: I0b021b3880a92e5782f821ebe95ac5aee288f7bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276643
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-03-12 16:08:50 +00:00
Robert Phillips
6941f4a01d Update three GrMeshDrawOps to surface their programInfos at record time
The lucky three are:

    GrShadowRRectOp
    PrimitiveProcessorTest::Op
    VertexColorSpaceBench::Op

Bug: skia:9455
Change-Id: I7133be41e62aa183b8395f2402f52a6a88191aca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276482
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-12 15:40:11 +00:00
Florin Malita
6509bc715f [skottie] Cleanup VectorValue use
Replace with Vec2Value where appropriate.

TBR=

Change-Id: I530b451d6d858621615e33791e610a562d9643ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276644
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-12 15:35:20 +00:00
Michael Ludwig
b0cee9bf9a Remove drawBitmap et al. from SkDevice
SkCanvas keeps its non-exotic drawBitmap calls for now but they
immediately wrap the bitmap in SkImage::MakeFromBitmap. This will
add a copy for mutable bitmaps, but this can be worked around by using
images directly (preferred), or marking the bitmap as immutable. In
practice, mutable bitmaps do not seem to be widely used so this is
deemed acceptable for now.

Several GMs are updated to mark the bitmaps as immutable in order to
avoid pixel churn in how CPU vs. GPU mipmaps are generated. As we move
towards explicit mipmap generation, this distinction will become less
critical, so I'm just avoiding it for now. See skbug.com/9337 for mipmap
proposal. The image diffs encountered in this CL directly related to
generating mipmaps for bitmaps already cached on the GPU vs. not on the
GPU yet.

It was decided to copy if mutable vs. never copying the bitmap because
it preserves the image guarantees the devices and canvas' rely on,
and imposing the need to inspect an image for mutability is undesired.

Bug: skia:10037, skia:9337
Change-Id: If152e6cae1e155ccf6bd2cd755895f3c7a0135a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276004
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-12 15:28:00 +00:00
Mike Klein
1fe50d3842 make switching skvm-on-llvm easier
Until now I've been setting this in GN args, but that leads to slow
complete rebuilds.  Defining it in SkVM.h makes for a smaller rebuild.

(WFH optimization)

Change-Id: Iaebebd49efaa2df6ef09606989d608cb6a5e630e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276690
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-12 15:00:50 +00:00
Florin Malita
c02e77ce0a [skottie] Effects cleanup pass
1) switch 2D properties to new Vec2Value type
2) convert vebose binding code to more concise EffectBinder pattern

TBR=

Change-Id: If0244fea887c350dd3d59ddd50a7be75e058d799
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276639
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-12 14:03:00 +00:00
Brian Osman
f0aee749bf Remove (unused) shader caps from default GP factory functions
Change-Id: Id3313169be2fecfb8a11045f08a55490fbec9b9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276486
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-03-12 13:59:40 +00:00
Brian Osman
9b449b73d3 Simplify and optimize GrDrawVerticesOp vertex writing loop
- Switch to using GrVertexWriter to eliminate bookkeeping
- Hoist the position transform out of the loop with a call to
  MapPointsWithStride. This lets us do the matrix type checking and
  proc lookup once, rather than N times.
- Remove another branch (local coords) by just making localCoord point
  at positions if they're not present in the mesh.
- Compute the stride directly from flags, paving the way for delaying
  the program info creation until onExecute.

Bug: skia:9984
Change-Id: I2b8b2ce60b3cd97361ae9562c0412b65251f58f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276483
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-12 13:20:20 +00:00
Robert Phillips
4133dc4e0b Clean up programInfo creation in GrMeshDrawOp-derived Ops
This CL:
  Renames the existing createProgramInfo method to onCreateProgramInfo and makes it a virtual on GrMeshDrawOp

  Moves the non-virtual createProgramInfo (helper) calls to GrMeshDrawOp

  Changes onCreateProgramInfo to not return a ProgramInfo*. This is setting up to handle ops that create >1 programInfo (e.g., AAHairlineOp)

This CL leaves the following 8 ops in need of an onCreateProgramInfo implementation:

AAHairlineOp
AAFlatteningConvexPathOp
GrAtlasTextOp
GrShadowRRectOp
SmallPathOp
GrTextureOp
PrimitiveProcessorTest::Op
VertexColorSpaceBench::Op

Bug: skia:9455
Change-Id: Id7e2b8a40cac86ede6bf3c0e544da5500ff47d8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276403
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-12 13:00:40 +00:00
Eric Boren
9b5dba2ddb Update Skia milestone to 83
Change-Id: I7b62a8c94d1afde1bbec0c476ef8cf8d0e09b677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276636
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-03-12 11:33:00 +00:00
skia-autoroll
7bb74c4299 Roll ../src 43a5bd0c46ed..5309fd86e6da (470 commits)
43a5bd0c46..5309fd86e6


Created with:
  gclient setdep -r ../src@5309fd86e6

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: brianosman@google.com
Change-Id: I58851655aa0d4657f20cd40113574a57024feedb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276599
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-12 04:57:58 +00:00
skia-autoroll
d8fe61482b Roll third_party/externals/angle2 c5b3cbdb4502..2e5bd9b1e658 (10 commits)
c5b3cbdb45..2e5bd9b1e6

git log c5b3cbdb4502..2e5bd9b1e658 --date=short --first-parent --format='%ad %ae %s'
2020-03-11 ynovikov@chromium.org Update SimpleStateChangeTest.DrawRepeatUnalignedVboChange suppression
2020-03-11 timvp@google.com Fix SearchProvider
2020-03-11 geofflang@google.com Refactor ANGLE target to allow GoogleANGLE to override it.
2020-03-11 geofflang@google.com Use ANGLE's vulkan-headers dep when rolling ANGLE into Android.
2020-03-11 jonahr@google.com Add -rpath entries for non-component builds on Mac
2020-03-11 jonahr@google.com Relax GL_DEPTH_COMPONENT32_OES format support rules
2020-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 014968c3b6b3..2ff8b6a6f4d5 (4 commits)
2020-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 8be72df60462..16ae92a4ee52 (1 commits)
2020-03-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 343d4f6f1870..e2176c91b23c (2 commits)
2020-03-11 jie.a.chen@intel.com Remove MultisampleCompatibilityTest suppression

Created with:
  gclient setdep -r third_party/externals/angle2@2e5bd9b1e658

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 brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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: None
Tbr: brianosman@google.com
Change-Id: Iabc19d57019d9074c12b90877624a4682f76f40e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276598
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-12 04:36:58 +00:00
skia-autoroll
1743144ab8 Roll third_party/externals/swiftshader 16ae92a4ee52..7e857092052e (6 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/16ae92a4ee52..7e857092052e

git log 16ae92a4ee52..7e857092052e --date=short --first-parent --format='%ad %ae %s'
2020-03-11 capn@google.com Support running PowerVR samples using SwiftShader on Linux
2020-03-11 bclayton@google.com Regres: Roll dEQP to 1.2.1
2020-03-11 capn@google.com Regres: support testlist creation from specified hash
2020-03-11 capn@google.com Suppress warnings in Subzero dependencies
2020-03-11 bclayton@google.com Regres: Simplify running of local tests
2020-03-11 bclayton@google.com Kokoro: Update clang-8 URL

Created with:
  gclient setdep -r third_party/externals/swiftshader@7e857092052e

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: brianosman@google.com
Change-Id: Ib09f5ef80e798ea19a0ecce4aa853d40cae13ea1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276597
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-12 04:34:58 +00:00
Jim Van Verth
5082df1cf5 Remove need for gpu when unrefing managed resources.
Metal and D3D don't require the GrGpu to delete resources, and for
Vulkan, we'll store the GrVkGpu in each individual resource. This will
allow us to use sk_sp<SomeManagedResource> in the future.

Bug: skia:9935
Change-Id: Id51022b935ad360367976a6bdf60cdda9e3f7dee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276456
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-11 21:02:07 +00:00
Brian Osman
f0140ee00f Remove GrDrawVertices fast path for simple matrix + colors + no local coords
It's not clear that this ever happens, so I'd rather keep the code as
simple as possible.

Bug: skia:9984
Change-Id: I2c78eb411d9259f10d208306b173ad7395421c3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276477
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-11 19:06:27 +00:00
Robert Phillips
740d34f70e Make TessellatingPathOp surface its programInfo at record time
Bug: skia:9455
Change-Id: I1f14cbb6f5af21637b6358632eced190750a2a5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276401
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-11 19:06:17 +00:00
Ravi Mistry
1b7f846d09 Add wrapper script to call tool to bulk abandon Gerrit CLs
Makes it easy to invoke https://skia-review.googlesource.com/c/buildbot/+/275096
from the Skia repo

Change-Id: If94d506d86a2b4319c7e0a7c830d5dab27916c10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275693
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-03-11 18:50:57 +00:00
Greg Daniel
a31ab4ba9b Have GrVkUniformBuffers own their descriptor sets.
Locally this looks to have a perf win especially on Android. We no longer
have to update the values in the uniform descriptor every draw. Also since
we essentially have one uniform buffer per draw already, we were making a
descriptor set per draw as well. Now we just tie them to the uniform buffers
and we should end up with about the same amount.

Change-Id: I65c6a8b2ad5c631c4dbb7ea50068f71a0ed4c894
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276476
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-11 18:46:47 +00:00
Mike Klein
3a74f83e80 remove -D_GLIBCXX_DEBUG
This was a convenience for Cary to not have to use extra_cflags,
and iterferes with using prebuilt C++ code by breaking the ABI.

Change-Id: I9e14ec04106a0abf9b55e5803242c2eb226d6e3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276445
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-11 18:12:48 +00:00
Florin Malita
06e5a15567 [skottie] Power reduce trivial spatial Berzier
A significant number of spatial keyframes have trivial Bezier control
points - e.g. located on the linear interpolation segment.  The
corresponding cubics have no effect and can be discarded.

Change-Id: I706546653c3621fd0d3eb9c285627ccd4d0bc549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276410
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-11 18:12:17 +00:00
Brian Osman
dafbf121a8 SkVertices: Remove volatile/nonvolatile bit
No one was using this, and it added significant complexity to
GrDrawVerticesOp.

Bug: skia:9984
Change-Id: I23f38b3f5d853a8e531f13b6931cd57b5985a2c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276407
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-11 17:33:17 +00:00
Robert Phillips
6dc0f63a50 Make DrawAtlasOp surface its programInfo at record time
This implements SkCanvas::drawAtlas so doesn't actually have any of the (text) atlas complications.

Bug: skia:9455
Change-Id: I36a2aabe5a667d85bed75b400981defcaf421feb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276276
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-11 14:23:07 +00:00
Robert Phillips
9028bacebc Make DefaultPathOp surface its programInfo at record time
Here is another Op w/ multiple GrMeshes drawn w/ a single programInfo (cf., AAConvexPathOp).

Bug: skia:9455
Change-Id: I3d1eec03d1d9d4fc8e117aa2960472027ea96105
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276220
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-11 13:35:27 +00:00
Mike Reed
fdf94044ff Remove exotic legacy bitmap drawing entry points: Nine, Lattice
follow-ups:
- remove associated virtuals in canvas

Change-Id: I3efa7a88ed0905ebf080712993e7f43148df36dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276282
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-11 13:11:47 +00:00
Greg Daniel
21beacccb9 Revert "Experiment with no longer avoiding uploading same uniforms in vulkan."
This reverts commit a19ea58aa9.

Reason for revert: As expected perf slowdowns, but we have the data now

Original change's description:
> Experiment with no longer avoiding uploading same uniforms in vulkan.
> 
> The plan is to land this and see what the perf bots report. Only local
> desktop a little less than half the time we skip the upload for not being
> dirty. But we're not sure if this is saving us much. Unless there is no
> regression at all, we will revert this.
> 
> Bug: skia:10035
> Change-Id: I8a3a8862ccd10ba109b5ddc2f3473d30b3ceccaf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276211
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,michaelludwig@google.com

Change-Id: Iea44b13c70cd075e93bb52b3a6773cc8b5df731a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10035
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276396
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-11 11:43:17 +00:00
skia-recreate-skps
0340292972 Update Go Deps
Change-Id: I67e078dfe747de855bc162f39a27f2e3a187538c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276349
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-11 05:30:16 +00:00
skia-autoroll
617173fee9 Roll third_party/externals/angle2 abcc536b6207..c5b3cbdb4502 (7 commits)
abcc536b62..c5b3cbdb45

git log abcc536b6207..c5b3cbdb4502 --date=short --first-parent --format='%ad %ae %s'
2020-03-10 cclao@google.com Vulkan: Use VK_FORMAT_D24_UNORM_S8_UINT for 24 bit depth if available
2020-03-10 tikuta@chromium.org use go swarming client in trigger.py
2020-03-10 rafael.cintron@microsoft.com Enable allowClearForRobustResourceInit for NVidia hardware
2020-03-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 6861ea4e10a1..343d4f6f1870 (3 commits)
2020-03-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 97484d689869..014968c3b6b3 (11 commits)
2020-03-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader b44162fdbb25..8be72df60462 (1 commits)
2020-03-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 4c027048d88b..dd3d91691f1e (3 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@c5b3cbdb4502

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 brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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: None
Tbr: brianosman@google.com
Change-Id: Ia27e014e5665b7cc5bbc3d922a94bf677f974196
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276117
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-11 04:41:57 +00:00
skia-autoroll
c35c05f8fb Roll ../src 7f81408a3581..43a5bd0c46ed (526 commits)
7f81408a35..43a5bd0c46


Created with:
  gclient setdep -r ../src@43a5bd0c46

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: brianosman@google.com
Change-Id: I0509461a6097809388aac27103b7bc7b36ed99d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276118
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-11 04:35:46 +00:00
skia-autoroll
6bc4a7405a Roll third_party/externals/swiftshader 8be72df60462..16ae92a4ee52 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/8be72df60462..16ae92a4ee52

git log 8be72df60462..16ae92a4ee52 --date=short --first-parent --format='%ad %ae %s'
2020-03-10 amaiorano@google.com Subzero: fix Call on bool-returning functions

Created with:
  gclient setdep -r third_party/externals/swiftshader@16ae92a4ee52

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: brianosman@google.com
Change-Id: I2c1768c976ed20a845584766e4673c7804138796
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276339
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-11 04:34:26 +00:00
Mike Reed
c2fe5ee2b3 refactor where we wrap clipshaders, in prep for gpu backend
Change-Id: I6040d1fb67911bbfdefd5f1ff968e7d11323763d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276281
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-11 01:32:14 +00:00
Mike Klein
f97c018947 simplify skvm clip shaders
This removes the need for overhead like NoClip and the second call to
hash_shader() by treating null clip shaders specially.

Change-Id: I409fb6eb890e1dbaf242ecf94188aa9c477f39f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276230
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-11 01:03:49 +00:00
Mike Klein
272c56ba73 skvm clip shader support
This appears to work.

As a follow up, I want to try taking a little care handling a null and
opaque clip shaders explicitly, to cut down on the overhead in the
common case when it's null and we burn non-zero CPU determining NoClip
is a no-op.

Change-Id: Ie30c4995b3242a5b52935a90005e5af79c9eae7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276227
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-11 00:59:55 +00:00
Mike Klein
c376cb4b42 skvm local matrix shader
Got distracted when looking at SkCTMShader
and implemented this for SkVM instead.

Nothing tricky at all.  Exactly like SkRP impl.

Added some commented out SkDebugf() to help me
find what impls are missing.

Change-Id: Ie11e1996c5d1b72f202cc1635cf13e4f2e1f14d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276234
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-11 00:58:45 +00:00
Jim Van Verth
3e192165cb Hoist GrVkResource up so it can be used for D3D and Metal.
Bug: skia:9935
Change-Id: Ie13b9077c5db805020973e5cbab1aa8468c88742
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276214
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-03-10 22:37:10 +00:00
Mike Reed
bf355123ae we can handle opaque clip-shaders up front
Change-Id: I6ac1470dfe5005479b52a0ae662874fd0f7b61c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276316
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-10 21:37:20 +00:00
Mike Reed
3439323afd remove testing && false
Change-Id: I87cfeccc7ce624d42b19226de5ff63dd18b65aca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276279
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-10 21:24:51 +00:00
Michael Ludwig
4723724bac Impl. tiled bitmaps in drawImageRect with per-edge AA flags
Bug: skia:3803
Change-Id: If2b529bf9167e2a94784d8797ce28a9618e86d11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276203
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-03-10 20:56:00 +00:00
Mike Klein
520c5fd7b2 fix clip shader + skvm
The SkVM bots set this define, overriding the check at head.

Change-Id: Icbd7cb8c06ccba15a60855aefc92a43d624f51ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276224
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-10 20:30:00 +00:00
Brian Osman
5f6b41e6d8 Runtime effects: Detect calls to undefined functions
Previously, the CPU backend would catch this later (ByteCodeGenerator),
and the GPU backend would assert in expandFormatArgs (out-of-range
function index).

Change-Id: Ib84bf7c477ddcc9fd3091c5b106ebdd654e9a30b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276000
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-10 20:27:10 +00:00
Chris Dalton
39ca9734a7 Migrate ccpr to the new bind/draw API
Change-Id: I4bdce03ea889b564c9bb8a7e48d95bf7873c4020
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276183
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-10 20:12:53 +00:00
Florin Malita
6e7eac9fff [skottie] Simplify the separate-dimensions vector interpolator
No need for an intermediate adapter object - just bind individual/scalar
fields using existing mechanisms.

No functional side effects.

TBR=
Change-Id: I16be769e5fb92dba0ebb6ce3b0584c5cdcc2b92c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276215
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-10 19:55:50 +00:00
Robert Phillips
3eabf4ae00 Convert AAConvexPathOp to surfacing its programInfo
This Op is interesting bc it has multiple draws (i.e., it has multiple GrMeshes).

Bug: skia:9455
Change-Id: Ifdd0f07c713cfd88f77038f9a63289d004ffe83b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276208
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-10 19:52:31 +00:00