Compare commits

..

7 Commits

Author SHA1 Message Date
Green Sky
e6da835fc0 update sdl to 3.2.26
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-11-01 19:55:57 +01:00
Green Sky
0a26a76dc6 put tag version nameing into a script
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
2025-11-01 19:32:21 +01:00
Green Sky
5a246b4515 update checkout action and change release name
to include git log depth for better sorting in the release page
2025-11-01 18:47:48 +01:00
Green Sky
478f2f112f ci/cd: add msvc stl hardening (from c++26)
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-10-11 16:25:17 +02:00
Green Sky
9e9a270550 more error checking around images, should prevent vram leaks
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-10-09 18:11:06 +02:00
Green Sky
f9667430b9 update imgui in nix flake 2025-10-09 16:16:46 +02:00
Green Sky
9d7800bb4f correctly handle partically correct webp 2025-10-09 16:16:25 +02:00
9 changed files with 69 additions and 65 deletions

View File

@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: recursive submodules: recursive
fetch-depth: 0 fetch-depth: 0
@@ -34,15 +34,7 @@ jobs:
- name: Determine tag name - name: Determine tag name
id: tag id: tag
shell: bash shell: bash
# taken from llama.cpp run: . .github/workflows/tag_version.bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
else
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
fi
- name: Compress artifacts - name: Compress artifacts
shell: bash shell: bash
@@ -78,12 +70,12 @@ jobs:
ndk_abi: x86_64 ndk_abi: x86_64
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: recursive submodules: recursive
fetch-depth: 0 fetch-depth: 0
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
repository: 'Green-Sky/vcpkg_android_triplets' repository: 'Green-Sky/vcpkg_android_triplets'
path: 'vcpkg_android_triplets' path: 'vcpkg_android_triplets'
@@ -141,15 +133,7 @@ jobs:
- name: Determine tag name - name: Determine tag name
id: tag id: tag
shell: bash shell: bash
# taken from llama.cpp run: . .github/workflows/tag_version.bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
else
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
fi
- name: rename apk - name: rename apk
id: rename_apk id: rename_apk
@@ -178,7 +162,7 @@ jobs:
contents: read contents: read
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: recursive submodules: recursive
fetch-depth: 0 fetch-depth: 0
@@ -204,8 +188,18 @@ jobs:
#- uses: ilammy/setup-nasm@v1 #- uses: ilammy/setup-nasm@v1
- name: Configure CMake - name: Configure CMake
env:
CXXFLAGS: "/D_MSVC_STL_HARDENING=1"
# TODO: og asan had this -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded # TODO: og asan had this -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON -DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DTOMATO_BREAKPAD=ON -DTOMATO_TOX_AV=ON -DTOMATO_ASAN=${{matrix.type == 'asan' && 'ON' || 'OFF'}} run: cmake -G Ninja
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
-DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON
-DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF
-DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
-DTOMATO_BREAKPAD=ON -DTOMATO_TOX_AV=ON
-DTOMATO_ASAN=${{matrix.type == 'asan' && 'ON' || 'OFF'}}
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t tomato run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t tomato
@@ -213,15 +207,7 @@ jobs:
- name: Determine tag name - name: Determine tag name
id: tag id: tag
shell: bash shell: bash
# taken from llama.cpp run: . .github/workflows/tag_version.bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
else
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
fi
- name: Clean temporary artifacts - name: Clean temporary artifacts
# msvc sometimes produces .ilk files, which are used for linking only # msvc sometimes produces .ilk files, which are used for linking only
@@ -265,22 +251,15 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: recursive submodules: recursive
fetch-depth: 0
- name: Determine tag name - name: Determine tag name
id: tag id: tag
shell: bash shell: bash
# taken from llama.cpp run: . .github/workflows/tag_version.bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
else
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
fi
- name: Install Dependencies - name: Install Dependencies
run: sudo apt update && sudo apt -y install unar run: sudo apt update && sudo apt -y install unar
@@ -337,22 +316,15 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: recursive submodules: recursive
fetch-depth: 0
- name: Determine tag name - name: Determine tag name
id: tag id: tag
shell: bash shell: bash
# taken from llama.cpp run: . .github/workflows/tag_version.bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
else
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
fi
- name: Download artifacts - name: Download artifacts
id: download-artifact id: download-artifact

View File

@@ -179,7 +179,15 @@ jobs:
arch: amd64 arch: amd64
- name: Configure CMake - name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON -DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe env:
CXXFLAGS: "/D_MSVC_STL_HARDENING=1"
run: cmake -G Ninja
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
-DTOMATO_DEP_LIBWEBP_USE_SYSTEM=ON
-DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF
-DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato

10
.github/workflows/tag_version.bash vendored Executable file
View File

@@ -0,0 +1,10 @@
# taken from llama.cpp
# needs BRANCH_NAME set
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
DEPTH="$(git rev-list --count HEAD)"
if [[ "${BRANCH_NAME}" == "master" ]]; then
echo "name=dev-${DEPTH}-${SHORT_HASH}" >> $GITHUB_OUTPUT
else
SAFE_NAME=$(echo "${BRANCH_NAME}" | tr '/' '-')
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
fi

View File

