Skip to content

test(agc): flush shader cache writes before removing test files - #1986

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
kali113:fix/shader-cache-test-cleanup
Oct 9, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
kali113:fix/shader-cache-test-cleanup

Conversation

@kali113

@kali113 kali113 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What

agc_shader_disk_cache queues asynchronous cache writes, then removes its temporary directory without waiting for those writes. Flush the writer before removal, and fail explicitly when filesystem cleanup reports an error.

The patch is two added lines in one test file, directly on main d70b8998. No code-size optimization, store-kernel partitioning, TLS grouping or other prerequisite commits remain. Production shader semantics and cache policy are unchanged.

The Windows reproduction completed all verification phases but hung during filesystem cleanup on execution 164; GDB placed the main thread in CreateFileW through libstdc++. The same two-line correction passed 1,000 consecutive Windows Release executions (stress validation; original reproduction). Those earlier diagnostic branches had a different baseline; they establish the investigated cleanup issue, not validation of the new head or every possible filesystem stall.

Checked cache-related PRs including #1523 and #590; neither supplies this final test-cleanup synchronization. The competing #2001 infrastructure-removal proposal is not a dependency.

Tested

Exact source head 7dc3a067: independent validation passes on native GitHub Linux and Windows runners, Release / GCC, including full default builds, all-library packaging and three executions of agc_shader_disk_cache with a 30-second limit. Both platforms execute the test; no capability skip. These are fork validation jobs, not collaborator-dispatched upstream checks. Unrelated tests from the full suite were not run in this validation.

Conventions and git diff --check pass. No console or title testing is claimed for this test-only correction.

Checklist

  • Based on main snapshot d70b8998; no other open PR implements this change
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes, OpenAI Codex

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the full diff and current head. ShaderDiskCache::Flush() waits until the queued jobs are empty and no write is active, so the test directory is not removed while the cache worker may still be writing. The cleanup now also reports filesystem errors instead of silently passing. Linux, Windows, Conventions, and changes checks are green; the author also reports a 1,000-run Windows stress validation.

@kali113
kali113 marked this pull request as ready for review October 9, 2026 04:17
Copilot AI balanced review requested due to automatic review settings October 9, 2026 04:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kali113
kali113 force-pushed the fix/shader-cache-test-cleanup branch from a6e799c to 7dc3a06 Compare October 9, 2026 12:10
@popcoder565

Copy link
Copy Markdown
Contributor

Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 7dc3a067, merged onto main d70b899 in one build with 33 other AGC/shader PRs that had no Windows run.

No title was run.

🤖 Addressed by Claude Code

@oneandonlydean
oneandonlydean merged commit da122c9 into boykopovar:main Oct 9, 2026
8 of 9 checks passed
@kali113
kali113 deleted the fix/shader-cache-test-cleanup branch November 13, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build relinker shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants