Skip to content

test(agc): cover the color to depth format mapping of depth compare copies - #6700

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
xXPBSXx:test-agc-depth-copy-format
Oct 17, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
xXPBSXx:test-agc-depth-copy-format

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

What

Texture::DepthCopyFormat decides which guest texture formats a depth-compare sample can be served by copying a pending depth surface (ShaderResources.cpp, depthCopy): R32_SFLOAT maps to D32_SFLOAT, R16_UNORM to D16_UNORM, every other format to VK_FORMAT_UNDEFINED, which keeps the sample on the guest-memory path. DepthCompareCopy reaches the two mapped formats (R32F and R16 unorm) through whole draws; nothing exercises the UNDEFINED default. Add depthCopyFormatTests to agc_driver_graphics_tests: both mappings, and UNDEFINED for R8G8B8A8_UNORM, R16_SFLOAT, R16_UINT, R32_UINT, D32_SFLOAT and UNDEFINED.

The expected values are the function's switch. The test does not change behaviour and passes on main.

Tested

Release build, MinGW-w64, Windows 10 (19045), main 5d9dcc42d plus this commit (2aeb06f36). ctest -R '^agc_driver_graphics$': passed (6.9 s). With the 16-bit expectation changed to D32_SFLOAT the same test fails with "a 16-bit unorm color format did not map to the 16-bit unorm depth format", so the new cases run. tools/check_conventions.py --base upstream/main: all checks passed. The new function needs no Vulkan device; the executable ran against the NVIDIA GeForce RTX 4080 SUPER driver. Linux/lavapipe not tested.

Checklist

  • Based on current main; no other open PR implements the same tests (no open PR touches DepthCopyFormat; test(agc): cover the DWORD rounding of guest buffer view ranges #6695 and others edit tests/Graphics.cpp at other places)
  • 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); no stubs added
  • No notes, investigation .md 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
  • Unblocks: none (test coverage only)
  • GPUs tested: NVIDIA GeForce RTX 4080 SUPER, Windows 10 (19045); Linux and lavapipe not tested
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

…opies

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xXPBSXx

xXPBSXx commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

@adriadam10 a short request for review of this test-only PR (depthCopyFormatTests in agc_driver_graphics_tests: both mappings of Texture::DepthCopyFormat and its VK_FORMAT_UNDEFINED default, which no test reached; +10/-0, no behavior change). Head 2aeb06f36 is MERGEABLE / CLEAN, the Conventions, Eligibility and Intake checks are green, ctest -R ^agc_driver_graphics$ passes (and fails with a deliberately wrong expectation). #6695 also edits tests/Graphics.cpp at another place.

AI-assisted (Claude Code).

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6451 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp L8162
PR 6683 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp L8162

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 1395 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4650 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5500 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6222 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6297 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6320 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6529 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6535 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6563 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6647 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp

@github-actions github-actions Bot added the agc libSceAgc* label Oct 16, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 17, 2026
@oneandonlydean
oneandonlydean merged commit 46ba2b9 into boykopovar:main Oct 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants