Skip to content

test(agc): skip the PS4 multisampled color fill test without 2-sample color targets - #1700

Open
Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/27800
Open

Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/27800

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#27800, originally opened by peacocksir.

Source commit: b4fc0b8fccb3a7e8691969fdcefd40d9493e3ae9. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

agc_driver_gcn_multisample_color_fill, added by boykopovar#25802, fails on Mesa lavapipe at its first case:

AGC graphics: PS4 multisampled color fill: reading zeroed color memory no draw rendered to was refused: AGC graphics: the device cannot render color with the target's sample count

Every case in the test uses a 2-sample PS4 texture or target (Samples = 2). MultisampleTarget.cpp refuses a host target whose sample count is not in the device's framebufferColorSampleCounts (Require((context.limits.framebufferColorSampleCounts & samples) != 0, ...)). lavapipe 25.2.8 reports only SAMPLE_COUNT_1_BIT and SAMPLE_COUNT_4_BIT there (vulkaninfo), so on lavapipe the test can't reach any of its checks.

The test now checks that same limit right after it gets the graphics context. Without 2 samples, it prints skipped, the device lacks 2-sample color targets (framebufferColorSampleCounts 0x5) and returns the skip code (77, from agc_add_default_test). On a device that has 2-sample color targets it runs exactly what main runs. No production code changes.

On lavapipe this leaves the test with nothing to check. Changing the sample count isn't an option, because 2-sample PS4 surfaces are what boykopovar#25802 models. agc_gcn_color_target (boykopovar#25802's MultisampledFootprintsAndFills) doesn't need a GPU and still checks the footprints on lavapipe.

The check covers only the color attachment, the limit MultisampleTarget.cpp refuses on. The test also samples 2-sample R32_SFLOAT images and reads them back as 2-sample R32_UINT. A device that has 2-sample color targets but can't sample those formats at 2 samples would still fail, as on main. I didn't add checks for limits I haven't seen fail.

Tested

Ubuntu 24.04, kernel 6.8, GCC 13.3.0, Ninja, Release, BUILD_TESTING=ON. Head b4fc0b8fcc on main 4b0f137c86. GPU: Mesa lavapipe 25.2.8 (llvmpipe (LLVM 20.1.2, 256 bits)), /dev/udmabuf available. Validation layer built from source, 1.4.335.

Focused runs, main's test file and this branch's in the same build tree, 3 runs each, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R '^agc_driver_gcn_multisample_color_fill$' -V:

Result Output
main Failed 3/3 the refusal above
this PR Skipped 3/3 skipped, the device lacks 2-sample color targets (framebufferColorSampleCounts 0x5)

Every log shows Insert instance layer "VK_LAYER_KHRONOS_validation", none shows was not found but was requested by env var VK_INSTANCE_LAYERS, and none contains VUID-.

Full ctest --test-dir build --output-on-failure -j6 on this branch: 7131/7139 pass, agc_driver_gcn_multisample_color_fill is skipped, and agc_gcn_color_target passes. The 8 failures are in other test executables, built from files this PR does not touch:

main's Linux CI job has not finished a run since boykopovar#25802 merged: its 34 push runs since then are cancelled (32) or queued (2).

python3 tools/check_conventions.py --base origin/main: all checks passed. python3 tools/pr_overlap.py --branch: no open pull request shares files or exports with this branch.

Not tested: any real GPU or console. On a device whose framebufferColorSampleCounts includes 2 samples, which is true of the NVIDIA GPUs boykopovar#25802 was tested on, the new check passes and the test runs what main runs.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: Mesa lavapipe 25.2.8 (Linux)
  • AI-assisted: yes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • The multisample color-fill test now checks whether 2-sample color targets are supported before running. On unsupported devices, it reports the available sample-count capabilities and skips the test rather than attempting an unsupported configuration.

… color targets

Every case in agc_driver_gcn_multisample_color_fill uses a 2-sample
target, and MultisampleTarget.cpp refuses one when the device's
framebufferColorSampleCounts lacks that count. lavapipe exposes only 1
and 4 samples, so the test failed at its first case there. It now checks
the same limit first and skips.

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

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Multisample Test

Layer / File(s) Summary
Check sample-count support
core/libs/prx/libSceAgcDriver/tests/execution/GcnMultisampleColorFill.cpp
The test checks whether framebufferColorSampleCounts includes Samples. If not, it prints the supported mask and returns VulkanTestSkipped.

Change: Other

Merge Risk: Minimal · up to b4fc0

This change makes the multisample color-fill test skip instead of fail on devices without 2-sample color-target support, such as lavapipe. It affects only a test and has no production impact, so it is ready to merge.

Security architecture risk: Minimal · up to b4fc0

The test now reports a skip when the Vulkan device cannot render to a 2-sample color target. On supported devices, it runs the same checks as before.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

⏳ This installation's GitHub REST API quota is critically low (1.5% remaining as of 2026-12-02T23:04:16Z). This hourly window resets at 2026-12-02T23:40:00Z; reviews may be slow or delayed until then.

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 1
  • Waived: $0.25 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 148f889e-22ee-4e02-ae37-5ed038013ada
Commits

Reviewing files that changed from the base of the PR and between 4131f51 and b4fc0b8.

Files selected for processing: 1

  • core/libs/prx/libSceAgcDriver/tests/execution/GcnMultisampleColorFill.cpp

Limit details: You’ve used all 10 included reviews currently available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants