Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF) (push) Successful in 6m12s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON) (push) Successful in 5m49s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF) (push) Successful in 6m33s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON) (push) Successful in 6m50s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF) (push) Successful in 6m48s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF) (push) Failing after 32s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON) (push) Failing after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON) (push) Successful in 6m40s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON) (push) Successful in 15m18s
Bigfoot / Clang Format Checks (push) Failing after 10s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON) (push) Successful in 16m5s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF) (push) Successful in 16m28s
Introduces a dual-backend SerializationManager: Tool mode keeps reading/writing BigFile over SQL as before, Game mode now reads a Sasquatch file instead - a flattened, mmap'd counterpart to a BigFile produced ahead of time by Sasquatch::WriteFrom or the new SasquatchPacker CLI tool. The backend is picked at compile time via a new BIGFOOT_TOOL_MODE option (mirrors the existing BIGFOOT_OPTIMIZED/BIGFOOT_NOT_OPTIMIZED pattern); SaveAsset only exists in Tool mode, since a running game never writes back to its own asset pack. Also adds SerializationManager::LoadAssets (Game-mode only): loads a batch of UUIDs by decoding them across multiple threads instead of one at a time, layered by HardReference depth so a reference target is always fully registered before anything decodes a reference to it. This required making HardReference/SoftReference resolution genuinely thread-safe (it mutates ContainerHandle ref counts and AssetLibrary's UUID index/unreferenced-set from inside Unpack()) via atomic ref counts and targeted mutexes, validated by dedicated concurrency tests exercising real thread contention. BigFile itself is faster too: prepared statements are now pooled per query text instead of recompiled on every Request (pooled rather than cached-as-one because LoadAsset recurses and a naive cache would corrupt an in-flight statement), and PRAGMA mmap_size is enabled. Benchmarked against real Asset<T> objects (AssetsForBenchmarking) through the full Pack/Unpack/HardReference pipeline: Sasquatch's raw storage layer hits ~31 GiB/s (mmap ceiling), and the new parallel LoadAssets reaches ~18 GiB/s end-to-end versus ~1.3 GiB/s for the existing sequential LoadAsset loop. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
61 lines
1.9 KiB
CMake
61 lines
1.9 KiB
CMake
cmake_minimum_required(VERSION 3.26)
|
|
|
|
project(Bigfoot VERSION 0.1.0
|
|
DESCRIPTION "The Bigfoot engine"
|
|
LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
|
|
|
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
|
set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug" CACHE STRING "" FORCE)
|
|
|
|
option(BUILD_TESTS OFF)
|
|
option(BUILD_BENCHMARKS OFF)
|
|
option(ASAN OFF)
|
|
option(COVERAGE OFF)
|
|
option(TRACY ON)
|
|
option(VULKAN ON)
|
|
option(BIGFOOT_TOOL_MODE "Build SerializationManager against BigFile/SQLite and allow saving. OFF ships the Sasquatch-backed, load-only Game mode." ON)
|
|
|
|
set(AUTO_GENERATED_COMMENT "// AUTO-GENERATED DO NOT TOUCH")
|
|
|
|
include(${CMAKE_SOURCE_DIR}/CMake/CustomTargets.cmake)
|
|
include(${CMAKE_SOURCE_DIR}/CMake/FindDependencies.cmake)
|
|
include(${CMAKE_SOURCE_DIR}/CMake/Utils.cmake)
|
|
include(${CMAKE_SOURCE_DIR}/CMake/Package.cmake)
|
|
|
|
find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc)
|
|
find_program(SQLITE3_EXECUTABLE NAMES sqlite3)
|
|
find_program(MINJECT_EXECUTABLE NAMES minject)
|
|
find_program(BIN2CPP_EXECUTABLE NAMES Bin2CPP)
|
|
|
|
bigfoot_remove_default_exception_flags()
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
set(CMAKE_OPTIMIZE_DEPENDENCIES 1)
|
|
|
|
if(BUILD_TESTS)
|
|
enable_testing()
|
|
endif()
|
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
|
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
|
SET(CMAKE_INSTALL_RPATH "\${ORIGIN}")
|
|
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bigfoot/Sources)
|
|
if(${BUILD_TESTS})
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bigfoot/Tests)
|
|
endif()
|
|
if(${BUILD_BENCHMARKS})
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bigfoot/Benchmarks)
|
|
endif()
|
|
|
|
add_custom_target(NatVis SOURCES
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Vendor/NatVis/EASTL/EASTL.natvis
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Vendor/NatVis/VulkanHpp/VulkanHpp.natvis
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Vendor/NatVis/GLM/GLM.natvis) |