Commit Graph

24 Commits

Author SHA1 Message Date
Kevin Lubick
a74ebc9bac [bazel] Use exec_tools instead of tools for better RBE compatibility
The tools in genrules [1] correspond to the HOST's version, which
is a problem if we are doing cross-platform builds. In this case,
when I was using my M1 Mac to run on a Linux RBE platform, the
Mac's python binaries (e.g. python3_9_aarch64-apple-darwin/bin/python3)
were being uploaded to RBE and attempted to be used, which resulted
in OSError: [Errno 8] Exec format error because the won't run
on the Linux RBE machine.

Thanks to tjgq@, I learned about exec_tools [2], which will use
the version of the tools for the EXECUTION platform, which
is exactly what we want.

While debugging this, I added a minimal reproduction case in
//experimental/bazel_test and updated the py_tools version
in an effort to diagnose the issue further.

We will need to contribute similar fixes to @spirv_tools

[1] https://bazel.build/reference/be/general#genrule.tools
[2] https://bazel.build/reference/be/general#genrule.exec_tools
Bug: skia:12541
Change-Id: Ib14deb4e326d3103fd08c21e93afe342d751c17a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554518
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-30 18:02:35 +00:00
Michael Ludwig
9b88c8b66c Manual dawn roll
Bug: skia:13477
Change-Id: I524e076282e9dde3a8ad5d39c58e6054f684fbf0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554376
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2022-06-29 15:02:34 +00:00
Kevin Lubick
c7b407553b [bazel] Replace -isystem with -I for copts
MSVC and clang-cl do not recognize -isystem, but do recognize
-I. Thus if those compilers use our rules, we want our copts
to be maximally compatible.

Some of these options didn't seem to do anything, so I removed
them rather than replace them.

Change-Id: I73feb63d5c682a6df646d731b10ca2509e105e6f
Bug: skia:12541, b/237076898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553878
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-28 17:16:42 +00:00
Michael Ludwig
9d10f64104 Manual dawn roll
Change-Id: Id6efc88e2d048ade8aa2c0e7870c0bc73b1afcf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553537
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-06-27 19:09:52 +00:00
Kevin Lubick
86678ed625 [bazel] Add option for SkSVGCanvas (and expat third_party DEP)
Our SVG code depends on our XML code which depends on expat.

See also cl/457481999

Change-Id: I83b61f5d73570d0aa7e851a01ccd019b4b1019e4
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553376
Reviewed-by: Florin Malita <fmalita@google.com>
2022-06-27 15:56:55 +00:00
Kevin Lubick
cc91f7d709 [bazel] Fix toolchains on M1 Mac
These changes are necessary to use the toolchain on both the
M1 Mac and Intel Macs.

This adds a way to detect the host platform and choose different
compile options in the toolchain.

We cannot statically link in libc++.a from the clang zip because
it appears to be x64 only.

Finally, this fixes copts not being passed to objective c libraries.

Known issue:
 - Intel Mac building has an error about the default CC toolchain.

Change-Id: Ie8e5e83dc41513563ac684e70a8a6947b36df445
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552472
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-27 14:02:49 +00:00
Kevin Lubick
530759a6af Manual Dawn Roll
Required https://dawn.googlesource.com/dawn/+/77bf233cef236a094ef845d8f1a31073c2ddd7b9 and
https://dawn.googlesource.com/dawn/+/7223a5e7c9e122179e17f4faab6115e116c7ced3
to land, and for us to update our GN rules appropriately.

Change-Id: I5dad6bbd6e103405de16d7744f0c1c33fae9e0fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551857
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-06-23 12:39:45 +00:00
Nicolette Prevost
29dffe9ba4 Reland "Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class"
This reverts commit d78d52a86f.

That reason this CL was reverted in the first place is that it broke the Android roller - perfetto.h could not be located.
We now disable the use of perfetto for Android in the gn_to_bp.py script, so the roller should be good to go.

Reason for revert: Relanding

