Skip to content

fix(agc): allow MSAA_ENABLE single-sample points - #21630

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Gag21:fix/agc-msaa-enable-single-sample-points
Nov 29, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Gag21:fix/agc-msaa-enable-single-sample-points

Conversation

@Gag21

@Gag21 Gag21 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What

Allow PA_SC_MODE_CNTL_0.MSAA_ENABLE on single-sample targets when rasterizing point lists (VGT_PRIMITIVE_TYPE == 1), treating them like single-sample unaliased point draws when sample 0 is at pixel center, matching existing handling for triangles, lines, and rectangles.

Tested

  • Windows 11, MinGW GCC 16.2.0, NVIDIA GeForce RTX 3070 (driver 572.16 / Vulkan 1.4.363.1).
  • Unit tests: agc_driver_graphics_tests.exe (Passed).
  • GPU execution test: ctest --test-dir build -R "agc_driver_msaa_enable_single_sample" -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer (Passed, loader inserted VK_LAYER_KHRONOS_validation, 0 VUID- validation errors).

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: NVIDIA GeForce RTX 3070, driver 572.16 (Vulkan 1.4.363.1), Windows 11
  • AI-assisted: yes

@github-actions github-actions Bot added docs agc libSceAgc* labels Nov 16, 2026
@domx4q

domx4q commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Linux NVIDIA run with the Khronos validation layer, since the description's run is on Windows.

Setup: Arch Linux, kernel 7.3.4, GCC 16.2.1 Release, NVIDIA GeForce RTX 4090 (10de:2684), driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head f8582af5bd merged with --no-ff onto main e4caa07950 (f7444574b6, clean merge).

MsaaEnableSingleSampleTests runs in agc_driver_alpha_to_coverage_state and in the default run of agc_driver_graphics_tests (agc_graphics_profile_draw), so both are in the set:

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_msaa_enable_single_sample|agc_driver_alpha_to_coverage_state|agc_graphics_profile_draw)$' -V
main e4caa07950 this PR
Result 3/3 passed 3/3 passed
agc_driver_msaa_enable_single_sample drew the same triangle, line list and line strip pixels drew the same triangle, line list, line strip and point list pixels
Insert instance layer "VK_LAYER_KHRONOS_validation" 2 2
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- 0 0

Both logs show Selected GPU name=NVIDIA GeForce RTX 4090.

No new VUID- errors; all focused tests pass on Ada, including the new point list draw.

AI-assisted: yes (Claude Code)

@github-actions

github-actions Bot commented Nov 16, 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 1395 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6481 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 8246 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9335 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9356 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9387 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9712 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9895 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9897 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9915 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 10351 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 13928 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 13929 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 14032 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 14473 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 14944 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 15570 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 17056 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 17611 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 19821 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 20010 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 20153 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 20728 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 20845 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 21960 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 22514 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 23252 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 23258 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 23281 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 23818 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 24049 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 24083 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 24327 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 24781 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 25534 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 25557 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 25684 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 26084 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 26197 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 26630 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 26706 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 27698 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 28142 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp

A point list drawn with PA_SC_MODE_CNTL_0.MSAA_ENABLE on a single-sample
target whose sample is at the pixel center is drawn like the same state
without the bit, as triangles, lines and rectangles already are.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@Gag21
Gag21 force-pushed the fix/agc-msaa-enable-single-sample-points branch from f8582af to b2bc297 Compare November 17, 2026 05:38
@rafaconvaitis

Copy link
Copy Markdown
Contributor

Windows + AMD run; I found no AMD run in the description or in the comments. Head b2bc297915 merged alone onto main 9a50e1014e with git merge --no-ff (clean merge).

Setup: Windows 11 25H2 (build 26200), AMD Radeon 760M integrated graphics (1002:15bf, Vulkan device name Radeon 5), AMD Software 26.11.2 (driver 32.0.32029.2010, Vulkan 1.4.359), selected with ANYPS5_GPU=Radeon, WinLibs GCC 15.2.0 r7 UCRT, Release, BUILD_TESTING=ON, Khronos validation layer 1.4.363 (LunarG SDK 1.4.363.1). Only the focused test targets were built; the other execution tests were left out with ANYPS5_AGC_EXECUTION_TESTS.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, ctest -R '^(agc_driver_msaa_enable_single_sample)$' -V -j 1, 3 runs per side.

test main this PR this PR's tests on main's sources (1 run)
agc_driver_msaa_enable_single_sample passes 3/3 passes 3/3 aborts (exit code 0xc0000409)
  • Negative control: with the tests of this PR built on main's sources (without the 1 production file this PR changes), agc_driver_msaa_enable_single_sample does not pass, so on this driver the test detects the change. It aborts after [gpu] driver failure: MSAA_ENABLE on a single-sample target for primitives other than triangles, lines and rectangles is unsupported (register 0x242 = 0x00000001).
  • VUID- lines: 0 in the main and PR logs. Every run logs Selected GPU name=Radeon 5 vendor=0x1002 device=0x15bf and Insert instance layer "VK_LAYER_KHRONOS_validation", and none logs was not found but was requested.

AI-assisted: yes (build and runs scripted with an AI assistant, on the hardware above).

@Colewiz7

Copy link
Copy Markdown
Contributor

Head b2bc297915 merged onto main 7c836568c8 as 1f5b8859aa, no conflict. Linux 7.3.4, GCC 16.2.1 Release, Mesa 26.2.6 RADV, RX 7900 XT (gfx1100) and 7800X3D iGPU (gfx1036).

No new failures and no new validation messages on either GPU.

RX 7900 XT iGPU
tests run (6206 on the 7900 XT, the 2007 GPU ones on the iGPU), new failures vs main none none
-R '^agc' (1940 tests) with the layer, new failures vs main none none
VUID- / SYNC-HAZARD lines 0 / 0 0 / 0

Layer runs used VK_LAYER_KHRONOS_validation 1.4.363.1 with VK_LOADER_DEBUG=layer and ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1; the loader inserted the layer in every run, and the set of distinct validation messages matches main.

AI-assisted: yes

@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 — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

Reviewed head b2bc29791586b6e2212ba048d7a1a1b0f2f9003f using the prepared diff and repo_read.py; no commands or tests were run. Read the description, commit list, manifest, diff, the full execution test and debt note, and relevant ranges of State.cpp and Graphics.cpp.

Results

Check Result Note
Code review passed No concrete defect found in inspected changes.
Unit tests not run The description reports a pass.
GPU execution test not run The description reports a pass on Windows 11 with an RTX 3070.

Findings

Blocking

None.

Non-blocking

None.

Not verified

Tests and hardware behavior were not independently verified. Graphics.cpp was excluded from the review folder due to its size; I read the changed lines and nearby context through repo_read.py, not the entire file. No other files were excluded from the changed-file list.

To get this to a good state

Nothing is required.

This was referenced Nov 21, 2026
@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head b2bc297915, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#18156, #21208, #22013, #22795, #23226, #23385, #24324, #24533, #24582, #24690, #24693, #17553, #19619, #20085, #21081, #19682, #22123, #22529, #22572, #22662, #23479, #23787, #24568, #15330, #21249, #21713, #22040, #23490, #24394). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
agc_driver_graphics, agc_driver_graphics_dump_graphics, agc_driver_msaa_enable_single_sample and 4 more (7 tests, matched by name to the test file this PR changes) all pass all pass

Whole batch: the full ctest -j 12 (6540 tests) on the RTX 3080 has 5 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Traced to other PRs of the batch, each by reverting it and testing again: #17553 (guest_memory); none is in this PR's area. The 2143 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

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

Labels

agc libSceAgc* docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants