Skip to content

feat(agc): draw point and line polygon modes - #7869

Merged
adriadam10 merged 3 commits into
boykopovar:mainfrom
savvaniss:feat/agc-polygon-mode
Oct 21, 2026
Merged

adriadam10 merged 3 commits into
boykopovar:mainfrom
savvaniss:feat/agc-polygon-mode

Conversation

@savvaniss

@savvaniss savvaniss commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

The AGC driver drew every triangle filled and threw on any PA_SU_SC_MODE_CNTL with POLY_MODE set to a point or line type ("polygon mode, depth bias or nonstandard rasterization is unsupported"). This PR draws those triangles with Vulkan's point and line polygon modes.

  • Decode (State.cpp):
    • POLY_MODE = 1 takes POLYMODE_FRONT_PTYPE / POLYMODE_BACK_PTYPE (0 points, 1 lines, 2 filled) from the faces that are not culled, into a new State::polygonMode.
    • With POLY_MODE = 0 both types are ignored, as the hardware ignores them, and point and line primitives ignore them too.
  • Pipelines (Pipeline.cpp): polygonMode goes into the rasterization state, the pre-rasterization library key and the whole-pipeline key. It is also added to the draw keys and the pipeline journal (format 5).
  • Device (VulkanDevice.cpp):
    • fillModeNonSolid is enabled when the GPU has it.
    • VK_KHR_maintenance5 is enabled with the pipeline-library extensions, so an unwritten PointSize is 1.0.
    • A point or line polygon mode on a device without them throws.
  • Still throws (debt entry added):
    • different front and back types while both faces are drawn (Vulkan has one polygon mode);
    • points other than one pixel (PA_SU_POINT_SIZE = 0x00080008 within PA_SU_POINT_MINMAX), or with a per-vertex size;
    • lines other than one pixel (PA_SU_LINE_CNTL);
    • depth bias with a point or line polygon mode;
    • a point or line polygon mode on a rectangle list;
    • a reserved POLY_MODE or polygon type.

#7275 adds the same fillModeNonSolid device flag, under the same name, for its forced wireframe. Whichever of the two merges second keeps one copy.

The first triangle strip Hasbro Family Fun Pack (CUSA03312) draws, through the PS4 path of #6977, sets PA_SU_SC_MODE_CNTL = 0x8: points for both faces.

Tested

Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release. RX 9070 XT (driver 32.0.31041.1004) and UHD 770 (driver 32.0.101.7088).

  • agc_driver_graphics, decode:
    • points, lines and fill;
    • types ignored without POLY_MODE;
    • culled faces' types ignored;
    • line lists ignore the mode;
    • each rejection above;
    • the three existing rejections with the narrower message.
  • New agc_driver_polygon_mode_draw, on each GPU: a triangle with corners on pixel centres in a 64×16 target.
    • Fill covers its interior.
    • Point mode writes exactly the three corner pixels.
    • Line mode writes both straight edges and none of the interior.
    • Fill again after both covers the interior, so the modes don't share a cached pipeline.
