Add a way to force raster pipeline blitter.

And add some Test/Perf bots to try it out!

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER

Change-Id: I56ea2285f9fec2e468fae89673a545a717ab0f49
Reviewed-on: https://skia-review.googlesource.com/16423
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Mike Klein 2017-05-10 16:13:35 -04:00 committed by Skia Commit-Bot
parent 6c9f101377
commit b60acfcfac
3 changed files with 214 additions and 2 deletions

View File

@ -40,6 +40,7 @@
"Build-Ubuntu-Clang-x86_64-Release-Vulkan",
"Build-Ubuntu-Clang-x86_64-Release-SK_CPU_LIMIT_SSE2",
"Build-Ubuntu-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41",
"Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"Build-Ubuntu-GCC-arm-Debug-Chromecast",
"Build-Ubuntu-GCC-arm-Release-Chromecast",
"Build-Ubuntu-GCC-x86-Debug",
@ -135,6 +136,7 @@
"Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release",
"Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN",
"Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast",
"Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN",
"Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN",
"Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug",
@ -280,6 +282,7 @@
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN",
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE2",
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41",
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN",
"Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN",
"Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-TSAN",

View File

@ -234,6 +234,12 @@
"Build-Ubuntu-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41"
]
},
"Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"priority": 0.8,
"tasks": [
"Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER"
]
},
"Build-Ubuntu-Clang-x86_64-Release-TSAN": {
"priority": 0.8,
"tasks": [
@ -818,6 +824,12 @@
"Upload-Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast"
]
},
"Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"priority": 0.8,
"tasks": [
"Upload-Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER"
]
},
"Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN": {
"priority": 0.8,
"tasks": [
@ -1682,6 +1694,12 @@
"Upload-Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41"
]
},
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"priority": 0.8,
"tasks": [
"Upload-Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER"
]
},
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN": {
"priority": 0.8,
"tasks": [
@ -3377,6 +3395,36 @@
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"cipd_packages": [
{
"name": "skia/bots/clang_linux",
"path": "clang_linux",
"version": "version:8"
}
],
"dimensions": [
"cpu:x86-64-avx2",
"gpu:none",
"os:Ubuntu-14.04",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"compile",
"repository=<(REPO)",
"buildername=Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Build-Ubuntu-Clang-x86_64-Release-TSAN": {
"cipd_packages": [
{
@ -7197,6 +7245,54 @@
"max_attempts": 1,
"priority": 0.8
},
"Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"cipd_packages": [
{
"name": "skia/bots/skimage",
"path": "skimage",
"version": "version:24"
},
{
"name": "skia/bots/skp",
"path": "skp",
"version": "version:56"
},
{
"name": "skia/bots/svg",
"path": "svg",
"version": "version:5"
}
],
"dependencies": [
"Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"Housekeeper-PerCommit-BundleRecipes"
],
"dimensions": [
"cpu:x86-64-avx2",
"gpu:none",
"os:Ubuntu-14.04",
"pool:Skia"
],
"execution_timeout_ns": 14400000000000,
"expiration_ns": 72000000000000,
"extra_args": [
"--workdir",
"../../..",
"perf",
"repository=<(REPO)",
"buildername=Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"io_timeout_ns": 2400000000000,
"isolate": "perf_skia_bundled_unix.isolate",
"max_attempts": 1,
"priority": 0.8
},
"Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN": {
"cipd_packages": [
{
@ -14078,6 +14174,54 @@
"max_attempts": 1,
"priority": 0.8
},
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"cipd_packages": [
{
"name": "skia/bots/skimage",
"path": "skimage",
"version": "version:24"
},
{
"name": "skia/bots/skp",
"path": "skp",
"version": "version:56"
},
{
"name": "skia/bots/svg",
"path": "svg",
"version": "version:5"
}
],
"dependencies": [
"Build-Ubuntu-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"Housekeeper-PerCommit-BundleRecipes"
],
"dimensions": [
"cpu:x86-64-avx2",
"gpu:none",
"os:Ubuntu-14.04",
"pool:Skia"
],
"execution_timeout_ns": 14400000000000,
"expiration_ns": 72000000000000,
"extra_args": [
"--workdir",
"../../..",
"test",
"repository=<(REPO)",
"buildername=Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"io_timeout_ns": 2400000000000,
"isolate": "test_skia_bundled_unix.isolate",
"max_attempts": 1,
"priority": 0.8
},
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN": {
"cipd_packages": [
{
@ -19367,6 +19511,33 @@
"isolate": "upload_nano_results.isolate",
"priority": 0.8
},
"Upload-Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"dependencies": [
"Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER"
],
"dimensions": [
"cpu:x86-64-avx2",
"gpu:none",
"os:Ubuntu-14.04",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"upload_nano_results",
"repository=<(REPO)",
"buildername=Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)",
"gs_bucket=skia-perf"
],
"isolate": "upload_nano_results.isolate",
"priority": 0.8
},
"Upload-Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release": {
"dependencies": [
"Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release"
@ -21878,6 +22049,33 @@
"isolate": "upload_dm_results.isolate",
"priority": 0.8
},
"Upload-Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER": {
"dependencies": [
"Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER"
],
"dimensions": [
"cpu:x86-64-avx2",
"gpu:none",
"os:Ubuntu-14.04",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"upload_dm_results",
"repository=<(REPO)",
"buildername=Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)",
"gs_bucket=skia-infra-gm"
],
"isolate": "upload_dm_results.isolate",
"priority": 0.8
},
"Upload-Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug": {
"dependencies": [
"Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug"

View File

@ -782,6 +782,18 @@ SkShader::ContextRec::DstType SkBlitter::PreferredShaderDest(const SkImageInfo&
#endif
}
static bool use_raster_pipeline_blitter(const SkPixmap& device, const SkPaint& paint) {
#if defined(SK_FORCE_RASTER_PIPELINE_BLITTER)
return true;
#else
// By policy we choose not to handle legacy 8888 with SkRasterPipelineBlitter.
if (device.colorSpace()) {
return true;
}
return device.colorType() != kN32_SkColorType;
#endif
}
SkBlitter* SkBlitter::Choose(const SkPixmap& device,
const SkMatrix& matrix,
const SkPaint& origPaint,
@ -847,8 +859,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
return alloc->make<SkA8_Coverage_Blitter>(device, *paint);
}
// By policy we choose not to handle legacy 8888 with SkRasterPipelineBlitter.
if (device.colorSpace() || device.colorType() != kN32_SkColorType) {
if (use_raster_pipeline_blitter(device, *paint)) {
auto blitter = SkCreateRasterPipelineBlitter(device, *paint, matrix, alloc);
SkASSERT(blitter);
return blitter;