Revert "Revert "Shuffle SkSL sources around so compiler and bytecode can be used w/o GPU""
This reverts commit 37a59ef1af685fea0942f0dbc27f20a722ed18e1.
Change-Id: If38da265ebbb196e72c7d035ba51028438787e2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221541
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 730c398..2897286 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -501,6 +501,7 @@
"src/sksl/SkSLMain.cpp",
]
sources += skia_sksl_sources
+ sources += skia_sksl_gpu_sources
include_dirs = [ "." ]
deps = [
":run_sksllex",
@@ -578,7 +579,8 @@
public_configs = []
public_deps = []
- sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs
+ sources =
+ skia_gpu_sources + skia_sksl_gpu_sources + skia_gpu_processor_outputs
if (!skia_enable_ccpr) {
sources -= skia_ccpr_sources
sources += [ "src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp" ]
@@ -635,11 +637,6 @@
}
}
- if (skia_enable_spirv_validation) {
- deps += [ "//third_party/spirv-tools" ]
- public_defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
- }
-
cflags_objcc = []
if (skia_use_metal) {
public_defines += [ "SK_METAL" ]
@@ -916,6 +913,7 @@
}
sources += skia_effects_sources
sources += skia_effects_imagefilter_sources
+ sources += skia_sksl_sources
sources += [
"src/android/SkAndroidFrameworkUtils.cpp",
"src/android/SkAnimatedImage.cpp",
@@ -1046,6 +1044,11 @@
if (is_fuchsia) {
sources += [ "src/ports/SkDebug_stdio.cpp" ]
}
+
+ if (skia_enable_spirv_validation) {
+ deps += [ "//third_party/spirv-tools" ]
+ defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
+ }
}
# DebugCanvas used in experimental/wasm-skp-debugger
@@ -1142,6 +1145,16 @@
]
}
+executable("cpu_modules") {
+ sources = [
+ "tools/cpu_modules.cpp",
+ ]
+ deps = [
+ ":skia",
+ "modules/particles",
+ ]
+}
+
# Targets guarded by skia_enable_tools may use //third_party freely.
if (skia_enable_tools) {
skia_public_includes = [