Skip to content

fix(agc): pass the tile mode of a mismatched depth plane copy as an int - #7504

Open
milescoviello wants to merge 1 commit into
boykopovar:mainfrom
milescoviello:fix/depth-copy-tile-mode-format
Open

milescoviello wants to merge 1 commit into
boykopovar:mainfrom
milescoviello:fix/depth-copy-tile-mode-format

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What

The error for a depth plane copy whose geometry doesn't match its layers (DepthSurface.cpp) passed resource.tileMode, a TextureTileMode enum class, straight to a %u conversion. A scoped enumeration isn't promoted in a variadic call, so the conversion doesn't match its argument. GCC 13 warns about it in every build:

core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:868:214: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 12 has type ‘const AgcDriver::Graphics::TextureTileMode’ [-Wformat=]

It is now cast to int and printed with %d, the way the two other tile mode messages in the same file (the storage image access and replaced-view errors) already print it.

Tested

Ubuntu 24.04 (Linux 6.8), GCC 13.3, NVIDIA RTX 4070 Ti, driver 595.99.02.

  • cmake --build build: the warning above is gone, and DepthSurface.cpp builds without warnings.

  • ctest -R "agc_driver_depth|native_depth|depth_plane|depth_storage": 19/19 pass. No test reaches this error (it fires only on a geometry mismatch), so there's no red/green test. The change only touches the message's arguments.

  • tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py lists only conflicting PRs that it could not compare on DepthSurface.cpp, and none of their diffs touch this message.

  • @wachi35676 tested 352f6236c. On WSL Ubuntu 24.04 with GCC 13.3, main prints the -Wformat warning at DepthSurface.cpp:868 and this PR builds the object without warnings. MinGW GCC 15.2 gives no warning either way. The 19 agc_driver_depth|native_depth|depth_plane|depth_storage tests pass on an RTX 5070 Ti (617.42) and an AMD Radeon iGPU (32.0.21042.62).

  • Windows, Intel and AMD: @savvaniss ran the full CTest (1,526 tests, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Intel UHD 770 and AMD RX 9070 XT) with head 352f623 merged into main 0737757, alone and together with 13 other open AGC and shader PRs. Neither GPU fails anything beyond main's own failures on that machine.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99.02, Ubuntu 24.04 (Linux 6.8); NVIDIA RTX 5070 Ti, 617.42, and an AMD Radeon iGPU, 32.0.21042.62, Windows (by @wachi35676); Intel UHD 770 and AMD RX 9070 XT, Windows (by @savvaniss)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

The error for a depth plane copy whose geometry does not match its
layers passed the TextureTileMode enum class straight to a %u
conversion. GCC warns about it (-Wformat), and a scoped enumeration is
not promoted in a variadic call. Cast it to int and print it with %d,
as the two other tile mode messages in DepthSurface.cpp already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 18, 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 1368 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6146 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6300 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6683 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6727 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7233 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7800 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp

@wachi35676

Copy link
Copy Markdown
Contributor

Tested at 352f6236c.

  • WSL Ubuntu 24.04, GCC 13.3.0, main 9f25d0bf5: building DepthSurface.cpp.o prints DepthSurface.cpp:868:214: warning: format '%u' expects argument of type 'unsigned int', but argument 12 has type 'const AgcDriver::Graphics::TextureTileMode' [-Wformat=]. With this PR merged, the object builds with no warnings.
  • Windows, MinGW GCC 15.2.0: no warning either way.
  • The 19 agc_driver_depth|native_depth|depth_plane|depth_storage tests pass on an RTX 5070 Ti (617.42) and an AMD Radeon iGPU (32.0.21042.62).

AI-assisted: yes (Claude Code); results above were run on this machine.

@milescoviello

Copy link
Copy Markdown
Contributor Author

Thanks @wachi35676 for checking the warning on both toolchains and running the depth tests on two GPUs. Added to the description.

AI-assisted: yes (Claude Code)

@savvaniss

Copy link
Copy Markdown
Contributor

Windows regression check on an Intel UHD 770 and an AMD RX 9070 XT: no change in the full CTest results.

Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, with VkCache emptied first. This head 352f6236c merged into main 07377573f.

This PR adds no test. Full CTest (--parallel 4, 1526 tests) with this head merged fails the same tests as main alone on this machine: the five image-table tests (#6647) and agc_driver_sample_multisample_target (#6957) on the UHD 770, and agc_driver_layered_volume_vertex_no_gpl (#4768) on the RX 9070 XT.

I also ran full CTest with this PR and the 13 other open AGC and shader PRs I tested in the same batch merged together (#7668, #7659, #7432, #7426, #7413, #7480, #7465, #7466, #7464, #7449, #7489, #7673, #7560). Neither GPU showed a failure beyond main's own: the five image-table tests (#6647) and agc_driver_sample_multisample_target (#6957) on the UHD 770, and agc_driver_layered_volume_vertex_no_gpl (#4768) on the RX 9070 XT.

AI-assisted: yes (Claude Code)

@milescoviello

Copy link
Copy Markdown
Contributor Author

@savvaniss thanks for the full CTest on both GPUs, alone and in the 14-PR batch. It's in the description now.

AI-assisted: yes (Claude Code)

This branch has not been deployed

No deployments
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.

3 participants