Disable SkJumper assembly in cross builds for now.

Bug: chromium:762167
Change-Id: Ia23f6dbfc0466aef4ca9d1a5b9ff343d79dc83bb
Reviewed-on: https://skia-review.googlesource.com/47460
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Nico Weber 2017-09-15 17:38:48 -04:00 committed by Skia Commit-Bot
parent d286bfbd96
commit 6492afa797
2 changed files with 25 additions and 6 deletions

View File

@ -521,8 +521,15 @@ skia_core_sources += [
"$_src/jumper/SkJumper_stages.cpp",
"$_src/jumper/SkJumper_stages_lowp.cpp",
]
skia_core_defines = []
if (is_win) {
skia_core_sources += [ "$_src/jumper/SkJumper_generated_win.S" ]
if (host_os == "win") {
skia_core_sources += [ "$_src/jumper/SkJumper_generated_win.S" ]
} else {
# TODO(thakis): Enable jumper in linux->win cross builds once the
# assembler situation is figured out, https://crbug.com/762167
skia_core_defines += [ "SK_JUMPER_USE_ASSEMBLY=0" ]
}
} else {
skia_core_sources += [ "$_src/jumper/SkJumper_generated.S" ]
}

View File

@ -17,13 +17,21 @@
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif
#if !defined(SK_JUMPER_USE_ASSEMBLY)
#if __has_feature(memory_sanitizer)
#define SK_JUMPER_USE_ASSEMBLY 0
#else
#define SK_JUMPER_USE_ASSEMBLY 1
#endif
#endif
#define M(st) +1
static const int kNumStages = SK_RASTER_PIPELINE_STAGES(M);
#undef M
#ifndef SK_JUMPER_DISABLE_8BIT
#if 0 && !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64))
// Intentionally commented out; optional logging for local debugging.
#if 0 && SK_JUMPER_USE_ASSEMBLY && (defined(__x86_64__) || defined(_M_X64))
#include <atomic>
#define M(st) #st,
@ -102,7 +110,7 @@ using StartPipelineFn = void(size_t,size_t,size_t,size_t, void**);
extern "C" {
#if __has_feature(memory_sanitizer)
#if !SK_JUMPER_USE_ASSEMBLY
// We'll just run baseline code.
#elif defined(__arm__)
@ -172,7 +180,8 @@ extern "C" {
}
#if !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64))
#if SK_JUMPER_USE_ASSEMBLY
#if defined(__x86_64__) || defined(_M_X64)
template <SkRasterPipeline::StockStage st>
static constexpr StageFn* hsw_lowp() { return nullptr; }
@ -217,6 +226,7 @@ extern "C" {
LOWP_STAGES(M)
#undef M
#endif
#endif
// Engines comprise everything we need to run SkRasterPipelines.
struct SkJumper_Engine {
@ -237,7 +247,7 @@ static SkJumper_Engine gEngine = kBaseline;
static SkOnce gChooseEngineOnce;
static SkJumper_Engine choose_engine() {
#if __has_feature(memory_sanitizer)
#if !SK_JUMPER_USE_ASSEMBLY
// We'll just run baseline code.
#elif defined(__arm__)
@ -316,7 +326,8 @@ static SkJumper_Engine choose_engine() {
static SkOnce gChooseLowpOnce;
static SkJumper_Engine choose_lowp() {
#if !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64))
#if SK_JUMPER_USE_ASSEMBLY
#if defined(__x86_64__) || defined(_M_X64)
if (1 && SkCpu::Supports(SkCpu::HSW)) {
return {
#define M(st) hsw_lowp<SkRasterPipeline::st>(),
@ -363,6 +374,7 @@ static SkJumper_Engine choose_engine() {
sk_just_return_lowp,
#undef M
};
#endif
#endif
return kNone;
}