ctest --parallel 4, full suite UHD 770 RX 9070 XT, VkCache emptied first
This PR (a8dd777a0; 9f446e404 only shortens the debt entry) 1634 of 1636 pass; agc_driver_image_table_vouched_lookups and agc_driver_sample_multisample_target fail, as on main (#6957) 1633 of 1633 pass, no device-fault lines

The AMD run leaves out the three APS5_NO_GPL tests. Until #7828 merges, they fault the GPU on main in a parallel AMD run (#7809). agc_driver_graphics, agc_driver_polygon_mode_draw, agc_driver_conservative_rasterization and agc_driver_inactive_vertex_point_size also pass 3 times in a row on each GPU.

Validation: Khronos validation layer 1.4.363 (Vulkan SDK), VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, ctest -R <tests> -V, on main cded26c68 and on this PR merged into it, on both GPUs (AMD driver cache emptied first). Neither log has was not found but was requested by env var VK_INSTANCE_LAYERS. Tests: agc_driver_graphics, agc_driver_conservative_rasterization, agc_driver_inactive_vertex_point_size and this PR's agc_driver_polygon_mode_draw. No validation message at all, on main or with this PR, on either GPU.

  • Risk (CUSA03312), 20 Oct: its first frame still needs this change. With it in the stack of Hasbro Family Fun Pack (CUSA03312) #7198 (on an RX 9070 XT), Risk goes on to play a local match against the AI.

  • 21 Oct: rebased onto main b77bd5880, and the pipeline journal FileFormat set to 6, the next number after main's 5. With ANYPS5_GPU=AMD, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and the validation layer on the RX 9070 XT, these all pass with no VUID- line: agc_driver_graphics, agc_driver_polygon_mode_draw, agc_pipeline_journal, agc_pipeline_journal_long_paths and agc_pipeline_journal_extended_paths.

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: CUSA03312 Hasbro Family Fun Pack (CUSA03312) #7198
  • GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.31041.1004, Windows 11 Pro 26300; Intel UHD Graphics 770, driver 32.0.101.7088, Windows 11 Pro 26300
  • AI-assisted: yes

🤖 Generated with Claude Code

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 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 6612 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp L480
PR 6639 docs/dev/debt/libSceAgcDriver.md L19
PR 7275 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp L480
PR 8365 core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp L45-47
PR 8542 core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp L45-47

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 1191 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4072 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4449 docs/dev/debt/libSceAgcDriver.md
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5431 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5441 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6202 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6290 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6539 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6788 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6801 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6959 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6960 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6973 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6987 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6989 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6995 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 7201 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7410 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7484 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7659 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7800 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/debt/libSceAgcDriver.md
PR 7803 docs/dev/debt/libSceAgcDriver.md
PR 7888 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8014 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8115 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8278 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8489 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8564 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8612 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8658 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 8971 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8992 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9020 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md

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

Verified the diff, conventions, and test coverage in PR #7869:

  • State Decode & Pipeline Keys: State.cpp correctly decodes non-culled face modes when POLY_MODE = 1, maps front/back point and line primitives to VK_POLYGON_MODE_POINT / VK_POLYGON_MODE_LINE, and propagates polygonMode through pre-rasterization library keys, full-pipeline keys, draw keys, and pipeline journal format 5.
  • Device Capabilities: Appropriately requests fillModeNonSolid in VulkanDevice.cpp when supported and leverages VK_KHR_maintenance5 to default unwritten PointSize to 1.0.
  • Technical Debt & Unsupported Configurations: Accurately records edge cases in docs/dev/debt/libSceAgcDriver.md (differing front/back modes with two-sided rasterization, variable line/point widths, depth bias with non-solid modes).
  • Conventions & Tests: Zero code comments introduced. Unit test fixtures added in tests/Graphics.cpp and execution coverage in tests/execution/PolygonModeDraw.cpp. tools/check_conventions.py passes with 0 findings.

@LeandroLP23

Copy link
Copy Markdown
Contributor

Windows and AMD's own driver. AMD Radeon 860M (RDNA 3.5, 1002:1114), driver 32.0.13058.8001, Windows 11, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1. Head merged into main b106f6f (clean merge).

Test This head main's State.cpp, Pipeline.cpp and VulkanDevice.cpp
agc_driver_polygon_mode_draw pass, 3 of 3 fails: point polygon mode: pixel (5, 2) is written, expected kept
agc_driver_graphics pass, 3 of 3 fails: polygon mode, depth bias or nonstandard rasterization is unsupported (register 0x205 = 0x00000008)

The control keeps this PR's headers, since the tests read State::polygonMode and don't build against main's.

AI-assisted: yes (Claude Code)

@savvaniss

Copy link
Copy Markdown
Contributor Author

Title data: CUSA03312, through #6977's PS4 path, draws the triangle strip of its first frame with PA_SU_SC_MODE_CNTL = 0x8, points for both faces. With this PR that draw goes through on an Intel UHD 770, and the title continues to its intro video and the loading of its start menu (#7198).

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added docs agc libSceAgc* labels Oct 19, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@savvaniss one small change before CI: main's PipelineJournal FileFormat is already 5 (6bfb4c5), so this PR's 4 -> 5 bump now merges cleanly without advancing it, while the journal record still changes with the new polygon-mode fields. Could you set it to the next free number (6 on current main)? A few open PRs touch this constant, so the one that merges later takes the next number again at that point.

savvaniss and others added 3 commits October 21, 2026 10:13
PA_SU_SC_MODE_CNTL with POLY_MODE set to a point or line type was refused,
and every triangle was drawn filled. The state decode now takes the polygon
type of the faces that are not culled into State::polygonMode, ignores the
types when POLY_MODE is clear or the primitives are points or lines, and
keeps refusing front and back types that differ while both faces are drawn.

Points are drawn one pixel wide (PA_SU_POINT_SIZE 0x00080008 inside
PA_SU_POINT_MINMAX), the size VK_KHR_maintenance5 gives a point whose
shader does not write PointSize, and lines one pixel wide (PA_SU_LINE_CNTL).
The device enables fillModeNonSolid and maintenance5 when they are
available. The polygon mode joins the pipeline, library and draw keys and
the pipeline journal (format 5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main's journal format is already 5, so this branch's bump to 5 no
longer marks the journals written before its polygon-mode field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@savvaniss
savvaniss force-pushed the feat/agc-polygon-mode branch from 4268752 to 863167d Compare October 21, 2026 07:15
@savvaniss

Copy link
Copy Markdown
Contributor Author

@oneandonlydean done. The journal FileFormat is now 6. Setting it to 6 made the branch conflict with main: the branch's own 4 → 5 bump met main's. So I rebased onto main b77bd5880; the head is 863167d33, and the diff against main is 5 → 6 plus the polygon-mode fields.

On the RX 9070 XT, with the validation layer, all of these pass with no VUID- line:

  • agc_driver_graphics
  • agc_driver_polygon_mode_draw
  • agc_pipeline_journal, _long_paths and _extended_paths

AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@savvaniss thanks, FileFormat 6 on 863167d33 is one above main's 5. Several other open pull requests also write 6, so if one of them lands first, this one will need the next value before merge. We'll check that at merge time.

@adriadam10
adriadam10 merged commit 27fabb6 into boykopovar:main Oct 21, 2026
12 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Re-checked the new head: the only change is the journal FileFormat bump to 6 (main is at 5), as @oneandonlydean asked; the rest matches what was reviewed before. Merged.

milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 21, 2026
Pipeline creation and SPIR-V validation read State::vertexPoints and the
three point sizes, so the pipeline journal's recipe codec and canonical
state now carry them, the State layout guard names its new size and the
journal format becomes 7 (main took 5 for the recipe codec change of boykopovar#5656
and 6 for the polygon modes of boykopovar#7869).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 21, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 7 (main took 5
for the recipe codec change of boykopovar#5656 and 6 for the polygon modes of
boykopovar#7869). A pipeline drawn with a
tessellation capture validates against that draw's capture buffers,
which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 21, 2026
Module records are SPIR-V and take almost all of a journal's bytes, so
APS5_PIPELINE_JOURNAL_MAX_MIB fills with modules and later pipelines
are not recorded (boykopovar#8309). A module record now keeps its identity, stage
and encoded size, followed by a zstd frame (level 1) of the encoded
result; loading and replay expand it before decoding. The journal format
becomes 7 (main took 5 for the recipe codec change of boykopovar#5656 and 6 for
the polygon modes of boykopovar#7869).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 21, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 7 (main took 5
for the recipe codec change of boykopovar#5656 and 6 for the polygon modes of
boykopovar#7869). A pipeline drawn with a
tessellation capture validates against that draw's capture buffers,
which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 21, 2026
Pipeline creation and SPIR-V validation read State::vertexPoints and the
three point sizes, so the pipeline journal's recipe codec and canonical
state now carry them, the State layout guard names its new size and the
journal format becomes 7 (main took 5 for the recipe codec change of boykopovar#5656
and 6 for the polygon modes of boykopovar#7869).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 22, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 7 (main took 5
for the recipe codec change of boykopovar#5656 and 6 for the polygon modes of
boykopovar#7869). A pipeline drawn with a
tessellation capture validates against that draw's capture buffers,
which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 22, 2026
Module records are SPIR-V and take almost all of a journal's bytes, so
APS5_PIPELINE_JOURNAL_MAX_MIB fills with modules and later pipelines
are not recorded (boykopovar#8309). A module record now keeps its identity, stage
and encoded size, followed by a zstd frame (level 1) of the encoded
result; loading and replay expand it before decoding. The journal format
becomes 7 (main took 5 for the recipe codec change of boykopovar#5656 and 6 for
the polygon modes of boykopovar#7869).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 22, 2026
Pipeline creation and SPIR-V validation read State::vertexPoints and the
three point sizes, so the pipeline journal's recipe codec and canonical
state now carry them, the State layout guard names its new size and the
journal format becomes 8 (main took 5 for the recipe codec change of
boykopovar#5656, 6 for the polygon modes of boykopovar#7869 and 7 for the truncated coverage
of boykopovar#8115).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 23, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 9 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115 and 8 for the point lists of
boykopovar#6801). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 23, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 9 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115 and 8 for the point lists of
boykopovar#6801). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 23, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 9 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115 and 8 for the point lists of
boykopovar#6801). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 23, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 9 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115 and 8 for the point lists of
boykopovar#6801). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 24, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 10 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115, 8 for the point lists of boykopovar#6801
and 9 for the 4_4_4_4 UNORM target merges of boykopovar#8564). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 24, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 12 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115, 8 for the point lists of boykopovar#6801
and 9 for the 4_4_4_4 UNORM target merges of boykopovar#8564; open pull requests
use 10 and 11). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 24, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 12 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115, 8 for the point lists of boykopovar#6801
9 for the 4_4_4_4 UNORM target merges of boykopovar#8564 and 10 for the colour
logic operation of boykopovar#9348; boykopovar#8365 uses 11, and the number is set to main+1
when this lands). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 24, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 12 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115, 8 for the point lists of boykopovar#6801
9 for the 4_4_4_4 UNORM target merges of boykopovar#8564 and 10 for the colour
logic operation of boykopovar#9348; boykopovar#8365 uses 11, and the number is set to main+1
when this lands). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milescoviello added a commit to milescoviello/AnyPS5 that referenced this pull request Oct 25, 2026
The pipeline journal guards State and ShaderStages, which this branch
extends. The recipe codec and canonical state now carry the hull wave
size, the geometry stage after tessellation, the merged hull flag
(TessellationConfiguration keeps its size, so its guard can't see it)
and rasterizer discard, and the journal format becomes 12 (main took 5
for the recipe codec change of boykopovar#5656, 6 for the polygon modes of boykopovar#7869,
7 for the truncated coverage of boykopovar#8115, 8 for the point lists of boykopovar#6801
9 for the 4_4_4_4 UNORM target merges of boykopovar#8564 and 10 for the colour
logic operation of boykopovar#9348; boykopovar#8365 uses 11, and the number is set to main+1
when this lands). A draw's tessellation capture validates against that draw's
capture buffers, which a replay doesn't have, so it isn't journaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants