Go to file
Kevin Lubick 14abec45f0 [bazel] Add support for Dawn (via Vulkan)
sk_app has existing support for Dawn on top of Vulkan, and
this adds support to build //example:hello_world_dawn and
get this to run on Linux.

Dawn depends on Tint and abseil-cpp. Tint further depends on
spirv_tools and spirv_headers (for writing to the SPIR-V format).
Dawn and Tint only have GN and CMake support, so we need to make
our Bazel rules for them (see //third_party/BUILD.bazel).

abseil-cpp and the SPIR-V libraries have Bazel support, so we
can just include them (see //WORKSPACE.bazel). It is important
that @spirv_headers be called that exactly because @spirv_tools
depends on it by that name.

The hand-crafted cc_library rules for Dawn and Tint were produced
by reading the appropriate GN files and using the parts necessary
for a supporting Vulkan+Linux. If we use Dawn for other backends
(e.g. WebGPU), we will need to expand the Bazel rules. One day,
we might contribute the Bazel rules to Dawn and Tint so they
can support them and avoid breaking us if new files are added.

Suggested Review Order
 - bazel/common_config_settings/BUILD.bazel to see introduction
   of new select-able option "has_gpu_backend" which cleans up
   some of our code that is enabled for any GPU backend.
 - src/*/BUILD.bazel to see has_gpu_backend rolled out.
 - WORKSPACE.bazel to see DEPS declared there (using the files
   in third_party/externals, which are brought in via
   tools/git-sync-deps).
 - third_party/BUILD.bazel which adds Dawn and Tint rules.
   It may be helpful to look in third_party/externals for
   the Dawn [1] and Tint [2] GN files. Especially interesting
   are the Python scripts [3] Dawn uses to generate some
   header and source files.
 - All other files.

[1] https://dawn.googlesource.com/dawn/+/d9f22ce0346b222759d5510be3d1cd93caa5ab86/src/dawn/native/BUILD.gn#183
[2] https://dawn.googlesource.com/tint/+/453d5ae84ec30ab51ac592c13d472412ae8b5fc9/src/tint/BUILD.gn#174
[3] https://dawn.googlesource.com/dawn/+/d9f22ce0346b222759d5510be3d1cd93caa5ab86/generator/dawn_json_generator.py#774
Change-Id: Ied5b162045d8e841b9666457f0158457e2b078d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516996
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-22 13:05:52 +00:00
bazel [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00
bench [graphite] Add support to nanobench for Graphite. 2022-03-14 20:10:30 +00:00
bin Handle 'aarch64' from platform.machine() 2022-03-01 13:10:59 +00:00
build/fuchsia [fuchsia] Fix fidlc command. 2020-06-10 03:29:24 +00:00
build_overrides Add Abseil dependency for Dawn 2021-09-22 22:05:32 +00:00
client_utils/android Make class members that are static constexpr also be inline. 2021-10-11 16:22:59 +00:00
demos.skia.org [canvaskit] Add in fillText to spreadsheet demo for comparison 2022-02-15 15:35:43 +00:00
dm test slugs by converting blobs to slugs in drawTextBlob 2022-03-21 17:17:04 +00:00
docker [canvaskit] Enable Debugger bindings for autobuild 2022-03-08 17:42:37 +00:00
docs/examples Reland "Add kR8_unorm_SkColorType" 2022-02-10 18:00:19 +00:00
example [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00
experimental [graphite] Implement convex wedge tessellating renderer 2022-03-22 01:47:08 +00:00
fuzz Reland "[includes] Remove link between SkImage.h and SkImageEncoder.h" 2022-03-10 04:47:51 +00:00
gm [bazel] Fix/update rules 2022-03-21 17:19:54 +00:00
gn Rename ES2 error tests from 'C' through 'G' to .rts. 2022-03-21 22:50:58 +00:00
include [graphite] Share Path[Curve|Wedge|]Tessellator sources between graphite and ganesh 2022-03-21 18:50:53 +00:00
infra Trigger all Graphite bots when a change lands in experimental/graphite/.* 2022-03-22 12:28:34 +00:00
modules [includes] Enforce IWYU on sksl code 2022-03-21 12:43:02 +00:00
platform_tools Add SkSL error tests that use Android RuntimeShader. 2022-03-21 14:07:42 +00:00
resources Rename ES2 error tests from 'C' through 'G' to .rts. 2022-03-21 22:50:58 +00:00
samplecode Reland "[includes] Remove link between SkImage.h and SkImageEncoder.h" 2022-03-10 04:47:51 +00:00
site Remove obsolete python2 references. 2022-03-16 19:56:37 +00:00
specs [infra] Port serve.py from Python2 to 3 2021-08-31 15:28:19 +00:00
src [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00
tests [infra] Fix timeouts on WebGL GMs+Unit Tests 2022-03-22 12:42:33 +00:00
third_party [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00
toolchain fix typo in toolchain comments 2022-03-21 20:20:04 +00:00
tools [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00
.bazelrc [canvaskit] Add more features to Bazel build 2022-02-04 21:33:20 +00:00
.bazelversion [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
.clang-format no more bin packing in .clang-format 2021-03-04 17:22:50 +00:00
.clang-tidy Disable ClangTidy namespace comments for short blocks. 2020-08-24 14:01:22 +00:00
.gitignore Add .vscode to the default gitignore list. 2021-10-13 15:23:02 +00:00
.gn Pre-emptive fix for upcoming ANGLE change. 2021-01-08 17:23:52 +00:00
.vpython [python3] Reland recipes -> python3 changes 2021-12-01 13:04:03 +00:00
AUTHORS Remove obsolete sk_cf_obj 2022-03-11 05:59:16 +00:00
BUILD.bazel [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00
BUILD.gn Use non-deprecated Dawn GN targets 2022-03-22 13:05:52 +00:00
codereview.settings
CONTRIBUTING
CQ_COMMITTERS
DEPS Roll ANGLE from 01be7a8340df to 730c127102b5 (3 revisions) 2022-03-22 05:27:36 +00:00
DIR_METADATA Move metadata in OWNERS files to DIR_METADATA files 2021-02-02 23:41:54 +00:00
go_repositories.bzl [bazel] Use bazel to build task drivers 2022-03-03 16:12:18 +00:00
go.mod [bazel] Make use of test_on_env to spin up server for gms 2022-02-28 14:05:54 +00:00
go.sum [bazel] Make use of test_on_env to spin up server for gms 2022-02-28 14:05:54 +00:00
LICENSE
OWNERS [infra] Add wildcard OWNERS 2021-08-30 19:19:34 +00:00
OWNERS.android Update OWNERS.android with more details 2022-03-16 18:13:33 +00:00
package-lock.json [bazel] Make custom karma_test rule 2022-02-23 14:53:01 +00:00
package.json [bazel] Make custom karma_test rule 2022-02-23 14:53:01 +00:00
PRESUBMIT.py Remove AUTHORS check from PRESUBMIT.py 2021-09-30 14:12:18 +00:00
public.bzl remove jpeg from android builds flagged with no_codec 2022-02-14 19:29:10 +00:00
README
README.chromium
RELEASE_NOTES.txt Reland "Add glGetFloatv and glSamplerParameterf to GrGLInterface." 2022-03-21 16:34:43 +00:00
whitespace.txt Push shaders.skia.org. 2022-01-19 21:46:16 +00:00
WORKSPACE.bazel [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.