Commit Graph

60751 Commits

Author SHA1 Message Date
John Stiles
9e2a74f029 Remove fragment-processor stack from DSL ThreadContext.
This was no longer referenced anywhere.

Change-Id: I479c70e528e48c8c1a8945230739ecf0a87c3f9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541746
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-05-19 13:57:18 +00:00
John Stiles
8ad9c82d30 Remove VarUniformHandle DSL method.
This was only used by DSL fragment processors and is unreferenced.
This removal causes the uniform-handle value in DSLVarBase to become
unreferenced as well.

Change-Id: Ifc89a3dda93f08c40341f654981bbb6593d4fb9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541745
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-19 13:14:42 +00:00
John Stiles
8366527b9b Reland "Remove operator= from DSL expression types."
This reverts commit 4b354dfb5b.

Reason for revert: not responsible for chromium:1326848

Original change's description:
> Revert "Remove operator= from DSL expression types."
>
> This reverts commit b143520625.
>
> Reason for revert: might have caused chromium:1326848
>
> Original change's description:
> > Remove operator= from DSL expression types.
> >
> > This means that in raw DSL code, `foo = bar` will need to be written as
> > `foo.assign(bar)`. This is admittedly slightly less convenient. However,
> > in practice, raw DSL code is very rare, and in fact we only had one
> > use-case for operator= across all of our code. This change will allow us
> > to simplify the DSL parser by eliminating the `DSLWrapper` helper class,
> > which was only needed because we overloaded `operator=`.
> >
> > Change-Id: I4fbc39b2c1443fc26a761d424c52e3b9b59169eb
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541062
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> Change-Id: I7c7e032c465aba004ba78fd69650c8037e019861
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541737
> Auto-Submit: John Stiles <johnstiles@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I0814f87e360b5574d4a06764bbfa747c49820774
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542136
Commit-Queue: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-05-19 13:05:55 +00:00
Michael Reed
0be7e31a03 Add mike@reedtribe.org to AUTHORS
Change-Id: Iaa66d1e5581f58e5b82e538f63d5b3cb77dc5d57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541741
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-05-19 12:49:11 +00:00
skia-autoroll
1d2607d4f2 Roll vulkan-deps from f39cf68e03c2 to f1a5c8f12c26 (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/f39cf68e03c2..f1a5c8f12c26

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross from d0c8dc304503 to b3ff97d0feaf

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I485da7a11a2d1a6b85711b9b75388807f7c9f05e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541795
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-19 06:14:50 +00:00
skia-autoroll
f25eb378c6 Roll ANGLE from c649979b7f2f to 6ae0c3214c41 (17 revisions)
c649979b7f..6ae0c3214c

2022-05-19 steven@valvesoftware.com Vulkan: clamp dynamic line width to supported values
2022-05-18 senorblanco@chromium.org D3D11: fix SSBO load in a return statement.
2022-05-18 romanl@google.com Spawn via vpython when old module detected.
2022-05-18 hailinzhang@google.com D3D11: Add GL_EXT_texture_buffer support
2022-05-18 syoussefi@chromium.org Vulkan: SPIR-V Gen: Apply Flat to gl_Layer in FS
2022-05-18 abdolrashidi@google.com Vulkan: Fix clear value for incomplete MS textures
2022-05-18 gman@chromium.org Reland "CGL, MTL: pbuffer for IOSurface fails for some formats"
2022-05-18 senorblanco@chromium.org D3D11: implement image load/store for non-compute shaders.
2022-05-18 m.maiya@samsung.com Vulkan: Support binding 2D slice of a 3D texture to an image unit
2022-05-18 geofflang@google.com Metal: Remove the long type from program preludes
2022-05-18 cclao@google.com Vulkan: Let texture buffer handle BufferVk's storage change
2022-05-18 cclao@google.com Vulkan: Add test for texture buffer and buffer data interaction
2022-05-18 m.maiya@samsung.com Vulkan: Bug fix in YUV descriptor pool allocation
2022-05-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 89eb09307fbc to cb4fc6d02fe4 (1 revision)
2022-05-18 cnorthrop@google.com Tests: Add Stardew Valley trace
2022-05-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4011ab35f3d8 to 89eb09307fbc (3 revisions)
2022-05-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 73ffbbeac851 to dbb1f3a2b2f7 (503 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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/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: jmbetancourt@google.com
Test: Test: angle_perftests --gtest_filter="*stardew_valley*"
Change-Id: I2642d44a635786db29bf1631af71934350ac171b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541792
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-19 05:52:56 +00:00
skia-autoroll
2bb8f8a1cf Roll SwiftShader from 89eb09307fbc to 2933d3126969 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/89eb09307fbc..2933d3126969

2022-05-18 capn@google.com Revert "Temporarily fix failing dEQP tests"
2022-05-18 sugoi@google.com Fix handling of dynamic vertex stride

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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I5e0e27f80fff2ac08827234e150fb4a52459e815
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541793
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-19 04:51:31 +00:00
James Godfrey-Kittle
5f1d2f52d3 [graphite] Add 8-stop gradients
Bug: skia:13302
Change-Id: Id9927ffadfbbbc5578491284969736e3b5f60f26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541725
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-05-18 22:24:50 +00:00
Ben Wagner
884d45926d Add controls to fontscalerdistortable gm.
This allows the user to override the waterfall with sliders for each of
the axes in the typeface.

Change-Id: Iddb8a7c97d69c65994a707f14c43d6b1dc3f3cd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541743
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-05-18 21:10:20 +00:00
Brian Osman
9c34707e2a Remove most uses of ES3Options, in favor of #version 300
Bug: skia:11209
Change-Id: I89d97bce1934a985c1efed602680dd534702a800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541072
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-05-18 20:56:55 +00:00
John Stiles
b6b7898599 Remove program setting fAssertDSLObjectsReleased.
This setting was meant to detect errors in hand-authored DSL programs,
where a DSL expression or statement object was instantiated but wasn't
actually added to the program.

The DSL parser always disabled this flag. We don't plan on creating
large hand-crafted DSL programs going forward. Also, if you fail to add
an expression/statement to your program, your program will be missing
part of its code, which is already pretty self-evident as errors go.

Change-Id: I4c7b89d1f05cc65dc84948d98da8d6576c1be244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541739
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-18 20:31:49 +00:00
Brian Osman
b7d4cebf08 Make GrCaps and graphite::Caps derive from SkCapabilities
Move allocation of Caps::fShaderCaps to the base class,
and add a finishInitialization method, like GrCaps.

Change-Id: I5353a03afea29390be3cce1fb371374532f5af3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541073
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-05-18 20:25:25 +00:00
John Stiles
4ea5837249 Remove unrolled-loop path from gaussian convolution effect.
This only existed for ES2 devices, which can now use the fixed-length
loop approach.

Change-Id: I8042c0baa89539cad47a4ee321eafa5fa0a33879
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541071
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-18 17:54:37 +00:00
skia-autoroll
1f302f418c Roll vulkan-deps from b190c10e0804 to f39cf68e03c2 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/b190c10e0804..f39cf68e03c2

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I052f089d4e4f778e19277c880e313a386a948b32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541782
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-18 17:34:48 +00:00
Brian Salomon
54190a59b3 Manual Dawn roll from ab9757036bd6 to 34d2d1ba0273
https://dawn.googlesource.com/dawn.git/+log/ab9757036bd6..34d2d1ba0273

Change-Id: I887b36df9383c4b2da8bf17e61d775eecefbb84e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541738
Commit-Queue: Arman Uguray <armansito@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
2022-05-18 17:07:32 +00:00
Arman Uguray
e435bd7c9b [sksl] Add SK_POINTSIZE_BUILTIN constant
GLSL, Metal, and WGSL code generators now determine the sk_PointSize
builtin by modifier value instead of by name. Also updated GLSL code
generator to use SK_POSITION_BUILTIN when processing sk_Position.

Change-Id: I57418f66786dd2bac8c4a7d8c34f83221daf505c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541719
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-18 16:57:15 +00:00
James Godfrey-Kittle
6fc86db5e4 [graphite] More 4-stop gradient tile modes
This splits out the functionality for tiling and colorizing. It passes
t-values around in a manner similar to ganesh in which we actually pass
around a float2 containing t as x and a valid flag (1 or -1) as y, and
if the t is invalid then the colorizer will discard the fragment.

Bug: skia:13302
Change-Id: I901c0f1f6a2c4ffff6b8e3c05d339843d6184086
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541420
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-05-18 16:31:49 +00:00
John Stiles
e76f507164 Remove variable-declared flags from DSLVarBase.
The DSLVarBase `fDeclared` field was used to track whether a variable
was created with `Var`, but never declared with a matching `Declare`, in
a hand-authored DSL program. This was expected to be a common source of
slip-ups in hand-authored DSL, so we tracked it and printed a handy
error message if `Declare` was ever missing. However, this complicated
testing, because in tiny test snippets we _do_ want the ability to
create variables without necessarily declaring them. So, we had a
separate program setting to disable enforcement for test code.

For programs created in DSLParser, tracking this state is unnecessary;
the parser won't ever forget to declare variables.

Since hand-authored DSL programs are no longer expected to be
commonplace, we can remove the state tracking and the associated
ProgramSettings field entirely.

Change-Id: I32b28f8a2ca6591d3da80cd974fff8101f5a4be8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541638
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-05-18 15:54:42 +00:00
John Stiles
d35e9151bc Remove automatic name mangling from DSL.
This feature is always disabled when DSLParser is used. Name mangling
was only useful when compiling hand-authored DSL code that explicitly
declared two variables with the same name in separate scopes. In
practice, as long as we aren't declaring complete programs in DSL form,
we don't need this.

Change-Id: Icad921eb86365b3b114ff1872b1c40c41470a4b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541637
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-05-18 15:54:42 +00:00
Robert Phillips
6b0e8256aa [graphite] Begin mutating PaintCombo to be more encapsulated
The end goal for the PaintCombo is that it is opaque to the user and
generated via a CombinationBuilder object.

Bug: skia:12701
Change-Id: I0ca6fb52207e85c444f2ddbcb43f7cf90bcafb34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540746
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-18 15:39:19 +00:00
skia-autoroll
89435f5e91 Roll SK Tool from cf91dbbeb288 to eb657a60db81
https://skia.googlesource.com/buildbot.git/+log/cf91dbbeb288..eb657a60db81

2022-05-18 jcgregorio@google.com Speed up RBE jobs with "--sandbox_base=/dev/shm".
2022-05-18 jcgregorio@google.com [perf] skfe for angle-perf.skia.org
2022-05-18 jcgregorio@google.com Speed up RBE jobs.
2022-05-17 rmistry@google.com Update prober expectations
2022-05-17 jcgregorio@google.com [skolo] Add sky@google.com to skolo authorized keys.
2022-05-17 kjlubick@google.com [infra] Remove ChOps CIPD gsutil package

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC jcgregorio@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Tbr: jcgregorio@google.com
Change-Id: I37dedb97d51bc5b3faff1e498860b88a8657e608
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541777
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-18 15:30:18 +00:00
Ravi Mistry
f30602e8d0 Update SKPs documentation link
Change-Id: I4bc1e4c331029d0939fa28910c6cbbc9697d666d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541721
Reviewed-by: Herb Derby <herb@google.com>
2022-05-18 15:21:44 +00:00
John Stiles
6162ea9f4a Restructure gaussian blur code to avoid ES3 requirement.
Previously, our kernel and offset data was stored in two separate arrays
of half4. Now, they are interleaved into one array of half2. This allows
us to index into the data without complex control-flow or extra ALU ops
per sample. This change would allow us to use the "fixed-length loop"
path on ES2 hardware, assuming it's no slower.

Change-Id: I65c5b4c74475ca03f12d86f8896af2f95a059635
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541070
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-05-18 15:08:49 +00:00
Arman Uguray
839a0b64fa [sksl][wgsl] Field access and test for vertex stage builtins
* Added support for field access expressions, excluding user-defined
  interface blocks.
* Added a test case for vertex stage builtin declarations.
* Added a NOP workaround for sk_PointSize which does not have a
  WGSL/WebGPU equivalent.

Bug: skia:13092
Change-Id: I46fd7bb0a9fe55d2e3ed2b3b72f63376c1ed4f31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539082
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-05-18 15:01:59 +00:00
Kevin Lubick
606876995e [infra] Fix dangling Python2-specific issues
subprocess.check_output needs encoding or it defaults
to bytes.

Python 3 has / be float division and // be integer
division.

The skpbench fix is speculative.

Change-Id: I13d0e976c03bba30761c8ab533e6fdd041b795c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541696
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-05-18 14:37:02 +00:00
John Stiles
90627c83c1 Avoid potential for division by zero in sk_clamp_grad_4.
Based on the structure of the checks, there's no way to enter an if
block if the denominator of the division would be zero.

Change-Id: I252c05aab43f26984afa2eab89648d5ec4e280b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541074
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
2022-05-18 14:24:23 +00:00
John Stiles
a72ce38927 Remove unused Retain method.
This was removed from the DSLSymbols header when DSLParser first landed
(see http://go/skiareview/c/skia/+/400622/55/include/sksl/DSLSymbols.h)
but not removed from the cpp file. It appears to have been unused ever
since then.

Change-Id: Iaa948c62f7e8f5530c6a27f65e7f4e74919cf966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541636
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
2022-05-18 13:53:26 +00:00
John Stiles
91e4c7847e Remove C++14 workaround code.
We no longer support compiling in C++14, so we don't need these
workarounds anymore.

Change-Id: Idec5a90e98c242928182f4b32dd47459be8ca47f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541075
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-18 13:53:00 +00:00
John Stiles
4b354dfb5b Revert "Remove operator= from DSL expression types."
This reverts commit b143520625.

Reason for revert: might have caused chromium:1326848

Original change's description:
> Remove operator= from DSL expression types.
>
> This means that in raw DSL code, `foo = bar` will need to be written as
> `foo.assign(bar)`. This is admittedly slightly less convenient. However,
> in practice, raw DSL code is very rare, and in fact we only had one
> use-case for operator= across all of our code. This change will allow us
> to simplify the DSL parser by eliminating the `DSLWrapper` helper class,
> which was only needed because we overloaded `operator=`.
>
> Change-Id: I4fbc39b2c1443fc26a761d424c52e3b9b59169eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541062
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: I7c7e032c465aba004ba78fd69650c8037e019861
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541737
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-05-18 13:22:08 +00:00
John Stiles
37c03c8d73 Revert "Remove DSLWrapper helper class."
This reverts commit 3b4f862d05.

Reason for revert: might have caused chromium:1326848

Original change's description:
> Remove DSLWrapper helper class.
>
> Without an `operator=` on our expressions and variables, we no longer
> need to wrap all our expressions with a helper.
>
> Change-Id: I8110079f61c9ad01997f7c4b376db223dc4b6e17
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541063
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: I7efb3004913f7c85dc551d9740a6b31971de52d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541736
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-05-18 13:21:07 +00:00
skia-autoroll
4293425ae0 Roll ANGLE from 807c94ea85e0 to c649979b7f2f (10 revisions)
807c94ea85..c649979b7f

2022-05-18 penghuang@chromium.org Create EGLImage from VkImage correctly with non sized format
2022-05-17 romanl@google.com Add more tips about recovering the qpa file.
2022-05-17 romanl@google.com Clarify that angle_debug_package is necessary to load the apk
2022-05-17 yuxinhu@google.com Suppress the failing egl test to unblock roller
2022-05-17 antonio.caggiano@collabora.com Vulkan: Fix Wayland surface size queries
2022-05-17 senorblanco@chromium.org D3D: minor cleanup of gl::RangeUI usage.
2022-05-17 antonio.caggiano@collabora.com Vulkan: Multiple DRM formats
2022-05-17 gert.wollny@collabora.com Capture/Replay: Also limit the number of per shader SSBOs
2022-05-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 131de3fd9ec7 to c37d1e2ab98c (2 revisions)
2022-05-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 11b60f867851 to 73ffbbeac851 (445 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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/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: jmbetancourt@google.com
Change-Id: I2d6455ac966e94c9b4c7bbb3423075135659d4cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541504
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-18 05:54:18 +00:00
skia-autoroll
4847ce6a26 Roll vulkan-deps from a007583f62b5 to b190c10e0804 (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/a007583f62b5..b190c10e0804

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools from c5d859fbe327 to a9bee4cbb2fc

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I1125d705e889d91715485763462962a81cbacd16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541656
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-18 04:53:28 +00:00
skia-autoroll
fef7134460 Roll SwiftShader from 4011ab35f3d8 to 89eb09307fbc (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/4011ab35f3d8..89eb09307fbc

2022-05-17 swiftshader.regress@gmail.com Regres: Update test lists @ 7654b866
2022-05-17 swiftshader.regress@gmail.com Regres: Update test lists @ 4011ab35
2022-05-17 capn@google.com Eliminate conditional MemorySanitizer instrumentation build flag

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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I31e625f81ad16dda0ccaf7072e4b8f96ccfbaa6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541505
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-18 04:50:02 +00:00
Arman Uguray
02888a6f0a [sksl][wgsl] Support simple assignment
- Add support for simple assignment expressions, as well as swizzle,
  variable references, and type conversion constructors to support
  simple assignment test cases that reference built-ins and local variables.

- Handle a case where the type of a SkSL built-in differs from its WGSL
  counterpart and emit a type cast when such a variable gets referenced.

- Add additional test cases for supported WGSL features that could not
  be tested without simple assignment support.

Bug: skia:13092
Change-Id: Ib1ff3bcef60e436c9be5c08236c9fe4de02dd005
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538420
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-18 02:25:29 +00:00
Arman Uguray
5235b3df42 [sksl][wgsl] Add @interpolate(flat) annotation to integer IO
WGSL requires that pipeline stage IO parameters that are scalar or
vector integers be annotated with the "flat" interpolation attribute.

Bug: skia:13092
Change-Id: I2930da6cf468ac8cd9ccaca0004e5849065411dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538419
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-17 21:43:23 +00:00
Kevin Lubick
52b040968a [infra] Remove Python2 when running CI tasks
This is similar to https://skia-review.googlesource.com/c/buildbot/+/538218

BIG CHANGE: If we fail to download uninteresting hashes
(because Gold is down or the script otherwise fails), we
now crash/fail our Test-* tasks. In an early version of
this removal, that lack of failure masked an issue with
the script (urllib2 is not in Python3) and nearly would
have landed. Failing loudly is better, IMO.

This removes the symbolize_stack_trace script, which
stopped working with Python3 for reasons unknown.
If we need the behavior, we can rewrite it.
Relatedly, we removed 4 jobs, the Docker ones, because
we will not get much value out of them as we migrate
towards Bazel and removing the symbolization script
was tricky to get right.

There are a few cleanups around copypasta that I noticed
when combing through the recipes.

Change-Id: I8dfab416e964fd494267800b4ebe216061895f19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538636
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2022-05-17 20:26:48 +00:00
Michael Ludwig
11c0ca2833 [graphite] Use scalar constructor in Rect::Infinite
Change-Id: I38d16569a9270ac359d3c3ba4eb1045e805f7638
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541419
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-17 20:03:24 +00:00
Kevin Lubick
8ae4efb2b5 [infra] Create and use CIPD package for gsutil
The version in CIPD is 4.46, which has the following
issue when run in Python 3:
https://github.com/GoogleCloudPlatform/gsutil/issues/961

This asset uses the latest version, 5.10, which *only*
supports Python 3.

Our gsutil recipe module had some "Windows-specific"
behavior that was actually running on Linux and needed
to be changed because it was using Python2 to run
gsutil.

Change-Id: I6884b9b6fcc600351a8e608dc9e3c0114907a586
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541220
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-05-17 19:42:58 +00:00
Robert Phillips
cb3009126d [graphite] Add entry point for registering SkBlenders w/ the Context
This just adds the API. Additional work will be required to actually
create an SkShaderSnippet for the runtime effect.

The SkBlenderID will be used in the combination system to specify the
Blender runtime effect as a combination candidate.

Bug: skia:12701
Change-Id: I524a2fa7a00ece6d9422891bcbc82ce0237679e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540170
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-17 19:34:15 +00:00
Arman Uguray
b2b1d6553e [sksl][wgsl] Prevent empty pipeline stage structs
1. It is illegal to declare an empty struct in WGSL. The codegen no longer
declares an empty struct for pipeline stage inputs and outputs if the
program does not reference them.

2. WGSL requires that every vertex program declare a @builtin(position) output.
The codegen now emits this pipeline stage output even for an empty
program that doesn't assign to sk_Position. This allows unit tests for
vertex programs to be authored without unnecessary boilerplate.

Bug: skia:13092

Change-Id: Ib023200e2ba13acf96859817249686d7f815cb00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538418
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-17 19:23:32 +00:00
Arman Uguray
c1504658a7 [sksl][wgsl] Enable WGSL validation using Tint
- Introduced the SK_ENABLE_WGSL_VALIDATION macro which is currently only
  enabled when skslc gets compiled when using the `skia_compile_sksl_tests`
  setting.
- SkSLCompiler::toWGSL now validates its output using Tint's WGSL reader
  structures based on conditionally compiled code depending on the
  SK_ENABLE_WGSL_VALIDATION flag.
- Fixed `warning: use of deprecated language feature: struct members should be separated with commas"
  warnings that were generated for HelloWorld.wgsl.

Bug: skia:13092
Change-Id: Ib894457030004966221faf82f61360e390b95e22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537802
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-17 18:25:01 +00:00
Herb Derby
dc5e3d8dcf Update GrTextBlob::Key to use SkStrikeDeviceInfo
Change-Id: Ie121fd3b3487fe36e0e640d2b3ef02bd629a4f55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541067
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-17 18:24:10 +00:00
Michael Ludwig
5c08e3c357 Standardize on skvx aliases, plus clean-up
This adds aliases like skvx::float2, float4, etc. to SkVx.h and goes
through existing usages of SkVx to standardize on those aliases, or
refer to the full name directly.

In particular, this lets us clean up the equivalent aliases in
src/gpu/tessellate, src/gpu/graphite/VectorTypes and src/gpu/ganesh/GrVx

Where possible, I switched to using skvx::Foo directly and leveraged
auto to make it less redundant. Headers always used the full type
except for PatchWriter.h and Rect.h because of the number of their
usages. In this case, the alias is scoped to private so it can't leak.

This is prep to migrate older code that is still using SkNx and its
aliases like Sk4f to SkVx as well.

Change-Id: I9dd104e83cf17c2b88995a047cfd2e2b0fe6fac2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-17 18:04:55 +00:00
Kevin Lubick
8d9d9fa93a [bazel] Add Presubmit to remind devs about adding/deleting files.
Bug: skia:12541
Change-Id: Idc8f9e721dc172d4ff2b4884d36363a882293ee6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541416
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-05-17 18:01:58 +00:00
skia-autoroll
94d7609696 Roll vulkan-deps from c37d1e2ab98c to a007583f62b5 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/c37d1e2ab98c..a007583f62b5

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers from 33d4dd987fc8 to 1b4f46a3cc69

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I12021dc109d086bb8426520495720aa328cab1ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541280
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-17 16:11:46 +00:00
Brian Osman
c2d42fe243 Add #version directive to SkSL
ProgramSettings now has a fRequiredVersion, based on the #version
directive (if any). There is plenty more to do, and this is an
intermediate state where the "fEnforceES2Restrictions" bool still
exists. Eventually, that will go away, or change into a check between
the required version and the SkCapabilities supplied (also in
ProgramSettings).

As a proof-of-concept, this migrates some use-cases to insert the new
version directive, and unlock ES3 features in some tests and benches.

Bug: skia:11209
Change-Id: I964975931039588d7a302bfedd09246e3d4a79d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540037
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-17 15:42:31 +00:00
Herb Derby
371173e228 Fix gn for DSLWrapper.h
Change-Id: Id6e4d82d96f6393c70866bcc8430d4f088d2ad2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541066
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-17 15:15:58 +00:00
Herb Derby
28dbc107d5 Have categorizeGlyphRunList take SkStrikeDeviceInfo
Remove the unneeded device information from the Painter. Flow
the device info where needed in the code.

Change-Id: I31f79979a0e8f4d41ea942ea9c7052fbe83cd330
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541059
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-17 15:15:52 +00:00
Michael Ludwig
83887e4fe5 Add helper functions to compute vertex counts from LinearTolerances
This eliminates duplicate code and gives a consistent API between the
three tessellation approaches, which will let the graphite
PatchAllocators be generalized into a template that takes a
FixedCountFoo.

Bug: skia:13056, skia:13012
Change-Id: I556822b43807c14c2e4e5c919f60cb766d43f6fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537456
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-05-17 14:50:01 +00:00
Michael Ludwig
d325dbd05f Rename tess's pow2 and pow4 suffixes to p2 and p4
Consolidates some other constants, removes the pow2 and pow4 functions
that just computed `x*x` or `x*x*x*x`. Moves the `mix` function into
PatchWriter since that's the only place it's used.

Change-Id: Idaaba40f1007e1f0331ec8d335e6afbe69ddfbad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-17 14:45:33 +00:00