Original change's description:
> Revert "Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class"
>
> This reverts commit bfc9b94840.
>
> Reason for revert: new dependency causing Android build error
>
> Original change's description:
> > Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class
> >
> > First incremental step to incorporating Perfetto tracing into Skia, more CLs to follow
> >
> > NOTE: The presubmit check is failing. This appears to be due to the known issue where the presubmit check bugs out if the DEPS file is edited, which it was on this CL (modified to include Perfetto).
> >
> > Bug: skia:13303
> > Change-Id: I908be0392b520e8da14b34588b842bf6d955bd93
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543081
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Nicolette Prevost <nicolettep@google.com>
>
> Bug: skia:13303
> Change-Id: Ia2b883bbab1f8fb4f3914b63104a39240cc60e86
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544239
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Auto-Submit: Tyler Denniston <tdenniston@google.com>
> Reviewed-by: Nicolette Prevost <nicolettep@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>

Bug: skia:13303
Change-Id: Ibd369b9c8c0e69fc9615fc05cf588ee4440c8ed5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544244
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Nicolette Prevost <nicolettep@google.com>
2022-06-15 16:35:05 +00:00
Kevin Lubick
91f158c825 Manual roll of Dawn
gpu_info.json was moved

Change-Id: Ica01030b6d081e440264398590f895cc79ada072
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549056
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-10 15:19:33 +00:00
Kevin Lubick
94f90622eb Manual Dawn Roll
We decided to be ok with an empty version because caching
shader compilations is not that much overhead compared to
the rest of the backends that just have to redo them.

Change-Id: I995b3c75a7e723a1188184f8753450634fa0b629
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548356
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-08 18:17:28 +00:00
Kevin Lubick
1e5eab37e1 Manually Roll Dawn from 232abaefc35d to c3c3bf538f07 (10 revisions)
https://dawn.googlesource.com/dawn.git/+log/232abaefc35d..c3c3bf538f07

