graphics: fix the Windows build of the write-back erase with MSVC STL 14.51 #2165
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2165
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2165/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Nawid3333 on GitHub · 2026-11-07 18:48 UTC · original
Nawid3333:fix/windows-writeback-find→main· +2 −1 · 1 files · 1 commits · closed without mergingThe Windows CI build of main fails since
9678c59b7(runs 42393957508 and 42395607254) intextureCache.cpp:The
windows-2025runner now uses the imagewindows-2025-vs2026, whose Visual Studio 18 brings MSVC STL 14.51. That STL picks its vectorized search forstd::ranges::findoverWriteBack(GuestRangeplustick, 24 bytes, defaultedoperator==), and_Find_vectorizedhandles only elements of 1, 2, 4 or 8 bytes, so itsstatic_assertfires. VS 2022's STL (14.44) vectorizesfindonly for integers,std::byteand pointers, so local builds with it still pass.Change. The write-back erase looks the entry up with
std::ranges::find_ifand a lambda that compares with the sameoperator==, which keeps the plain loop. The behavior is unchanged: the same first matching entry is erased.Fork CI on the PR head (
6710c4e24, run 42399687141): the Windows (Visual Studio 18, MSVC 14.51), Linux and macOS builds pass, and the Windows test step passes.Written with Claude Code (AI): the diagnosis and the change; built locally with VS 2022 (clang-cl 19.1.5, MSVC 14.44) and on the fork's CI; reviewed by me.
🤖 Generated with Claude Code
std::ranges::find on WriteBack instantiates std::_Find_vectorized in the MSVC STL shipped with Visual Studio 18 (14.51), whose static_assert rejects the 24-byte element ("unexpected size"). Match the entry with find_if so the generic loop is used. Co-Authored-By: Claude Opus 5.5 <[email protected]>@coderabbitai[bot] on GitHub · 2026-11-07 18:51 UTC · original
Walkthrough
The deferred write-back cleanup replaces
std::ranges::findwithstd::ranges::find_ifand an explicit equality predicate to locate the entry before erasing it.Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
6710cThe lookup change is intended to restore the Windows build without changing which entry is erased. No merge-blocking issue is identified.
Pre-merge checks:
4 ·
1
findtofind_if.Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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
@coderabbitai[bot] on GitHub · 2026-11-07 18:51 UTC · original · reviewed
28f6bc08-f48b-4672-ad83-b676451afef4Reviewing files that changed from the base of the PR and between
96b2517497and6710c4e240.src/graphics/host_gpu/renderer/cache/textureCache.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Pull request closed