skia2/tools/gpu
Kevin Lubick 9cb74e9079 [bazel] Compile gms for wasm and WebGL
PS 1 is re-generating existing BUILD.bazel files
PS 2 is generating BUILD.bazel files for tests/gms
PS 3+ makes modifications to build all of the gms and tests.

It is recommended to view this CL with just a diff between
PS 2 and the end, due to the large amount of generated changes
in PS 1 and 2.

We make a filegroup for the gms and tests because they need
to be compiled as one large blob in order for the registries
to work. Maybe in the future we will break these up, but at least
for WASM/JS, the overhead of starting a browser for each new
test would likely grind things to a halt, so we just group them
all together for now. It's also the most similar to what we
currently do.

In gm/BUILD.bazel and tests/BUILD.bazel, we add a cc_library
that encapsulates all of the deps of the tests, so we can
easily include that the build. These were discovered via
trial and error, not anything automatic or systematic.

The is_skia_dev_build config_setting is very similar to the
GN equivalent from which it was based.

The list of gms and tests to skip (e.g. which are incompatible
with WASM) was determined by building the wasm bundle:

modules/canvaskit$ make bazel_gms_release
tools/run-wasm-gm-tests$ make run_local_debug
# Don't forget to click the button on the screen after the
# browser loads

This way of invoking the tests will be replace soon with
`bazel test <something>`. As such, I didn't bother fully
documenting the current way.

Suggested review order:
 - modules/canvaskit/BUILD.bazel taking note that we always
   use profiling-funcs to make the stacktraces human readable.
 - gm/BUILD.bazel and tests/BUILD.bazel to see the lists of
   gms/tests. Notice the tests are roughly partitioned because
   we don't support things like vulkan/PDF in the wasm build
   and we will want a way to not build certain tests for
   certain configurations
 - tools/* noting some of the cc_libraries added to make
   dependencies easier to add when needed.
 - All other files.

Change-Id: I43059cd93c28af1c4c12b93d6ebd9c46a12d381f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506256
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-09 18:56:17 +00:00
..
d3d [bazel] Try adding cc_binary rules that use generated rules 2021-11-30 18:18:53 +00:00
dawn Replace uses of deprecated dawn_native::BackendType 2022-01-11 15:12:45 +00:00
gl Convert 0 and NULL to nullptr. 2022-02-09 14:20:57 +00:00
mock [bazel] Try adding cc_binary rules that use generated rules 2021-11-30 18:18:53 +00:00
mtl [bazel] Try adding cc_binary rules that use generated rules 2021-11-30 18:18:53 +00:00
vk Enable Swiftshader for Vulkan testing on Mac. 2022-01-28 19:14:56 +00:00
BackendSurfaceFactory.cpp
BackendSurfaceFactory.h
BackendTextureImageFactory.cpp
BackendTextureImageFactory.h
BUILD.bazel [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
FenceSync.h
FlushFinishTracker.cpp
FlushFinishTracker.h
GpuTimer.h
GrContextFactory.cpp Reland "[fuzzer] Remove GL from (now-Vulkan) build" 2022-02-03 18:07:47 +00:00
GrContextFactory.h Reland "[fuzzer] Remove GL from (now-Vulkan) build" 2022-02-03 18:07:47 +00:00
GrTest.cpp Reland "drawVertices in GPU backend uses drawVustomMesh implementation." 2022-01-10 23:06:15 +00:00
ManagedBackendTexture.cpp
ManagedBackendTexture.h
MemoryCache.cpp Remove SkSL::String class. 2022-02-03 14:59:16 +00:00
MemoryCache.h Reland "Redesign program key construction" 2021-03-03 17:44:00 +00:00
ProxyUtils.cpp Store the correct number of samples in GrProgramInfo 2021-08-26 17:24:47 +00:00
ProxyUtils.h Store the correct number of samples in GrProgramInfo 2021-08-26 17:24:47 +00:00
TestContext.cpp
TestContext.h
TestOps.cpp [graphite] Replace GrSLType with SkSLType 2022-01-26 17:30:12 +00:00
TestOps.h Switch GrMeshDrawOp::Target to be the stand alone GrMeshDrawTarget class 2021-06-17 19:57:43 +00:00
YUVUtils.cpp YUVUtils function for splitting image into yuva planes. 2021-05-24 14:10:39 +00:00
YUVUtils.h YUVUtils function for splitting image into yuva planes. 2021-05-24 14:10:39 +00:00