2022-06-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ee0d0b41a626 to 19e3080dfe86 (8 revisions)
2022-06-03 dsinclair@chromium.org Add parsing of shorter stage attributes.
2022-06-03 enga@chromium.org Rename CachedBlob -> Blob; move to own file
2022-06-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 67a8c19843a1 to bbf67e2e41d8 (4 revisions)
2022-06-02 yunchao.he@intel.com Rename GetMipLevelSize
2022-06-02 shrekshao@google.com Pipeline cache D3D12 backend impl
2022-06-02 bclayton@google.com tint: Add builtin tests for arguments passed by var
2022-06-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1bf3ae22a00d to ee0d0b41a626 (1 revision)
2022-06-02 cwallez@chromium.org Remove wgpu::ExternalTextureDescriptor::colorSpace
2022-06-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from b03f278925c6 to 67a8c19843a1 (12 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC lokokung@google.com on the revert to ensure that a human
is aware of the problem.
Change-Id: I05e3c2c8a4a28ce4501f6639115c5148f9558a12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546606
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-06-03 13:53:38 +00:00
Kevin Lubick
455addeff6 [bazel] Add 4 CI jobs, 1 CQ job to test Bazel builds
Needed to fix the Dawn and Harfbuzz Bazel rules.

Change-Id: I21f63c970bdc972b97e42ef85d82d7f478bd45e2
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545721
Reviewed-by: Eric Boren <borenet@google.com>
2022-06-02 12:36:28 +00:00
Kevin Lubick
61f0ea4f7a [bazel] Move remaining codec build rules to //bazel/external
There are no functional changes to the rules, just a relocation.

Change-Id: I90af5ec792fc54ce2978b0bbb1afd2c932e183b4
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545719
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-06-01 19:12:14 +00:00
Kevin Lubick
3aed21ce0e [bazel] Fix Dawn rules (new generated files)
Corresponding Dawn change: https://dawn-review.googlesource.com/c/dawn/+/90962

Change-Id: Ib9d2163c7874b7fb9fb5ab88de6d96a133c4ecbd
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545718
Reviewed-by: Arman Uguray <armansito@google.com>
2022-06-01 18:02:30 +00:00
Kevin Lubick
97caefd055 [bazel] Move zlib and libpng out of //third_party/BUILD.bazel
I had to copy some config_settings out of //bazel/common_config_settings
because these are now treated as separate entities and cannot
see that file.

For libpng, note that we use a genrule to create the
pnglibconf.h instead of pointing to one somewhere else.
This ended up being easier than other things I tried.

Another approach would be to not depend on the version
in third_party/externals, but to clone it via
new_git_repository [1] and apply a patch that creates
the configuration file.

[1] https://bazel.build/rules/lib/repo/git#new_git_repository

Bug: skia:12541
Change-Id: I9a284775dc0f2bdabb145518d5f0803c74fb99fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545368
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-06-01 12:19:01 +00:00
Kevin Lubick
956704b387 [bazel] Get GPU examples working
This adds targets which test our Dawn, GL, and Vulkan backends.

It follows the hierarchical filegroup pattern, as
outlined in https://skia-review.googlesource.com/c/skia/+/543977

Suggested Review order:
 - tools/sk_app/BUILD.bazel. For many things in tools, I anticipate
   they will depend on //:skia_core and other //tools targets.
   sk_app shows this off, as well how to make the target
   specific to a given platform and pull in the proper native code.
   I'm trying out setting test_only = True, to see if we can
   partition Skia's tests and helpers from the actual Skia library.
 - other changes to //tools/, especially looking at sk_app's
   dependencies.
 - //example/BUILD.bazel. This uses the cc_binary_with_flags which
   existed previously [1] to make it so people don't have to
   specify all the flags for a given binary and can build it as is.
   These targets nows how up in //bazel/Makefile
 - //include/... and //src/..., where some typos from previous
   CLs were fixed and rules expanded.
 - Misc changes to .cpp files to remove unnecessary includes
   that were assuming the GL backend was being compiled in.
 - All other changes

[1] 162dfca340/bazel/cc_binary_with_flags.bzl
Change-Id: Ieacec464d44368cad0da0890c7dc85a6c0b900c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544317
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-05-31 14:14:54 +00:00
Kevin Lubick
27d842a14c Manual roll of dawn
Change-Id: Ic6c4e6d4cec11c7ea0053d260f5022b6978ace4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544396
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2022-05-26 18:09:26 +00:00
Tyler Denniston
d78d52a86f Revert "Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class"
This reverts commit bfc9b94840.

Reason for revert: new dependency causing Android build error

Original change's description:
> Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class
>
> First incremental step to incorporating Perfetto tracing into Skia, more CLs to follow
>
> NOTE: The presubmit check is failing. This appears to be due to the known issue where the presubmit check bugs out if the DEPS file is edited, which it was on this CL (modified to include Perfetto).
>
> Bug: skia:13303
> Change-Id: I908be0392b520e8da14b34588b842bf6d955bd93
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543081
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Nicolette Prevost <nicolettep@google.com>

Bug: skia:13303
Change-Id: Ia2b883bbab1f8fb4f3914b63104a39240cc60e86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544239
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Auto-Submit: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Nicolette Prevost <nicolettep@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2022-05-26 16:21:27 +00:00
Nicolette Prevost
bfc9b94840 Add Perfetto library (gn & bazel) and bare-bones SkPerfTrace class
First incremental step to incorporating Perfetto tracing into Skia, more CLs to follow

NOTE: The presubmit check is failing. This appears to be due to the known issue where the presubmit check bugs out if the DEPS file is edited, which it was on this CL (modified to include Perfetto).

Bug: skia:13303
Change-Id: I908be0392b520e8da14b34588b842bf6d955bd93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Nicolette Prevost <nicolettep@google.com>
2022-05-25 14:50:57 +00:00
Michael Ludwig
230c535dfe Manual dawn roll
Change-Id: Ib4f2ae63ceee424eb93d098c7cd65e6ea8ac92f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543056
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-05-23 16:22:20 +00:00
Brian Salomon
6ba1e8dd95 Manual Dawn roll from 34d2d1ba0273 to 4bdded68d58d (34 revisions)
https://dawn.googlesource.com/dawn.git/+log/34d2d1ba0273..4bdded68d58d

2022-05-19 zhaoming.jiang@intel.com Dawn: vertex buffer never OOB with zero stride count draw/Indexed
2022-05-19 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 4dc9c79e0cf7 to d3eb61d4a054 (15 revisions)
2022-05-18 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 89eb09307fbc to 2933d3126969 (2 revisions)
2022-05-18 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b190c10e0804 to b0e4ff85c2aa (4 revisions)
2022-05-18 bclayton@google.com tint: Refactor Extensions / Enables.
2022-05-18 bclayton@google.com tint: Implement abstract-numeric overload resolution
2022-05-18 amaiorano@google.com tint: Fix use-after-free
2022-05-18 bclayton@google.com tint: intrinsics.def Support [[precedence]] decoration
2022-05-18 cwallez@chromium.org Temporarily mark requestDevice_limits as failing.
2022-05-18 cwallez@chromium.org Directly enable -Wglobal-constructors
2022-05-18 amaiorano@google.com tint: Validate that sampled texture type must be f32, i32, or u32
2022-05-18 enga@chromium.org Fix multiple device leaks in dawn_end2end_tests and dawn_unittests
2022-05-18 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 93c0c90db873 to 4dc9c79e0cf7 (4 revisions)
2022-05-18 cwallez@chromium.org Remove expectations for passing WebGPU CTS tests
2022-05-18 bclayton@google.com expectations.txt: Remove rules for passing tests
2022-05-18 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 5d184f5765ff to b190c10e0804 (3 revisions)
2022-05-18 bclayton@google.com tint: Add sem::Type::ConversionRank()
2022-05-18 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 80de201a2a13 to 89eb09307fbc (2 revisions)
2022-05-17 bclayton@google.com tint: IntrinsicTable: Rename open/closed -> template
2022-05-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 807c94ea85e0 to 93c0c90db873 (7 revisions)
2022-05-17 bclayton@google.com tint: Simplify sem::Constant::Scalar
2022-05-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c37d1e2ab98c to 5d184f5765ff (4 revisions)
2022-05-17 bclayton@google.com tint: Cleanup of IntrinsicTable
2022-05-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4011ab35f3d8 to 80de201a2a13 (1 revision)
2022-05-17 amaiorano@google.com gitignore /build-*
2022-05-17 amaiorano@google.com tint: limit expression depth to avoid stack overflow in backends
2022-05-17 cwallez@chromium.org Roll third_party/webgpu-cts/ bf5409992..e518bfe8a (3 commits)
2022-05-17 bclayton@google.com Kokoro: Log disk utilization in status message
2022-05-17 cwallez@chromium.org Only checkout our own clang-tidy if in standalone builds
2022-05-17 jrprice@google.com tint: Fix edge for CallSiteRequiredToBeUniform
2022-05-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 36f5e6ce5508 to 807c94ea85e0 (6 revisions)
2022-05-17 kainino@chromium.org Reland "[chromium-style] Adding constructors and destructors."
2022-05-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b5c0eec3336c to c37d1e2ab98c (1 revision)
2022-05-17 kainino@chromium.org Enable -Wglobal-constructors for dawn/native

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

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/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-Debug-Dawn
Bug: None
Change-Id: If19992616124865e608440fbb37cfd37fb58af75
Tbr: cwallez@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542143
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-19 20:56:01 +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
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
Kevin Lubick
16fa353926 [bazel] Move third party BUILD.bazel files to bazel/external
See also http://cl/449188526

Change-Id: Idb775cd955c82f16c79a61bb3d417c2c92f88a88
Bug: skia:12541, skia:13323
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541217
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-05-17 12:13:49 +00:00