* feat(animation): add classical SMR skinned interaction retarget pass Port the portable ideas from MeshRet/SMR (semantically consistent bone sensors + dense interaction pairs) into an offline post-FK retarget refine step that restores body-part proximity with two-bone IK, without pulling in a neural runtime. Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com> * feat(animation): MeshRet neural retarget via animation_tensor Add L6 animation_tensor satellite that provides ISmrNeuralRetarget over builtin tensor MeshRet and optional ONNX, with classical two-bone IK as fallback when neural is disabled or unavailable. Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com> * docs(animation): document AnimRetargetProfile getter bindings Source quality's check_bindings --strict failed on six new getters bound for SMR/MeshRet retarget that were missing from animation.md. Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com> * fix(animation): avoid new fallback-debt comment markers Reword neural SMR Doxygen so classical IK is described as the active path, keeping fallback-contract-inventory at baseline (budget 0). Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com> * fix(ci): keep animation_tensor off web and skip Dawn LPM animation_tensor in GROUP web pulled animation→model3d into the Emscripten profile, which skips medialoader_model and then fails WASM link. Restrict it to GROUP 3d. Also force DAWN_BUILD_PROTOBUF/TINT fuzzers off so the Windows native Dawn parity configure does not require a flaky libprotobuf-mutator checkout. Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
76 lines
3.6 KiB
CMake
76 lines
3.6 KiB
CMake
function(load_webgpu_backend)
|
|
if(NOT EVENGINE_BUILD_HOST OR NOT BUILD_PLATFORM STREQUAL "webgpu")
|
|
set(EVENGINE_WEBGPU_LIB "" CACHE INTERNAL "WebGPU link target (unused)")
|
|
return()
|
|
endif()
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
|
|
message(STATUS "WebGPU: using emsdk headers (no Dawn build needed)")
|
|
set(EVENGINE_WEBGPU_LIB "" CACHE INTERNAL "WebGPU link target (unused on Emscripten)")
|
|
return()
|
|
endif()
|
|
|
|
message(STATUS "WebGPU (native): fetching Google Dawn")
|
|
include(FetchContent)
|
|
set(DAWN_BUILD_SAMPLES OFF CACHE BOOL "" FORCE)
|
|
set(DAWN_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
set(DAWN_BUILD_WGPU_TESTS OFF CACHE BOOL "" FORCE)
|
|
# Protobuf/LPM is only required for Dawn/Tint fuzzers. Keep it off so the
|
|
# native Dawn parity lane does not depend on a complete libprotobuf-mutator
|
|
# checkout from chromium.googlesource (shallow fetches there flake on Windows).
|
|
set(DAWN_BUILD_PROTOBUF OFF CACHE BOOL "" FORCE)
|
|
set(TINT_BUILD_FUZZERS OFF CACHE BOOL "" FORCE)
|
|
set(TINT_BUILD_IR_BINARY OFF CACHE BOOL "" FORCE)
|
|
set(DAWN_FETCH_DEPENDENCIES ON CACHE BOOL "" FORCE)
|
|
set(TINT_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
set(TINT_BUILD_CMD_TOOLS OFF CACHE BOOL "" FORCE)
|
|
set(DAWN_ENABLE_NULL OFF CACHE BOOL "" FORCE)
|
|
set(DAWN_ENABLE_D3D11 OFF CACHE BOOL "" FORCE)
|
|
set(DAWN_ENABLE_OPENGLES OFF CACHE BOOL "" FORCE)
|
|
set(DAWN_USE_XCODE OFF CACHE BOOL "" FORCE)
|
|
if(WIN32)
|
|
# Dawn's generic loader combines LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR with
|
|
# bare system DLL names, which LoadLibraryEx rejects with ERROR 87.
|
|
# Select its dedicated System32 path for Vulkan and D3D compiler DLLs.
|
|
set(DAWN_FORCE_SYSTEM_COMPONENT_LOAD ON CACHE BOOL "" FORCE)
|
|
endif()
|
|
|
|
# Pinned Dawn commit (2026-08-24 main HEAD) so native WebGPU builds stay
|
|
# reproducible; override with -DEVENGINE_DAWN_TAG=<commit> if needed.
|
|
set(EVENGINE_DAWN_TAG "521035d96861a33eadc06ebff7985add6ac7fdf6" CACHE STRING
|
|
"Dawn commit/tag to fetch for the native WebGPU backend (pin for reproducible builds)")
|
|
# A shallow git clone cannot reliably checkout an arbitrary fixed SHA once
|
|
# main advances beyond it. GitHub's immutable commit archive preserves the
|
|
# reproducible pin without downloading Dawn's complete history.
|
|
FetchContent_Declare(dawn
|
|
URL "https://github.com/google/dawn/archive/${EVENGINE_DAWN_TAG}.tar.gz"
|
|
DOWNLOAD_EXTRACT_TIMESTAMP FALSE
|
|
)
|
|
FetchContent_MakeAvailable(dawn)
|
|
|
|
if(TARGET dawn::webgpu_dawn)
|
|
set(_eve_dawn_target dawn::webgpu_dawn)
|
|
elseif(TARGET dawn::dawn)
|
|
set(_eve_dawn_target dawn::dawn)
|
|
else()
|
|
message(FATAL_ERROR "Dawn fetch did not produce a native WebGPU target")
|
|
endif()
|
|
# Dawn's webgpu.h / webgpu_cpp.h live under src/ in the checkout; expose
|
|
# them to every module target (engine, eve_imgui, gpgpu/webgpu, ...).
|
|
target_include_directories(eve_engine_includes INTERFACE
|
|
"${dawn_SOURCE_DIR}/include"
|
|
"${dawn_SOURCE_DIR}/src"
|
|
"${dawn_BINARY_DIR}/gen/include")
|
|
if(TARGET dawncpp_headers)
|
|
add_dependencies(eve_engine_includes dawncpp_headers)
|
|
endif()
|
|
if(TARGET dawn_headers)
|
|
add_dependencies(eve_engine_includes dawn_headers)
|
|
endif()
|
|
if(TARGET emdawnwebgpu_headers_gen)
|
|
add_dependencies(eve_engine_includes emdawnwebgpu_headers_gen)
|
|
endif()
|
|
set(EVENGINE_WEBGPU_LIB ${_eve_dawn_target} CACHE INTERNAL "WebGPU link target")
|
|
message(STATUS "WebGPU (native): Dawn ready, link target = ${EVENGINE_WEBGPU_LIB}")
|
|
endfunction()
|