@@ -55,7 +55,8 @@ if (NOT TARGET SDL3::SDL3)
#GIT_TAG f6864924f76e1a0b4abaefc76ae2ed22b1a8916e # tip 05-03-2025 (3.2.8) #GIT_TAG f6864924f76e1a0b4abaefc76ae2ed22b1a8916e # tip 05-03-2025 (3.2.8)
#GIT_TAG 877399b2b2cf21e67554ed9046410f268ce1d1b2 # 3.2.10 #GIT_TAG 877399b2b2cf21e67554ed9046410f268ce1d1b2 # 3.2.10
#GIT_TAG 5ac37a8ffcf89da390404c1016833d56e2d67ae4 # 3.2.12 #GIT_TAG 5ac37a8ffcf89da390404c1016833d56e2d67ae4 # 3.2.12
GIT_TAG a8589a84226a6202831a3d49ff4edda4acab9acd # 3.2.24 #GIT_TAG a8589a84226a6202831a3d49ff4edda4acab9acd # 3.2.24
GIT_TAG badbf8da4ee72b3ef599c721ffc9899e8d7c8d90 # 3.2.26
FIND_PACKAGE_ARGS # for the future FIND_PACKAGE_ARGS # for the future
) )

16
flake.lock generated
View File

@@ -21,17 +21,17 @@
"imgui": { "imgui": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1752080038, "lastModified": 1758128722,
"narHash": "sha256-m5h/H8k/CZ5Qwr3L9+Elt8XT/Tgwr3s4HuhVtI4wkwE=", "narHash": "sha256-J+h7jJ+4wqr6RivtzyTDMXKxFoGs7dQbzqdu51XgEbc=",
"owner": "ocornut", "owner": "ocornut",
"repo": "imgui", "repo": "imgui",
"rev": "5d4126876bc10396d4c6511853ff10964414c776", "rev": "bf75bfec48fc00f532af8926130b70c0e26eb099",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "ocornut", "owner": "ocornut",
"repo": "imgui", "repo": "imgui",
"rev": "5d4126876bc10396d4c6511853ff10964414c776", "rev": "bf75bfec48fc00f532af8926130b70c0e26eb099",
"type": "github" "type": "github"
} }
}, },
@@ -119,17 +119,17 @@
"sdl3": { "sdl3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1759427552, "lastModified": 1761843138,
"narHash": "sha256-LUkj9Rrf+zOW0IdV7aGccb/5bKh3TWf1IGtQkCDHd4k=", "narHash": "sha256-edcub/zeho4mB3tItp+PSD5l+H6jUPm3seiBP6ppT0k=",
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL", "repo": "SDL",
"rev": "a8589a84226a6202831a3d49ff4edda4acab9acd", "rev": "badbf8da4ee72b3ef599c721ffc9899e8d7c8d90",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL", "repo": "SDL",
"rev": "a8589a84226a6202831a3d49ff4edda4acab9acd", "rev": "badbf8da4ee72b3ef599c721ffc9899e8d7c8d90",
"type": "github" "type": "github"
} }
}, },

View File

@@ -13,7 +13,7 @@
flake = false; flake = false;
}; };
sdl3 = { sdl3 = {
url = "github:libsdl-org/SDL/a8589a84226a6202831a3d49ff4edda4acab9acd"; # keep in sync with cmake url = "github:libsdl-org/SDL/badbf8da4ee72b3ef599c721ffc9899e8d7c8d90"; # keep in sync with cmake
flake = false; flake = false;
}; };
sdl3_image = { sdl3_image = {
@@ -21,7 +21,7 @@
flake = false; flake = false;
}; };
imgui = { imgui = {
url = "github:ocornut/imgui/5d4126876bc10396d4c6511853ff10964414c776"; url = "github:ocornut/imgui/bf75bfec48fc00f532af8926130b70c0e26eb099";
flake = false; flake = false;
}; };
plutosvg = { plutosvg = {

View File

@@ -70,7 +70,10 @@ ImageLoaderWebP::ImageResult ImageLoaderWebP::loadFromMemoryRGBA(const uint8_t*
while (WebPAnimDecoderHasMoreFrames(dec.get())) { while (WebPAnimDecoderHasMoreFrames(dec.get())) {
uint8_t* buf; uint8_t* buf;
int timestamp; int timestamp;
WebPAnimDecoderGetNext(dec.get(), &buf, &timestamp); if (WebPAnimDecoderGetNext(dec.get(), &buf, &timestamp) == 0 || buf == nullptr) {
// error out with empty res
return {};
}
// ... (Render 'buf' based on 'timestamp'). // ... (Render 'buf' based on 'timestamp').
// ... (Do NOT free 'buf', as it is owned by 'dec'). // ... (Do NOT free 'buf', as it is owned by 'dec').

View File

@@ -103,10 +103,17 @@ TextureLoaderResult MessageImageLoader::load(TextureUploaderI& tu, Message3Handl
new_entry.current_texture = 0; new_entry.current_texture = 0;
for (const auto& [ms, data] : res.frames) { for (const auto& [ms, data] : res.frames) {
const auto n_t = tu.upload(data.data(), res.width, res.height); const auto n_t = tu.upload(data.data(), res.width, res.height);
if (n_t == 0) {
continue;
}
new_entry.textures.push_back(n_t); new_entry.textures.push_back(n_t);
new_entry.frame_duration.push_back(ms); new_entry.frame_duration.push_back(ms);
} }
if (new_entry.textures.empty()) {
continue;
}
new_entry.width = res.width; new_entry.width = res.width;
new_entry.height = res.height; new_entry.height = res.height;

View File

@@ -116,6 +116,9 @@ struct TextureCache {
_tu.destroy(tex_id); _tu.destroy(tex_id);
} }
} }
for (const auto& tex_id : _default_texture.textures) {
_tu.destroy(tex_id);
}
} }
struct GetInfo { struct GetInfo {