From 0b332bdc58062ae5c7b06acf82ba53b1436ad1fc Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Mon, 9 Feb 2026 13:55:05 +0800 Subject: [PATCH] [Chore] (3rdparty): add xxHash --- .gitmodules | 3 +++ 3rdparty/xxHash | 1 + CMakeLists.txt | 6 ++++++ MobileGL/Includes.h | 2 ++ 4 files changed, 12 insertions(+) create mode 160000 3rdparty/xxHash diff --git a/.gitmodules b/.gitmodules index bd45300f..5b19851c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "3rdparty/tracy"] path = 3rdparty/tracy url = https://github.com/wolfpld/tracy.git +[submodule "3rdparty/xxHash"] + path = 3rdparty/xxHash + url = https://github.com/Cyan4973/xxHash.git diff --git a/3rdparty/xxHash b/3rdparty/xxHash new file mode 160000 index 00000000..1d7b2a9d --- /dev/null +++ b/3rdparty/xxHash @@ -0,0 +1 @@ +Subproject commit 1d7b2a9d21bf9a740ead540aa93f4bc4caf11ae0 diff --git a/CMakeLists.txt b/CMakeLists.txt index 824ced74..40a0c841 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,10 @@ set(SPIRV_CROSS_STATIC ON CACHE BOOL "Prefer static libs" FORCE) add_subdirectory(3rdparty/glslang) add_subdirectory(3rdparty/SPIRV-Cross) +set(XXHASH_BUILD_XXHSUM OFF) +option(BUILD_SHARED_LIBS OFF) +add_subdirectory(3rdparty/xxHash/build/cmake xxhash_build EXCLUDE_FROM_ALL) + set(TRACY_ENABLE ${MOBILEGL_ENABLE_TRACY} CACHE BOOL "Enable Tracy, this is an internal variable" FORCE) if (TRACY_ENABLE) @@ -209,6 +213,7 @@ set(SOURCE_FILES MobileGL/MG_Backend/DirectVulkan/Renderer/PipelineManager.cpp MobileGL/MG_Backend/DirectVulkan/Renderer/FrameContext.cpp MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp + MobileGL/MG_Backend/DirectVulkan/Renderer/ProgramManager.cpp MobileGL/MG_State/GLState/Core.cpp MobileGL/MG_State/GLState/ErrorState/Error.cpp @@ -242,6 +247,7 @@ set(MOBILEGL_LINK_LIBRARIES spirv-cross-c SPIRV-Tools-opt SPIRV-Tools + xxHash::xxhash ) set(MOBILEGL_INCLUDE_DIR diff --git a/MobileGL/Includes.h b/MobileGL/Includes.h index 929440e1..ca98911b 100644 --- a/MobileGL/Includes.h +++ b/MobileGL/Includes.h @@ -106,6 +106,8 @@ #define TRACY_ZONECOLOR_BACKEND 0x00FF00 #endif +#include "xxhash.h" + // Post-includes for significant project headers #include "MG_Util/Debug/Log.h" #include "MG_Util/Types.h"