Skip to content

build: bump deps#2018

Merged
alandtse merged 2 commits into
community-shaders:devfrom
alandtse:bump_deps
Mar 28, 2026
Merged

build: bump deps#2018
alandtse merged 2 commits into
community-shaders:devfrom
alandtse:bump_deps

Conversation

@alandtse
Copy link
Copy Markdown
Collaborator

@alandtse alandtse commented Mar 26, 2026

Summary by CodeRabbit

  • Chores

    • Upgraded ImGui, thread-pool and DirectX header pins; CI build actions and build presets updated.
  • Bug Fixes / Improvements

    • Repaired theme palette ordering and added sanitization to avoid broken/invalid palettes.
    • Unified font scaling and improved font reload/ready checks across the UI.
    • Refined UI behaviors (selection, popups, docking, tooltips, editor layout, key handling).
    • Hardened background task scheduling and shutdown for shader compilation and async cache builds.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f77be860-d787-44ef-b131-363f1892cedd

📥 Commits

Reviewing files that changed from the base of the PR and between 9a24bad and bd597e4.

📒 Files selected for processing (1)
  • CMakePresets.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • CMakePresets.json

📝 Walkthrough

Walkthrough

ImGui/third-party bumps and API migrations: PushFont signature updates, ImGui flag/name changes, FullPalette reorder + sanitization, thread-pool template/usage migration to detached tasks, shader compilation scheduling change, vcpkg/CMake/CI pinning and related UI tweaks.

Changes

Cohort / File(s) Summary
Thread-pool & async task migration
src/Features/UnifiedWater/WaterCache.cpp, src/Features/UnifiedWater/WaterCache.h, src/ShaderCache.cpp, src/ShaderCache.h
Change BS::thread_poolBS::thread_pool<>; replace push_task(...) with detach_task(...) and member-pointer submissions with detached lambdas; adjust pool wait calls (wait_for_taskswait/wait_for(...)).
ImGui PushFont callsite updates
src/Menu/Fonts.cpp, src/Menu/HomePageRenderer.cpp, src/Menu/MenuHeaderRenderer.cpp, src/Utils/UI.cpp
Add explicit second parameter (0.0f) to ImGui::PushFont(...) calls.
Font sizing & global scale transition
src/Menu/Fonts.cpp, src/Menu/SettingsTabRenderer.cpp, src/Menu/ThemeManager.cpp, src/WeatherEditor/EditorWindow.cpp
Switch uses of FontSizeLegacySize and migrate from io.FontGlobalScaleImGui::GetStyle().FontScaleMain.
Theme palette & sanitization
src/Menu.cpp, src/Menu.h
Reorder FullPalette to match ImGui 1.92+ indices; add SanitizeFullPaletteJson(json&) and call it in theme-loading paths.
ImGui flags, coordinates & API tweaks
src/Features/VR/SettingsUI.cpp, src/WeatherEditor/Weather/WeatherWidget.cpp, src/WeatherEditor/EditorWindow.cpp
Rename/replace ImGui flags (AllowItemOverlapAllowOverlap, DontClosePopupsNoAutoClosePopups); adjust coordinate math to use window size/padding; change child/dockspace argument usage.
Key input checks simplification
src/Menu/AdvancedSettingsRenderer.cpp, src/Features/VR/SettingsUI.cpp
Replace ImGui::GetKeyIndex(...) + ImGui::IsKeyPressed(...) with direct ImGuiKey_Enter/ImGuiKey_KeypadEnter/ImGuiKey_Escape checks.
UI lambda/signature tweak
src/WeatherEditor/EditorWindow.cpp
Change local lambda parameter type from ImTextureID to ImTextureRef for ImageButton usage.
Dependency & CI pinning
vcpkg.json, .github/actions/prepare-shaders/action.yml, .github/workflows/build.yaml, CMakePresets.json
Bump imgui, bshoshany-thread-pool, directx-headers; pin detours; update builtin-baseline; pin lukka/run-cmake to commit SHA; change vcpkg toolchain path in presets.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Caller
    participant ShaderCache
    participant CompilationPool as "BS::thread_pool<>\n(compilationPool)"
    participant Worker as "Detached worker"

    Caller->>ShaderCache: construct / enable watcher
    ShaderCache->>CompilationPool: detach_task(lambda token -> ManageCompilationSet(token))
    CompilationPool->>Worker: start ManageCompilationSet(token)
    Worker->>ShaderCache: ManageCompilationSet schedules per-item detach_task(ProcessCompilationSet, token)
    Worker->>CompilationPool: detach_task(ProcessCompilationSet, token)
    CompilationPool->>Worker: run detached ProcessCompilationSet(task, token)
    Worker->>ShaderCache: perform compilation work (checks stop token)
    Note over ShaderCache,CompilationPool: shutdown uses compilationPool.wait_for(timeout) before exit
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested reviewers

  • doodlum
  • jiayev

