mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
Fix checking for Wasm SIMD support
The defined(WEBP_ENABLE_WASM_SIMD) in dsp.h meant that cpu.cmake will never successfully compile with Wasm SIMD, since it doesn't set any compile flags. We remove that requirement, and instead determine in dec.c if we want to be using Wasm SIMD intrinsics. Bug: v8:12371 Change-Id: I5d313f6d95301e6153254229a9ea234fec990cd6
This commit is contained in:
parent
ed665a15e8
commit
c4422702d0
@ -83,7 +83,7 @@ if(WEBP_ENABLE_SWAP_16BIT_CSP)
|
||||
add_definitions(-DWEBP_SWAP_16BIT_CSP=1)
|
||||
endif()
|
||||
if(WEBP_ENABLE_WASM_SIMD)
|
||||
add_definitions(-DWEBP_ENABLE_WASM_SIMD)
|
||||
add_definitions(-DWEBP_ENABLE_WASM_SIMD_INTRINSICS)
|
||||
endif()
|
||||
|
||||
if(NOT WEBP_BITTRACE STREQUAL "0")
|
||||
|
@ -833,7 +833,8 @@ WEBP_DSP_INIT_FUNC(VP8DspInit) {
|
||||
VP8DspInitMSA();
|
||||
}
|
||||
#endif
|
||||
#if defined(WEBP_USE_WASM_SIMD)
|
||||
#if defined(WEBP_USE_WASM_SIMD) && defined(WEBP_ENABLE_WASM_SIMD_INTRINSICS)
|
||||
// Check that SIMD is supported and that we want to use Wasm intrinsics.
|
||||
if (VP8GetCPUInfo(kWasmSIMD)) {
|
||||
VP8DspInitWasmSIMD();
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if (defined(EMSCRIPTEN) || defined(WEBP_HAVE_WASM_SIMD)) && \
|
||||
defined(__wasm_simd128__) && defined(WEBP_ENABLE_WASM_SIMD)
|
||||
defined(__wasm_simd128__)
|
||||
#define WEBP_USE_WASM_SIMD
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user