Skip to content

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

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
peacocksir:test/agc-ps4-msaa-fill-two-samples
Dec 5, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
peacocksir:test/agc-ps4-msaa-fill-two-samples

Conversation

@peacocksir

@peacocksir peacocksir commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What

agc_driver_gcn_multisample_color_fill, added by #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 #25802 models. agc_gcn_color_target (#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 #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 #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 multisampled color-fill test checks whether the device supports 2-sample color targets before running. If unsupported, the test is skipped and the available sample-count options are reported. Supported devices continue through the existing test flow.

… 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 Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Multisample color-fill test

Layer / File(s) Summary
Check color sample-count support
core/libs/prx/libSceAgcDriver/tests/execution/GcnMultisampleColorFill.cpp
The test returns VulkanTestSkipped and prints supported sample-count flags when the required sample count is unavailable. Otherwise, it continues to detiler setup.

Suggested reviewers: adam25136, marczx10

Change: Other

Merge Risk: Minimal · up to b4fc0

This change makes a multisample color-fill test skip on devices without 2-sample color targets, such as lavapipe, instead of failing. There is no production code impact, and it is low risk to merge.

Security architecture risk: Minimal · up to b4fc0

The test now skips on devices that lack the required two-sample color attachment support. Supported devices still run the existing test, and production behavior is unchanged.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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: 96fe7408-381a-4ffd-9765-a833252ca586
Commits

Reviewing files that changed from the base of the PR and between 6b74d9d and b4fc0b8.

Files selected for processing: 1

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

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@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 — looks good

Nothing blocks this change; the capability guard matches the test’s two-sample target requirement and returns the existing skip code when the device lacks it.

What I ran

Reviewed head b4fc0b8fccb3a7e8691969fdcefd40d9493e3ae9. Read the prepared description, commits, manifest and diff, and the complete changed source file through repo_read.py. No build or tests were run during this review.

Results

Check Result Note
Patch and changed code passed Guard checks the two-sample bit
Build and tests not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

No build or tests were run. The author reports focused runs and a full test suite on lavapipe; these results were not independently verified. No real GPU or console behavior was verified. The review manifest lists one changed file, and that file was read; no exclusions were listed in the manifest. files.json was unavailable through the reader.

To get this to a good state

Nothing is required.

@JJenkx

JJenkx commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Windows / AMD at this head (b4fc0b8fccb3): agc_driver_gcn_multisample_color_fill passes, 3/3 runs. CTest reports it as Passed, not skipped, so the RX 6700 XT exposes 2-sample color targets and the fill test itself ran. The new framebufferColorSampleCounts skip doesn't fire here.

Setup:

  • Windows 11 22621, Ryzen 9 5950X, Radeon RX 6700 XT (AMD driver 26.11.2), GCC 15.2 UCRT r7, Release, ANYPS5_REQUIRE_VULKAN=1.
  • No validation layer loaded.
  • The exact PR head was built (not merged into main).
  • 3 runs through the shared FIFO.

AI-assisted: yes.

@ligmaSec ligmaSec 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.

Paired Linux CTest runs reproduced the capability case. On b97867d3ce6b, agc_driver_gcn_multisample_color_fill failed with an unsupported target sample count. With the patch, it reported an explicit skip for framebufferColorSampleCounts=0x5. The scalar-buffer control passed on both. Both Mesa lavapipe logs show Khronos validation 1.4.369 inserted and zero VUID- errors.

AI-assisted: yes.

@oneandonlydean
oneandonlydean merged commit 7e87e2e into boykopovar:main Dec 5, 2026
15 of 17 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.

5 participants