Poem

🐇 I hopped through palettes, fonts, and threads,

Pushed fonts with zeros and tidied color beds,
Threads now detach while shaders softly hum,
Dockspaces dock and tooltips wear new plum,
A tiny rabbit cheers: "ImGui—well done!"

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title 'build: bump deps' is vague and generic. While it correctly indicates that dependencies are being updated, it fails to specify which dependencies or their significance, providing minimal context about the actual changes across 15+ files. Consider a more descriptive title such as 'build: update ImGui to 1.92.6, thread-pool to 5.1.0, and related dependencies' to clearly convey the scope and impact of the changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.2.510)
CMakePresets.json

2026-03-27 00:12:22,226 [MainThread ] [ERROR] Template file not found: CMakePresets.json
2026-03-27 00:12:22,230 [MainThread ] [ERROR] Template file not found: CMakePresets.json
2026-03-27 00:12:22,233 [MainThread ] [ERROR] Template file not found: CMakePresets.json
2026-03-27 00:12:22,280 [MainThread ] [ERROR] Failed to invoke function /usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner. with CMakePresets.json
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 88, in func_wrapper
result = original_func(item)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner.py", line 74, in
results = parallel_runner.run_function(lambda f: (f, self._parse_file(f)), files_to_load)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-

... [truncated 2592 characters] ...

NotFoundError: [Errno 2] No such file or directory: 'CMakePresets.json'
2026-03-27 00:12:22,328 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/main.py", line 647, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/runner_registry.py", line 177, in run
for result in parallel_runner_results:
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 118, in _run_function_multiprocess_fork
raise v.internal_exception.with_traceback(v.internal_exception.traceback)
FileNotFoundError: [Errno 2] No such file or directory: 'CMakePresets.json'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

No actionable suggestions for changed features.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
src/ShaderCache.cpp (2)

2337-2350: ⚠️ Potential issue | 🔴 Critical

Capture the watcher instance at submission time.

This lambda dereferences the mutable listener member when the worker eventually starts. If StopFileWatcher() runs while the pool is busy, it nulls that member first and this task crashes on listener->processQueue().

🐛 Minimal fix
-			compilationPool.detach_task([this] { listener->processQueue(); });
+			auto* queueListener = listener;
+			compilationPool.detach_task([queueListener] { queueListener->processQueue(); });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ShaderCache.cpp` around lines 2337 - 2350, The task lambda submitted via
compilationPool.detach_task captures the mutable member listener by reference
which may be nulled by StopFileWatcher() before the task runs; fix it by
capturing the current listener instance into a local variable at submission time
(e.g., copy the pointer/shared_ptr into a local named like localListener) and
have the lambda call localListener->processQueue() (optionally check
localListener for null before invoking) so the worker uses a stable reference
even if the member is later cleared.

1927-1934: ⚠️ Potential issue | 🔴 Critical

Stop the detached loops before teardown.

The destructor waits on compilationPool.wait_for(std::chrono::milliseconds(1000)) without first requesting cooperative shutdown from the two long-lived detached loops: ManageCompilationSet() loops on !stoken.stop_requested() and processQueue() loops on cache->UseFileWatcher(). Neither condition is triggered before the wait, so this timeout path is reached during normal shutdown. The fallback to TerminateThread() is unsafe even if it worked correctly—but it won't: managementThread stores the pseudo-handle from GetCurrentThread(), which only works in that thread's context, not when called from the destructor.

Additionally, StopFileWatcher() nullifies listener without clearing useFileWatcher, creating a race where processQueue() may dereference a dangling pointer.

Call ssource.request_stop() and SetFileWatcher(false) before compilationPool.wait_for() to let the loops exit cleanly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ShaderCache.cpp` around lines 1927 - 1934, Before waiting on
compilationPool.wait_for(...) request cooperative shutdown: call
ssource.request_stop() and SetFileWatcher(false) so the ManageCompilationSet()
loop (which checks !stoken.stop_requested()) and processQueue() (which checks
cache->UseFileWatcher()) can exit; also update StopFileWatcher() to clear
useFileWatcher (SetFileWatcher(false)) before nulling listener to avoid a race
where processQueue() dereferences a dangling listener, and remove/replace the
TerminateThread/GetCurrentThread pseudo-handle logic around managementThread
with a proper thread shutdown/join pattern (store a real thread handle/USE
std::thread join or equivalent) rather than calling TerminateThread.
src/Menu/ThemeManager.cpp (1)

