Skip to content

test(agc): disable the shader disk cache in agc_shader_memory_tests - #6109

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
YatoVoid:fix/shader-memory-tests-disable-disk-cache
Oct 18, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
YatoVoid:fix/shader-memory-tests-disable-disk-cache

Conversation

@YatoVoid

@YatoVoid YatoVoid commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes #6076.

The failure is not NVIDIA-specific. agc_shader_memory_tests uses the shader disk cache when it is run directly, because only the CTest registrations set ANYPS5_NO_SHADER_CACHE=1. The first direct run passes and writes tests/shader_cache. On every later run findOrCompileVariant loads the variants from that cache instead of building a resource program, so ResourcePrograms() is 0 and the layout pair check fails with "the second layout ignored the reuse switch". CI never sees it because CTest disables the cache.

main now sets ANYPS5_NO_SHADER_CACHE=1 before any test runs, as tests/Mesh.cpp already does, so a direct run behaves like the CTest one.

Tested

Arch Linux, GCC, Release, NVIDIA RTX 3050 Laptop (the test does not use the GPU).

  • Before: with ANYPS5_SHADER_CACHE_DIR pointing at an empty directory, agc_shader_memory_tests --layout-pair passes on the first run and fails on the second and third with the message from the issue. With ANYPS5_NO_SHADER_CACHE=1 it passes every time.
  • After: --layout-pair, --frontend-pair and the no-argument run pass repeatedly against the warm cache directory and from the default location; no shader_cache directory is created next to the binary.
  • ctest -R 'agc_shader_(memory|bindless|srt_read_patching|frontend_pair|layout_pair)': 7/7 passed.
  • python3 tools/check_conventions.py --base origin/main: passed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a (test-only change; the test runs no GPU work)
  • AI-assisted: no

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1341 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 5500 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6177 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6222 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6232 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6412 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6503 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6645 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked: ANYPS5_NO_SHADER_CACHE=1 is set before anything runs, same as tests/Mesh.cpp; agc_shader_memory passes in ctest and --layout-pair passes three consecutive direct runs sharing one cache dir. Merging.

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Oct 17, 2026
@adriadam10
adriadam10 merged commit 4eaf162 into boykopovar:main Oct 18, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* fix error Closes an issue (Fixes #N)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agc_shader_memory_tests fails on NVIDIA RTX 5060: layout pair ignores reuse switch

2 participants