diff options
Diffstat (limited to 'src/jumper/SkJumper.cpp')
-rw-r--r-- | src/jumper/SkJumper.cpp | 107 |
1 files changed, 29 insertions, 78 deletions
diff --git a/src/jumper/SkJumper.cpp b/src/jumper/SkJumper.cpp index 84cdc20f68..20fbce5625 100644 --- a/src/jumper/SkJumper.cpp +++ b/src/jumper/SkJumper.cpp @@ -69,7 +69,7 @@ using StartPipelineFn = void(size_t,size_t,size_t,size_t, void**,K*); #define ASM(name, suffix) _sk_##name##_##suffix #endif -// Some stages have low-precision (~15 bit) versions from SkJumper_stages_lowp.cpp. +// Some stages have 8-bit versions from SkJumper_stages_8bit.cpp. #define LOWP_STAGES(M) \ M(black_color) M(white_color) M(uniform_color) \ M(set_rgb) \ @@ -124,8 +124,6 @@ extern "C" { ASM(start_pipeline,avx ), ASM(start_pipeline,sse41 ), ASM(start_pipeline,sse2 ), - ASM(start_pipeline,hsw_lowp ), - ASM(start_pipeline,ssse3_lowp), ASM(start_pipeline,hsw_8bit ), ASM(start_pipeline,sse41_8bit), ASM(start_pipeline,sse2_8bit ); @@ -134,8 +132,6 @@ extern "C" { ASM(just_return,avx), ASM(just_return,sse41), ASM(just_return,sse2), - ASM(just_return,hsw_lowp ), - ASM(just_return,ssse3_lowp), ASM(just_return,hsw_8bit ), ASM(just_return,sse41_8bit), ASM(just_return,sse2_8bit ); @@ -153,12 +149,6 @@ extern "C" { SK_RASTER_PIPELINE_STAGES(M) #undef M - #define M(st) StageFn ASM(st,hsw_lowp); - LOWP_STAGES(M) - #undef M - #define M(st) StageFn ASM(st,ssse3_lowp); - LOWP_STAGES(M) - #undef M #define M(st) StageFn ASM(st,hsw_8bit); LOWP_STAGES(M) #undef M @@ -188,44 +178,26 @@ extern "C" { #if !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64)) template <SkRasterPipeline::StockStage st> - static constexpr StageFn* hsw_lowp() { return nullptr; } + static constexpr StageFn* hsw_8bit() { return nullptr; } + + template <SkRasterPipeline::StockStage st> + static constexpr StageFn* sse41_8bit() { return nullptr; } template <SkRasterPipeline::StockStage st> - static constexpr StageFn* ssse3_lowp() { return nullptr; } + static constexpr StageFn* sse2_8bit() { return nullptr; } #define M(st) \ - template <> constexpr StageFn* hsw_lowp<SkRasterPipeline::st>() { \ - return ASM(st,hsw_lowp); \ + template <> constexpr StageFn* hsw_8bit<SkRasterPipeline::st>() { \ + return ASM(st,hsw_8bit); \ } \ - template <> constexpr StageFn* ssse3_lowp<SkRasterPipeline::st>() { \ - return ASM(st,ssse3_lowp); \ + template <> constexpr StageFn* sse41_8bit<SkRasterPipeline::st>() { \ + return ASM(st,sse41_8bit); \ + } \ + template <> constexpr StageFn* sse2_8bit<SkRasterPipeline::st>() { \ + return ASM(st,sse2_8bit); \ } LOWP_STAGES(M) #undef M - - #if !defined(SK_JUMPER_LEGACY_LOWP) - template <SkRasterPipeline::StockStage st> - static constexpr StageFn* hsw_8bit() { return nullptr; } - - template <SkRasterPipeline::StockStage st> - static constexpr StageFn* sse41_8bit() { return nullptr; } - - template <SkRasterPipeline::StockStage st> - static constexpr StageFn* sse2_8bit() { return nullptr; } - - #define M(st) \ - template <> constexpr StageFn* hsw_8bit<SkRasterPipeline::st>() { \ - return ASM(st,hsw_8bit); \ - } \ - template <> constexpr StageFn* sse41_8bit<SkRasterPipeline::st>() { \ - return ASM(st,sse41_8bit); \ - } \ - template <> constexpr StageFn* sse2_8bit<SkRasterPipeline::st>() { \ - return ASM(st,sse2_8bit); \ - } - LOWP_STAGES(M) - #undef M - #endif #endif // Engines comprise everything we need to run SkRasterPipelines. @@ -336,51 +308,30 @@ static SkJumper_Engine choose_engine() { static SkJumper_Engine choose_lowp() { #if !__has_feature(memory_sanitizer) && (defined(__x86_64__) || defined(_M_X64)) - #if !defined(SK_JUMPER_LEGACY_LOWP) - if (1 && SkCpu::Supports(SkCpu::HSW)) { - return { - #define M(st) hsw_8bit<SkRasterPipeline::st>(), - { SK_RASTER_PIPELINE_STAGES(M) }, - ASM(start_pipeline,hsw_8bit), - ASM(just_return ,hsw_8bit) - #undef M - }; - } - if (1 && SkCpu::Supports(SkCpu::SSE41)) { - return { - #define M(st) sse41_8bit<SkRasterPipeline::st>(), - { SK_RASTER_PIPELINE_STAGES(M) }, - ASM(start_pipeline,sse41_8bit), - ASM(just_return ,sse41_8bit) - #undef M - }; - } - if (1 && SkCpu::Supports(SkCpu::SSE2)) { - return { - #define M(st) sse2_8bit<SkRasterPipeline::st>(), - { SK_RASTER_PIPELINE_STAGES(M) }, - ASM(start_pipeline,sse2_8bit), - ASM(just_return ,sse2_8bit) - #undef M - }; - } - #endif - if (1 && SkCpu::Supports(SkCpu::HSW)) { return { - #define M(st) hsw_lowp<SkRasterPipeline::st>(), + #define M(st) hsw_8bit<SkRasterPipeline::st>(), + { SK_RASTER_PIPELINE_STAGES(M) }, + ASM(start_pipeline,hsw_8bit), + ASM(just_return ,hsw_8bit) + #undef M + }; + } + if (1 && SkCpu::Supports(SkCpu::SSE41)) { + return { + #define M(st) sse41_8bit<SkRasterPipeline::st>(), { SK_RASTER_PIPELINE_STAGES(M) }, - ASM(start_pipeline,hsw_lowp), - ASM(just_return ,hsw_lowp) + ASM(start_pipeline,sse41_8bit), + ASM(just_return ,sse41_8bit) #undef M }; } - if (1 && SkCpu::Supports(SkCpu::SSSE3)) { + if (1 && SkCpu::Supports(SkCpu::SSE2)) { return { - #define M(st) ssse3_lowp<SkRasterPipeline::st>(), + #define M(st) sse2_8bit<SkRasterPipeline::st>(), { SK_RASTER_PIPELINE_STAGES(M) }, - ASM(start_pipeline,ssse3_lowp), - ASM(just_return ,ssse3_lowp) + ASM(start_pipeline,sse2_8bit), + ASM(just_return ,sse2_8bit) #undef M }; } |