99-106: ⚠️ Potential issue | 🟠 Major

Persist the computed font scale when rebuilding the style.

Line 464 sets FontScaleMain in ReloadFont(), but SetupImGuiStyle() rebuilds the entire ImGuiStyle by assigning styleCopy (created from the base theme) on line 124, which overwrites the computed scale. This happens both at initialization and every frame in OverlayRenderer::Render(). The fix is to store the computed value before the full style assignment:

Set FontScaleMain in SetupImGuiStyle
 const float scaleFactor = fontScale * exp2(globalScale);
 styleCopy.ScaleAllSizes(scaleFactor);
+styleCopy.FontScaleMain = exp2(globalScale);

 styleCopy.MouseCursorScale = 1.f;
 style = styleCopy;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Menu/ThemeManager.cpp` around lines 99 - 106, SetupImGuiStyle currently
overwrites the computed font scale when it assigns styleCopy; compute and
persist the font scale inside SetupImGuiStyle (using the same logic as in
ReloadFont: inspect ImGui::GetIO().FontDefault, kBaselineFontSize and
globalScale), apply the scale via styleCopy.ScaleAllSizes(scaleFactor) and then
store that computed value into the persistent FontScaleMain (or the same member
used by ReloadFont) before assigning styleCopy to ImGui::GetStyle() so the
rebuilt style keeps the computed font scale.
vcpkg.json (1)

21-23: ⚠️ Potential issue | 🔴 Critical

The vcpkg manifest cannot resolve at baseline dddca6fa…—all four pinned dependency versions are missing.

Verification found that none of these versions exist in the vcpkg registry at the specified baseline commit:

  • bshoshany-thread-pool 5.1.0
  • detours 4.0.1 (port-version 8)
  • imgui 1.92.6
  • directx-headers 1.614.1

Update the builtin-baseline to a commit where these versions are available, or adjust the version pins to match what exists at the current baseline. The manifest will fail to resolve during builds otherwise.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vcpkg.json` around lines 21 - 23, The vcpkg manifest's pinned versions cannot
be resolved at the current builtin-baseline; update the manifest so the versions
exist at the baseline or change the baseline to one that contains them. Either
set "builtin-baseline" to a commit SHA that includes bshoshany-thread-pool
5.1.0, detours 4.0.1 (port-version 8), imgui 1.92.6, and directx-headers
1.614.1, or change the package version entries for "bshoshany-thread-pool",
"detours", "imgui", and "directx-headers" to versions that are present at the
current baseline so the manifest can resolve during builds.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/Menu.cpp`:
- Around line 186-195: SanitizeFullPaletteJson currently returns early for
non-array "FullPalette" values, leaving malformed entries to later
deserialization in Menu::Load/Menu::LoadTheme; change the logic so that any
"FullPalette" that is not a proper array of size ImGuiCol_COUNT is erased: if
themeJson.contains("FullPalette") then check if it's not an array OR its size
differs from static_cast<size_t>(ImGuiCol_COUNT) and in either case call
themeJson.erase("FullPalette"); otherwise leave a valid array untouched.

---

Outside diff comments:
In `@src/Menu/ThemeManager.cpp`:
- Around line 99-106: SetupImGuiStyle currently overwrites the computed font
scale when it assigns styleCopy; compute and persist the font scale inside
SetupImGuiStyle (using the same logic as in ReloadFont: inspect
ImGui::GetIO().FontDefault, kBaselineFontSize and globalScale), apply the scale
via styleCopy.ScaleAllSizes(scaleFactor) and then store that computed value into
the persistent FontScaleMain (or the same member used by ReloadFont) before
assigning styleCopy to ImGui::GetStyle() so the rebuilt style keeps the computed
font scale.

In `@src/ShaderCache.cpp`:
- Around line 2337-2350: The task lambda submitted via
compilationPool.detach_task captures the mutable member listener by reference
which may be nulled by StopFileWatcher() before the task runs; fix it by
capturing the current listener instance into a local variable at submission time
(e.g., copy the pointer/shared_ptr into a local named like localListener) and
have the lambda call localListener->processQueue() (optionally check
localListener for null before invoking) so the worker uses a stable reference
even if the member is later cleared.
- Around line 1927-1934: Before waiting on compilationPool.wait_for(...) request
cooperative shutdown: call ssource.request_stop() and SetFileWatcher(false) so
the ManageCompilationSet() loop (which checks !stoken.stop_requested()) and
processQueue() (which checks cache->UseFileWatcher()) can exit; also update
StopFileWatcher() to clear useFileWatcher (SetFileWatcher(false)) before nulling
listener to avoid a race where processQueue() dereferences a dangling listener,
and remove/replace the TerminateThread/GetCurrentThread pseudo-handle logic
around managementThread with a proper thread shutdown/join pattern (store a real
thread handle/USE std::thread join or equivalent) rather than calling
TerminateThread.

In `@vcpkg.json`:
- Around line 21-23: The vcpkg manifest's pinned versions cannot be resolved at
the current builtin-baseline; update the manifest so the versions exist at the
baseline or change the baseline to one that contains them. Either set
"builtin-baseline" to a commit SHA that includes bshoshany-thread-pool 5.1.0,
detours 4.0.1 (port-version 8), imgui 1.92.6, and directx-headers 1.614.1, or
change the package version entries for "bshoshany-thread-pool", "detours",
"imgui", and "directx-headers" to versions that are present at the current
baseline so the manifest can resolve during builds.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8f45150c-6b78-462c-b5f2-2967ac838ac0

📥 Commits

Reviewing files that changed from the base of the PR and between 8664201 and f37ed19.

📒 Files selected for processing (17)
  • src/Features/UnifiedWater/WaterCache.cpp
  • src/Features/UnifiedWater/WaterCache.h
  • src/Features/VR/SettingsUI.cpp
  • src/Menu.cpp
  • src/Menu.h
  • src/Menu/AdvancedSettingsRenderer.cpp
  • src/Menu/Fonts.cpp
  • src/Menu/HomePageRenderer.cpp
  • src/Menu/MenuHeaderRenderer.cpp
  • src/Menu/SettingsTabRenderer.cpp
  • src/Menu/ThemeManager.cpp
  • src/ShaderCache.cpp
  • src/ShaderCache.h
  • src/Utils/UI.cpp
  • src/WeatherEditor/EditorWindow.cpp
  • src/WeatherEditor/Weather/WeatherWidget.cpp
  • vcpkg.json

Comment thread src/Menu.cpp
@alandtse
Copy link
Copy Markdown
Collaborator Author

Ok the build failures are due to an issue with the actions in our repo's security settings. Since PRs can't run their own build changes, the fixes in this PR won't change the CI results. I'll likely merge this in and monitor for any additional build failures.

vcpkg commit a44707152fab changed X_VCPKG_RECURSIVE_DATA from
single-line to  multi-line JSON format:
  X_VCPKG_RECURSIVE_DATA={
    "vcpkg-root-env": "D:\\a\\..."
  }

lukka/run-cmake@v10 parses vcpkg's env output line-by-line, so it only
captures { — which vcpkg then rejects as malformed JSON when cmake runs.

lukka/run-cmake@5d55ea7 — the commit
from today (March 26, 2026) that contains "consume lib v4.1.11", which
is the final fix for issue community-shaders#155
@alandtse
Copy link
Copy Markdown
Collaborator Author

Upstream run-cmake had some fixes. This may be resolved.

@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@alandtse alandtse merged commit 6e897fd into community-shaders:dev Mar 28, 2026
15 checks passed
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants