feat(agc): draw line polygon modes at the PA_SU_LINE_CNTL width #9489

Merged
Gooshy merged 3 commits from upstream-pr/9489 into main 2026-11-06 13:25:33 +00:00
Gooshy commented 2026-10-21 23:18:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-21T23:18:08Z.


What

A line polygon mode (PA_SU_SC_MODE_CNTL polygon type 1) was refused unless PA_SU_LINE_CNTL.WIDTH was 8, i.e. lines exactly one pixel wide. A title that draws its wireframe pass with two-pixel lines (PA_SU_LINE_CNTL=0x10) therefore stopped its draw with a line polygon mode wider or narrower than one pixel.

  • The state decode takes the width into State::lineWidth as WIDTH / 8 pixels, the scale main's one-pixel check already uses (8 = one pixel) and the one RADV programs (S_028A08_WIDTH(lineWidth * 8) in radv_cmd_buffer.c). Only a zero width is still refused.
  • The pipeline passes the width as VkPipelineRasterizationStateCreateInfo::lineWidth. A width other than one pixel needs the wideLines feature, which the device now enables when available, and must lie within limits.lineWidthRange on a whole number of limits.lineWidthGranularity steps from its low end. ValidateLineWidth checks all three and throws with the width and the limits otherwise.
  • The width joins the pipeline key, the pre-rasterization library key, the draw decode comparison and the validation key, so pipelines of different widths are not shared. State grows by 8 bytes, so the pipeline journal's static size check moves to 944 and FileFormat to 16.

DepthBoundsBiasTests now decodes a 0x10 width as two pixels and still refuses a zero width, and checks ValidateLineWidth: one pixel without wideLines, two pixels refused without it, widths at and past both ends of the range, a width off the granularity steps, and a device whose range holds only one pixel.

Tested

Bazzite (Fedora 44, kernel 7.2.11), AMD Radeon RX 9060 XT, RADV Mesa 26.2.5 (wideLines, lineWidthRange [0, 8], lineWidthGranularity 0.125). Results are for all three commits.

  • Rebased onto main 04a9eb4fa. main grew State to 936, so with lineWidth the size check is 944; FileFormat is 16 (one past main's 15).
  • Full ctest on this change and on main 04a9eb4fa, built and run in the same tree: 56 of 3,828 tests fail on this change, and all 56 fail on main too, so the change adds none. Most of them are shader recompiler tests (agc_shader_*, agc_spirv_*) aborting with free(): invalid pointer on main itself on this machine.
  • agc_driver_graphics and agc_driver_polygon_mode_draw with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (VK_LAYER_KHRONOS_validation 1.4.341), run with ctest -V on main 04a9eb4fa and on this change 62bfdab9f: both pass on both, no VUID- errors on either, and neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS.
  • A title whose fights draw two-pixel wireframe lines stopped at its first fight on main; with this change, on a local branch that also carries other unrelated changes, the fights run.

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: PPSA01619 #15124
  • GPUs tested: AMD Radeon RX 9060 XT (RDNA4), RADV Mesa 26.2.5, Bazzite Linux (Fedora 44, kernel 7.2.11)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4959652666 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489). Originally posted by [Gooshy](https://github.com/Gooshy) on 2026-10-21T23:18:08Z. --- ### What A line polygon mode (`PA_SU_SC_MODE_CNTL` polygon type 1) was refused unless `PA_SU_LINE_CNTL.WIDTH` was 8, i.e. lines exactly one pixel wide. A title that draws its wireframe pass with two-pixel lines (`PA_SU_LINE_CNTL=0x10`) therefore stopped its draw with `a line polygon mode wider or narrower than one pixel`. - The state decode takes the width into `State::lineWidth` as `WIDTH / 8` pixels, the scale `main`'s one-pixel check already uses (8 = one pixel) and the one RADV programs (`S_028A08_WIDTH(lineWidth * 8)` in `radv_cmd_buffer.c`). Only a zero width is still refused. - The pipeline passes the width as `VkPipelineRasterizationStateCreateInfo::lineWidth`. A width other than one pixel needs the `wideLines` feature, which the device now enables when available, and must lie within `limits.lineWidthRange` on a whole number of `limits.lineWidthGranularity` steps from its low end. `ValidateLineWidth` checks all three and throws with the width and the limits otherwise. - The width joins the pipeline key, the pre-rasterization library key, the draw decode comparison and the validation key, so pipelines of different widths are not shared. `State` grows by 8 bytes, so the pipeline journal's static size check moves to 944 and `FileFormat` to 16. `DepthBoundsBiasTests` now decodes a 0x10 width as two pixels and still refuses a zero width, and checks `ValidateLineWidth`: one pixel without `wideLines`, two pixels refused without it, widths at and past both ends of the range, a width off the granularity steps, and a device whose range holds only one pixel. ### Tested Bazzite (Fedora 44, kernel 7.2.11), AMD Radeon RX 9060 XT, RADV Mesa 26.2.5 (`wideLines`, `lineWidthRange` [0, 8], `lineWidthGranularity` 0.125). Results are for all three commits. - Rebased onto `main` 04a9eb4fa. `main` grew `State` to 936, so with `lineWidth` the size check is 944; `FileFormat` is 16 (one past `main`'s 15). - Full ctest on this change and on `main` 04a9eb4fa, built and run in the same tree: 56 of 3,828 tests fail on this change, and all 56 fail on `main` too, so the change adds none. Most of them are shader recompiler tests (`agc_shader_*`, `agc_spirv_*`) aborting with `free(): invalid pointer` on `main` itself on this machine. - `agc_driver_graphics` and `agc_driver_polygon_mode_draw` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (`VK_LAYER_KHRONOS_validation` 1.4.341), run with `ctest -V` on `main` 04a9eb4fa and on this change 62bfdab9f: both pass on both, no `VUID-` errors on either, and neither log reports `was not found but was requested by env var VK_INSTANCE_LAYERS`. - A title whose fights draw two-pixel wireframe lines stopped at its first fight on `main`; with this change, on a local branch that also carries other unrelated changes, the fights run. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: PPSA01619 #15124 - [x] GPUs tested: AMD Radeon RX 9060 XT (RDNA4), RADV Mesa 26.2.5, Bazzite Linux (Fedora 44, kernel 7.2.11) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-21 23:26:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T23:26:00Z.

Review: CHANGES_REQUESTED


The state decode and pipeline-key changes carry the requested width through to Vulkan, and the reported validation-layer run is useful. One unsupported-device case is still unchecked: enabling wideLines does not guarantee that a device accepts every non-unit line width. Vulkan also constrains lineWidth to properties.limits.lineWidthRange and lineWidthGranularity. A device may expose the feature but not support the decoded 2-pixel width (or its granularity); this path currently passes that value to pipeline creation. Please check the requested width against those limits and throw a clear error when unsupported, with focused coverage for the range/granularity decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607457832 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5607457832). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T23:26:00Z. **Review:** CHANGES_REQUESTED --- The state decode and pipeline-key changes carry the requested width through to Vulkan, and the reported validation-layer run is useful. One unsupported-device case is still unchecked: enabling `wideLines` does not guarantee that a device accepts every non-unit line width. Vulkan also constrains `lineWidth` to `properties.limits.lineWidthRange` and `lineWidthGranularity`. A device may expose the feature but not support the decoded 2-pixel width (or its granularity); this path currently passes that value to pipeline creation. Please check the requested width against those limits and throw a clear error when unsupported, with focused coverage for the range/granularity decision.
MarcZX10 commented 2026-10-21 23:29:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T23:29:37Z.

Review: COMMENTED


The overlap run also found shared-line changes that need an explicit merge order. I manually checked the concrete overlaps: #9348 adds colorRop to the same DrawRegisterKey.cpp comparison predicate this PR extends with lineWidth; #9450 and open pipeline-journal PRs #6612, #6639, #6801, #7948, #8365 and #8542 also change PipelineJournal.cpp state encoding/size or FileFormat. These are separate features, but merging against the current format independently can lose a field or leave the format/size bump wrong. Please coordinate with the relevant authors which changes land first, then update this checklist's Depends on: line as the project rule requires. The overlap report also lists older conflicting journal/graphics PRs for manual review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607482064 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5607482064). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T23:29:37Z. **Review:** COMMENTED --- The overlap run also found shared-line changes that need an explicit merge order. I manually checked the concrete overlaps: #9348 adds `colorRop` to the same `DrawRegisterKey.cpp` comparison predicate this PR extends with `lineWidth`; #9450 and open pipeline-journal PRs #6612, #6639, #6801, #7948, #8365 and #8542 also change `PipelineJournal.cpp` state encoding/size or `FileFormat`. These are separate features, but merging against the current format independently can lose a field or leave the format/size bump wrong. Please coordinate with the relevant authors which changes land first, then update this checklist's `Depends on:` line as the project rule requires. The overlap report also lists older conflicting journal/graphics PRs for manual review.
Gooshy commented 2026-10-21 23:45:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-21T23:45:08Z.


Thanks for the review.

Line width limits: done in 75cf7f4ad. ValidateLineWidth now refuses a width other than one pixel when:

  • the device lacks wideLines,
  • the width is outside limits.lineWidthRange, or
  • the width is not a whole number of limits.lineWidthGranularity steps from the range's low end.

The error names the width and the limits. Pipelines call it in place of the wideLines-only check. DepthBoundsBiasTests covers each of those cases, plus a device whose range holds only one pixel. On the RX 9060 XT (RADV, range [0, 8], granularity 0.125) the full suite fails only where main does. The validated agc_driver_graphics run shows no VUID- errors.

Merge order: most of #9348, #9450, #6612, #6639, #6801, #7948, #8365 and #8542 move FileFormat from 6 to 7, and #9348 and #9450 extend the same sameDecode comparison. This PR does not need to go first. Whichever of them lands first, I'll rebase this onto it, move FileFormat and the State size check past it, and keep their fields in the comparison. The Depends on: line now says so. If you'd rather this wait for a particular one, tell me which and I'll mark it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329085151 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#issuecomment-6329085151). Originally posted by [Gooshy](https://github.com/Gooshy) on 2026-10-21T23:45:08Z. --- Thanks for the review. **Line width limits:** done in 75cf7f4ad. `ValidateLineWidth` now refuses a width other than one pixel when: - the device lacks `wideLines`, - the width is outside `limits.lineWidthRange`, or - the width is not a whole number of `limits.lineWidthGranularity` steps from the range's low end. The error names the width and the limits. Pipelines call it in place of the `wideLines`-only check. `DepthBoundsBiasTests` covers each of those cases, plus a device whose range holds only one pixel. On the RX 9060 XT (RADV, range [0, 8], granularity 0.125) the full suite fails only where `main` does. The validated `agc_driver_graphics` run shows no `VUID-` errors. **Merge order:** most of #9348, #9450, #6612, #6639, #6801, #7948, #8365 and #8542 move `FileFormat` from 6 to 7, and #9348 and #9450 extend the same `sameDecode` comparison. This PR does not need to go first. Whichever of them lands first, I'll rebase this onto it, move `FileFormat` and the `State` size check past it, and keep their fields in the comparison. The `Depends on:` line now says so. If you'd rather this wait for a particular one, tell me which and I'll mark it.
MarcZX10 commented 2026-10-22 02:14:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T02:14:22Z.


The updated line-width limits code resolves the earlier device-limit concern, and the reported agc_driver_graphics main/change validation run has the required layer checks and no VUID errors. I do not see resolution yet for the overlap/checklist items from my earlier review: the current body still says Depends on: none, although it lists live shared edits in #9348, #9450 and the pipeline-journal PRs, and I do not see agreement from those authors on an integration order. Please coordinate and record the agreed order/dependencies in the checklist so journal format/size and the sameDecode predicate are preserved. Also, Unblocks: PPSA01619 needs the Game bring-up discussion number required by the template; I could not locate that discussion in the repository search. Please add the matching discussion or change the checklist to none. The latest hosted checks shown here are conventions and labels; I did not run local tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331046664 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#issuecomment-6331046664). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T02:14:22Z. --- The updated line-width limits code resolves the earlier device-limit concern, and the reported `agc_driver_graphics` main/change validation run has the required layer checks and no VUID errors. I do not see resolution yet for the overlap/checklist items from my earlier review: the current body still says `Depends on: none`, although it lists live shared edits in #9348, #9450 and the pipeline-journal PRs, and I do not see agreement from those authors on an integration order. Please coordinate and record the agreed order/dependencies in the checklist so journal format/size and the `sameDecode` predicate are preserved. Also, `Unblocks: PPSA01619` needs the Game bring-up discussion number required by the template; I could not locate that discussion in the repository search. Please add the matching discussion or change the checklist to `none`. The latest hosted checks shown here are conventions and labels; I did not run local tests.
Gooshy commented 2026-10-22 02:15:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-22T02:15:28Z.


Thanks. On the two open items:

Integration order. The proposal is that this PR goes after the others, so none of them has to rebase for it:

Whenever one of them merges, I'll rebase this onto main. The rebase keeps their fields in sameDecode, keeps their journal encoding, and takes the next FileFormat and the matching State size above whatever main has then. Authors, if you'd rather order it differently, say so here and I'll record that instead. Once you agree, the Depends on: line will say "after #9348, #9450, ..." rather than none.

Unblocks. There's no Game bring-up discussion for PPSA01619 yet. I'll either open one and link it, or change the line to none, before this is ready to merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331060291 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#issuecomment-6331060291). Originally posted by [Gooshy](https://github.com/Gooshy) on 2026-10-22T02:15:28Z. --- Thanks. On the two open items: **Integration order.** The proposal is that this PR goes **after** the others, so none of them has to rebase for it: - #9348 (@klosixgaming-arch) and #9450 (@fma-rc) extend the same `sameDecode` comparison. - #6612, #6639, #8213, #8365 and #8542 (@milescoviello), #6801 (@JJenkx) and #7948 (@Amoenus) change `PipelineJournal.cpp`. Whenever one of them merges, I'll rebase this onto `main`. The rebase keeps their fields in `sameDecode`, keeps their journal encoding, and takes the next `FileFormat` and the matching `State` size above whatever `main` has then. Authors, if you'd rather order it differently, say so here and I'll record that instead. Once you agree, the `Depends on:` line will say "after #9348, #9450, ..." rather than `none`. **Unblocks.** There's no Game bring-up discussion for PPSA01619 yet. I'll either open one and link it, or change the line to `none`, before this is ready to merge.
milescoviello commented 2026-10-22 02:24:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T02:24:51Z.


@Gooshy that order works for me: #9489 after #6612, #6639, #8213, #8365 and #8542. Nothing in those needs this PR first.

One note for the rebase: #8213 and #8365 also each carry a Windows fix since this afternoon (0d34f90fab and e867237953). The journal's read event moved from a static thread_local to HostThreadLocal, in JournalFile::Read, so keep that hunk.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331174455 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#issuecomment-6331174455). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T02:24:51Z. --- @Gooshy that order works for me: #9489 after #6612, #6639, #8213, #8365 and #8542. Nothing in those needs this PR first. One note for the rebase: #8213 and #8365 also each carry a Windows fix since this afternoon (`0d34f90fab` and `e867237953`). The journal's read event moved from a `static thread_local` to `HostThreadLocal`, in `JournalFile::Read`, so keep that hunk. AI-assisted: yes (Claude Code)
Gooshy commented 2026-10-22 02:25:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-22T02:25:05Z.


Thanks @milescoviello, recorded: #9489 goes after #6612, #6639, #8213, #8365 and #8542. When rebasing past #8213 and #8365 I'll keep the HostThreadLocal read event in JournalFile::Read (0d34f90fab, e867237953).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331177321 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#issuecomment-6331177321). Originally posted by [Gooshy](https://github.com/Gooshy) on 2026-10-22T02:25:05Z. --- Thanks @milescoviello, recorded: #9489 goes after #6612, #6639, #8213, #8365 and #8542. When rebasing past #8213 and #8365 I'll keep the `HostThreadLocal` read event in `JournalFile::Read` (`0d34f90fab`, `e867237953`).
MarcZX10 commented 2026-10-22 04:28:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:28:29Z.

Review: CHANGES_REQUESTED


The line-width range/granularity checks and the reported RX 9060 XT agc_driver_graphics validation comparison address the earlier technical concerns. I am requesting changes for remaining repository requirements: the checklist still leaves Depends on unchecked while #9348, #9450, #6801 and #7948 await author agreement; the required Unblocks format still lacks a Game bring-up discussion number for PPSA01619; and the latest two conventions runs fail. Please finish coordination and record the complete merge order, add the matching discussion reference or change Unblocks to none, and fix/rerun conventions. The reported code/tests are also based on an older main than current ab347d144d88fae054d9770cf0db8d3565735c02; rebase and rerun focused graphics tests and the required main/change Vulkan validation comparison on the updated base. Hosted product builds are not present, and I did not run local tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609267268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5609267268). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T04:28:29Z. **Review:** CHANGES_REQUESTED --- The line-width range/granularity checks and the reported RX 9060 XT `agc_driver_graphics` validation comparison address the earlier technical concerns. I am requesting changes for remaining repository requirements: the checklist still leaves `Depends on` unchecked while #9348, #9450, #6801 and #7948 await author agreement; the required `Unblocks` format still lacks a Game bring-up discussion number for PPSA01619; and the latest two conventions runs fail. Please finish coordination and record the complete merge order, add the matching discussion reference or change `Unblocks` to `none`, and fix/rerun conventions. The reported code/tests are also based on an older main than current `ab347d144d88fae054d9770cf0db8d3565735c02`; rebase and rerun focused graphics tests and the required main/change Vulkan validation comparison on the updated base. Hosted product builds are not present, and I did not run local tests.
Gooshy commented 2026-10-22 04:31:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-22T04:31:32Z.


Thanks @MarcZX10.

  • Conventions: my last checklist edit left two items unticked, and the Depends on: line didn't start with a PR number. Both are fixed.
  • Rebase: rebased onto main ab347d144 (no conflicts). I built and tested main and this change on that base:
    • Full ctest fails the same three tests on both (agc_idle_publish_wait, agc_driver_image_array_window_past_layer_limit, agc_driver_tessellation, which fail on main on this RX 9060 XT).
    • The validated agc_driver_graphics run passes on both, with no VUID- errors and no missing-layer message on either.
  • Merge order: Depends on: now lists #6612, #6639, #8213, #8365 and #8542, which milescoviello agreed this PR goes after. #9348, #9450, #6801 and #7948 are still waiting on their authors; I'll add them once they answer.
  • Unblocks: the Game bring-up discussion for PPSA01619 is still open on my side. It will be linked, or the line set to none, before merge.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6332749294 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#issuecomment-6332749294). Originally posted by [Gooshy](https://github.com/Gooshy) on 2026-10-22T04:31:32Z. --- Thanks @MarcZX10. - **Conventions:** my last checklist edit left two items unticked, and the `Depends on:` line didn't start with a PR number. Both are fixed. - **Rebase:** rebased onto `main` ab347d144 (no conflicts). I built and tested `main` and this change on that base: - Full ctest fails the same three tests on both (`agc_idle_publish_wait`, `agc_driver_image_array_window_past_layer_limit`, `agc_driver_tessellation`, which fail on `main` on this RX 9060 XT). - The validated `agc_driver_graphics` run passes on both, with no `VUID-` errors and no missing-layer message on either. - **Merge order:** `Depends on:` now lists #6612, #6639, #8213, #8365 and #8542, which milescoviello agreed this PR goes after. #9348, #9450, #6801 and #7948 are still waiting on their authors; I'll add them once they answer. - **Unblocks:** the Game bring-up discussion for PPSA01619 is still open on my side. It will be linked, or the line set to `none`, before merge.
janzezno commented 2026-10-22 15:32:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by janzezno on 2026-10-22T15:32:56Z.


@Gooshy the overlap check pairs this PR with #9185 in Pipeline.cpp. The only shared spot is the include list: #9185 adds #include <spirv/unified1/spirv.hpp> between <mutex> and <string_view>, where this PR adds #include <string>. Merged, the list just keeps both (<mutex>, <spirv/unified1/spirv.hpp>, <string>, <string_view>). The code changes don't interact: #9185 keeps interlock pipelines out of graphics pipeline libraries, and your libraryKeys change is to the key contents.

Neither PR depends on the other, so I'd propose no Depends on in either and that the one that merges second rebases onto the first. If #9489 lands first, I'll rebase #9185. Is that OK with you?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6344647545 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#issuecomment-6344647545). Originally posted by [janzezno](https://github.com/janzezno) on 2026-10-22T15:32:56Z. --- @Gooshy the overlap check pairs this PR with #9185 in `Pipeline.cpp`. The only shared spot is the include list: #9185 adds `#include <spirv/unified1/spirv.hpp>` between `<mutex>` and `<string_view>`, where this PR adds `#include <string>`. Merged, the list just keeps both (`<mutex>`, `<spirv/unified1/spirv.hpp>`, `<string>`, `<string_view>`). The code changes don't interact: #9185 keeps interlock pipelines out of graphics pipeline libraries, and your `libraryKeys` change is to the key contents. Neither PR depends on the other, so I'd propose no `Depends on` in either and that the one that merges second rebases onto the first. If #9489 lands first, I'll rebase #9185. Is that OK with you?
MarcZX10 commented 2026-11-02 18:39:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T18:39:32Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The implementation now accepts wider line polygon modes, but the debt entry still says they must be one pixel wide, and the required paired validation-layer run is not reported for this head and base.

What I ran

Reviewed all ten changed files at head 763b1fe648ddfbfb54882264f0f5303314c57a8a against PR base b28bb772177768f99874ca38f6252cd0139acf2a. The stack tool previewed the PR cleanly against current main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not configure or build AnyPS5.

I inspected the PR description, latest discussion, exact diff, tests, current hosted checks, and the repository's AGC validation requirements. The full CTest and GPU results in the PR description are author-reported, not runs I performed.

git diff --check b28bb772177768f99874ca38f6252cd0139acf2a...763b1fe648ddfbfb54882264f0f5303314c57a8
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9489
python3 tools/pr_stack_check.py 9489 --repo boykopovar/AnyPS5
gh pr checks 9489 --repo boykopovar/AnyPS5
git grep -n -F 'Lines must be one pixel wide' 763b1fe648ddfbfb54882264f0f5303314c57a8a -- docs/dev/debt/libSceAgcDriver.md

Results

Check Result Note
Diff and conventions passed No whitespace errors; hosted conventions check passed.
Stack preview passed Clean against current main.
Hosted checks passed Conventions and labels only; no build or test job ran.
No-build precheck failed Its isolated snapshot lacks the optional ABI and test-quality helper scripts.
Focused GPU validation not run The PR's validation-layer comparison names an older base.
Local build and CTest not run No build was configured.
Full precheck table and raw helper output
Check Status Command / reason
build_and_compile not_applicable The precheck deliberately does not configure, build, or compile AnyPS5.
diff_check passed git diff --check b28bb772177768f99874ca38f6252cd0139acf2a...763b1fe648ddfbfb54882264f0f5303314c57a8
conventions_and_pr_template passed /usr/bin/python3 tools/check_conventions.py --base b28bb772177768f99874ca38f6252cd0139acf2a --head 763b1fe648ddfbfb54882264f0f5303314c57a8 --title feat(agc): draw line polygon modes at the PA_SU_LINE_CNTL width --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/pr-body.md
changed_export_abi_audit failed /usr/bin/python3 tools/pr_abi_audit.py --base b28bb772177768f99874ca38f6252cd0139acf2a --head 763b1fe648ddfbfb54882264f0f5303314c57a8 --json
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.
python_test_registration not_applicable No changed test_*.py files.
live_dependency_and_mergeability_check passed /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 9489 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/stack
build_dependent_cpp_tests not_applicable Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.
test_quality_heuristics failed /usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313 --json 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/Pipeline.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
negative_controls not_applicable No changed Python test module in tools/ can be run as a no-build base-source control.

The isolated-snapshot helper failures returned this raw output:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313/tools/pr_test_quality.py': [Errno 2] No such file or directory

Hosted checks reported on this head:

conventions  pass
labels       pass

Negative control

Assertion Change to code under test Did the new test fail?
Invalid line widths are rejected and supported widths are accepted. No mutation was made; the new C++ test was not run because it requires a build. Not exercised.

Findings

Blocking

  • The debt entry still states that line polygon modes must be one pixel wide, but this change decodes PA_SU_LINE_CNTL.WIDTH / 8 and accepts supported widths. This leaves the documented limitation false and does not update the debt entry affected by the implementation change. Please revise that sentence while keeping the separate one-pixel behavior for line-list and geometry-line-strip paths.

    Lines in polygon mode use PA_SU_LINE_CNTL.WIDTH / 8 pixels; zero width, missing wideLines support, widths outside lineWidthRange, and widths off lineWidthGranularity throw.
    
  • The repository requires the same focused AGC tests on main and the change with the validation layer, no shader cache, and required Vulkan enabled. The validation-layer run in the PR description uses base ab347d144, while the current PR base is b28bb772; the latest rebase report only states that the focused tests passed and does not report the required environment, missing-layer check, or VUID comparison for this exact base and head. Please provide the paired validation-layer results for the current base and head on the same machine and GPU.

Non-blocking

  • The new source tests cover width decoding, zero width, feature support, range limits, and granularity. They were not independently run here.

Sources

Not verified

I did not build or run CTest, the Vulkan validation-layer tests, Linux runtime tests, or console behavior. The author reports full CTest comparisons on the current base and a validation-layer comparison on the older ab347d144 base; those runs were not independently verified here. Hosted CI on this head ran conventions and labels only.

To get this to a good state

Update the debt entry, then run agc_driver_graphics with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on both b28bb772177768f99874ca38f6252cd0139acf2a and 763b1fe648ddfbfb54882264f0f5303314c57a8 using the same GPU. Confirm neither log reports a missing requested layer and that the change adds no VUID- errors. I will re-check the new head, debt text, conventions, and paired test evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5741521561 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5741521561). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T18:39:32Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The implementation now accepts wider line polygon modes, but the debt entry still says they must be one pixel wide, and the required paired validation-layer run is not reported for this head and base. ## What I ran Reviewed all ten changed files at head `763b1fe648ddfbfb54882264f0f5303314c57a8a` against PR base `b28bb772177768f99874ca38f6252cd0139acf2a`. The stack tool previewed the PR cleanly against current `main` `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8`. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not configure or build AnyPS5. I inspected the PR description, latest discussion, exact diff, tests, current hosted checks, and the repository's AGC validation requirements. The full CTest and GPU results in the PR description are author-reported, not runs I performed. ```sh git diff --check b28bb772177768f99874ca38f6252cd0139acf2a...763b1fe648ddfbfb54882264f0f5303314c57a8 python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9489 python3 tools/pr_stack_check.py 9489 --repo boykopovar/AnyPS5 gh pr checks 9489 --repo boykopovar/AnyPS5 git grep -n -F 'Lines must be one pixel wide' 763b1fe648ddfbfb54882264f0f5303314c57a8a -- docs/dev/debt/libSceAgcDriver.md ``` ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | No whitespace errors; hosted conventions check passed. | | Stack preview | passed | Clean against current `main`. | | Hosted checks | passed | Conventions and labels only; no build or test job ran. | | No-build precheck | failed | Its isolated snapshot lacks the optional ABI and test-quality helper scripts. | | Focused GPU validation | not run | The PR's validation-layer comparison names an older base. | | Local build and CTest | not run | No build was configured. | <details> <summary>Full precheck table and raw helper output</summary> | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` | | diff_check | passed | `git diff --check b28bb772177768f99874ca38f6252cd0139acf2a...763b1fe648ddfbfb54882264f0f5303314c57a8` | | conventions_and_pr_template | passed | `/usr/bin/python3 tools/check_conventions.py --base b28bb772177768f99874ca38f6252cd0139acf2a --head 763b1fe648ddfbfb54882264f0f5303314c57a8 --title feat(agc): draw line polygon modes at the PA_SU_LINE_CNTL width --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/pr-body.md` | | changed_export_abi_audit | failed | `/usr/bin/python3 tools/pr_abi_audit.py --base b28bb772177768f99874ca38f6252cd0139acf2a --head 763b1fe648ddfbfb54882264f0f5303314c57a8 --json` | | python_syntax | not_applicable | `No changed Python implementation files.` | | related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` | | python_test_registration | not_applicable | `No changed test_*.py files.` | | live_dependency_and_mergeability_check | passed | `/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 9489 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/stack` | | build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` | | test_quality_heuristics | failed | `/usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313 --json 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/Pipeline.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` | | negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` | The isolated-snapshot helper failures returned this raw output: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-9489-763b1fe648dd/head-763b1fe648dd-830b6313/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` Hosted checks reported on this head: ```text conventions pass labels pass ``` </details> ## Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | Invalid line widths are rejected and supported widths are accepted. | No mutation was made; the new C++ test was not run because it requires a build. | Not exercised. | ## Findings ### Blocking - The debt entry still states that line polygon modes must be one pixel wide, but this change decodes `PA_SU_LINE_CNTL.WIDTH / 8` and accepts supported widths. This leaves the documented limitation false and does not update the debt entry affected by the implementation change. Please revise that sentence while keeping the separate one-pixel behavior for line-list and geometry-line-strip paths. ```suggestion Lines in polygon mode use PA_SU_LINE_CNTL.WIDTH / 8 pixels; zero width, missing wideLines support, widths outside lineWidthRange, and widths off lineWidthGranularity throw. ``` - The repository requires the same focused AGC tests on `main` and the change with the validation layer, no shader cache, and required Vulkan enabled. The validation-layer run in the PR description uses base `ab347d144`, while the current PR base is `b28bb772`; the latest rebase report only states that the focused tests passed and does not report the required environment, missing-layer check, or VUID comparison for this exact base and head. Please provide the paired validation-layer results for the current base and head on the same machine and GPU. ### Non-blocking - The new source tests cover width decoding, zero width, feature support, range limits, and granularity. They were not independently run here. ## Sources - [Line-width decode in the reviewed head](https://github.com/boykopovar/AnyPS5/blob/763b1fe648ddfbfb54882264f0f5303314c57a8/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1643) - [Line-width validation in the reviewed head](https://github.com/boykopovar/AnyPS5/blob/763b1fe648ddfbfb54882264f0f5303314c57a8/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp#L263-L270) - [Line-width tests in the reviewed head](https://github.com/boykopovar/AnyPS5/blob/763b1fe648ddfbfb54882264f0f5303314c57a8/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L3173-L3193) - [Stale debt entry in the reviewed head](https://github.com/boykopovar/AnyPS5/blob/763b1fe648ddfbfb54882264f0f5303314c57a8/docs/dev/debt/libSceAgcDriver.md#L58) - [AGC validation test requirement](https://github.com/boykopovar/AnyPS5/blob/b28bb772177768f99874ca38f6252cd0139acf2a/CONTRIBUTING.md#L73) ## Not verified I did not build or run CTest, the Vulkan validation-layer tests, Linux runtime tests, or console behavior. The author reports full CTest comparisons on the current base and a validation-layer comparison on the older `ab347d144` base; those runs were not independently verified here. Hosted CI on this head ran conventions and labels only. ## To get this to a good state Update the debt entry, then run `agc_driver_graphics` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` on both `b28bb772177768f99874ca38f6252cd0139acf2a` and `763b1fe648ddfbfb54882264f0f5303314c57a8` using the same GPU. Confirm neither log reports a missing requested layer and that the change adds no `VUID-` errors. I will re-check the new head, debt text, conventions, and paired test evidence.
XairRrR commented 2026-11-02 23:28:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:28:21Z.

Review: APPROVED


Reviewed — approved

The line width is decoded, validated against the device limits, carried through every pipeline/draw/journal key, and documented; the focused tests pass and the negative control fails.

What I ran

Head f689d25142f6c89875d8e176182f6beb373fd5c3 merged with --no-ff into main 5cb015caaaaf83f8ee431414ee6a457b5b307d49 (merged tree c743f5ab6ea27fee5a2134be4620eeaacacf604e). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...f689d25142f6c89875d8e176182f6beb373fd5c3
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
# origin of the new failures in the script run
git log --oneline 096c45570f..5cb015caaa -S lod_clamp_shader_lane
# production files of the PR restored from main
ninja -C build -j32 -l32 agc_driver_image_sample_lod_clamp_tests agc_driver_graphics_tests
ctest --test-dir build --output-on-failure -R '^agc_driver_image_sample_lod_clamp_shader_lane$'
# merged files restored, only State.cpp from main
ninja -C build -j32 -l32 agc_driver_graphics_tests
ctest --test-dir build --output-on-failure -R '^agc_driver_graphics$'
# merged tree restored
ninja -C build -j32 -l32 agc_driver_graphics_tests agc_driver_image_sample_lod_clamp_tests
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -j8 --test-load 32 -R '^(agc_driver_graphics|agc_driver_polygon_mode_draw)$'
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py all checks passed
Configure / build / libs (script) ok
Selected tests (script, 2178) 2058 passed, 112 expected skips; 6 known failures from main; unwrap_self fixed
New failure agc_driver_image_sample_lod_clamp_shader_lane from main, not this PR: the test was added after the baseline commit (fe18496c95), and it still fails when built with main's versions of this PR's production files
New failure unwrap_self_..._destination_directory_group environment/main: a tools/ Python test that fails in os.chown (EINVAL) in the sandbox; this PR touches no tools/ file
Validation comparison (script, 759 tests) layer loaded in 758, none missing, 0 tests with new VUID-
agc_driver_graphics, agc_driver_polygon_mode_draw with the validation layer (my run) both pass; 0 VUID- lines; no was not found but was requested message
Worktree after the controls git status --porcelain empty
Negative control output
AGC graphics: a line polygon mode wider or narrower than one pixel is unsupported (register 0x282 = 0x00000010)
0% tests passed, 1 tests failed out of 1
	1715 - agc_driver_graphics (Failed)

Negative control

  • I restored all nine production files from main. agc_driver_graphics_tests then no longer compiles, because the test uses State::lineWidth, Context::wideLines and ValidateLineWidth, which main doesn't have.
  • I put back the merged files and restored only Graphics/src/State.cpp from main. agc_driver_graphics then fails on main's one-pixel refusal for a 0x10 width (output above).
  • I restored the merged files, rebuilt, and confirmed that the test passes and the worktree is clean.

Findings

Blocking

None.

Non-blocking

  • No GPU execution test sets PA_SU_LINE_CNTL, so the wide line itself is only checked on the CPU: the decode in core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:1643 and ValidateLineWidth in core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp:268-278. Lindamea1 already noted this. A small draw test with a 2-pixel line polygon mode, skipped on devices without wideLines, would cover raster.lineWidth (Pipeline.cpp:661) end to end. Note that Vulkan's non-strict wide lines may differ from the console's; the debt entry already says the console's rasterization is not measured.
  • FileFormat = 16u (core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:54) will need the next free number if #9748 and #8212 land first, because identical version lines merge silently. oneandonlydean already flagged this, and the author has acknowledged it.

Not verified

  • Wide lines actually rasterized on a GPU: no test draws them, and lavapipe was the only device here.
  • Runs on other vendors.
  • The PPSA01619 title run that the author reports.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744895755 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5744895755). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:28:21Z. **Review:** APPROVED --- # Reviewed — approved The line width is decoded, validated against the device limits, carried through every pipeline/draw/journal key, and documented; the focused tests pass and the negative control fails. ## What I ran Head `f689d25142f6c89875d8e176182f6beb373fd5c3` merged with `--no-ff` into `main` `5cb015caaaaf83f8ee431414ee6a457b5b307d49` (merged tree `c743f5ab6ea27fee5a2134be4620eeaacacf604e`). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19). ```sh git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...f689d25142f6c89875d8e176182f6beb373fd5c3 python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 # origin of the new failures in the script run git log --oneline 096c45570f..5cb015caaa -S lod_clamp_shader_lane # production files of the PR restored from main ninja -C build -j32 -l32 agc_driver_image_sample_lod_clamp_tests agc_driver_graphics_tests ctest --test-dir build --output-on-failure -R '^agc_driver_image_sample_lod_clamp_shader_lane$' # merged files restored, only State.cpp from main ninja -C build -j32 -l32 agc_driver_graphics_tests ctest --test-dir build --output-on-failure -R '^agc_driver_graphics$' # merged tree restored ninja -C build -j32 -l32 agc_driver_graphics_tests agc_driver_image_sample_lod_clamp_tests env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -j8 --test-load 32 -R '^(agc_driver_graphics|agc_driver_polygon_mode_draw)$' git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | all checks passed | | Configure / build / libs (script) | ok | | Selected tests (script, 2178) | 2058 passed, 112 expected skips; 6 known failures from `main`; `unwrap_self` fixed | | New failure `agc_driver_image_sample_lod_clamp_shader_lane` | from `main`, not this PR: the test was added after the baseline commit (fe18496c95), and it still fails when built with `main`'s versions of this PR's production files | | New failure `unwrap_self_..._destination_directory_group` | environment/`main`: a `tools/` Python test that fails in `os.chown` (EINVAL) in the sandbox; this PR touches no `tools/` file | | Validation comparison (script, 759 tests) | layer loaded in 758, none missing, 0 tests with new `VUID-` | | `agc_driver_graphics`, `agc_driver_polygon_mode_draw` with the validation layer (my run) | both pass; 0 `VUID-` lines; no `was not found but was requested` message | | Worktree after the controls | `git status --porcelain` empty | <details><summary>Negative control output</summary> ``` AGC graphics: a line polygon mode wider or narrower than one pixel is unsupported (register 0x282 = 0x00000010) 0% tests passed, 1 tests failed out of 1 1715 - agc_driver_graphics (Failed) ``` </details> ## Negative control - I restored all nine production files from `main`. `agc_driver_graphics_tests` then no longer compiles, because the test uses `State::lineWidth`, `Context::wideLines` and `ValidateLineWidth`, which `main` doesn't have. - I put back the merged files and restored only `Graphics/src/State.cpp` from `main`. `agc_driver_graphics` then fails on `main`'s one-pixel refusal for a 0x10 width (output above). - I restored the merged files, rebuilt, and confirmed that the test passes and the worktree is clean. ## Findings ### Blocking None. ### Non-blocking - No GPU execution test sets `PA_SU_LINE_CNTL`, so the wide line itself is only checked on the CPU: the decode in `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:1643` and `ValidateLineWidth` in `core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp:268-278`. Lindamea1 already noted this. A small draw test with a 2-pixel line polygon mode, skipped on devices without `wideLines`, would cover `raster.lineWidth` (`Pipeline.cpp:661`) end to end. Note that Vulkan's non-strict wide lines may differ from the console's; the debt entry already says the console's rasterization is not measured. - `FileFormat = 16u` (`core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:54`) will need the next free number if #9748 and #8212 land first, because identical version lines merge silently. oneandonlydean already flagged this, and the author has acknowledged it. ## Not verified - Wide lines actually rasterized on a GPU: no test draws them, and lavapipe was the only device here. - Runs on other vendors. - The PPSA01619 title run that the author reports. <!-- anyps5-bots job=2187 head=f689d25142f6c89875d8e176182f6beb373fd5c3 -->
XairRrR commented 2026-11-03 21:46:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T21:46:00Z.

Review: APPROVED


Re-checked — approved

Since my last review (f689d25), the PR was rebased onto main 04a9eb4fa. The rebase changes three things: the State size check goes from 936 to 944, a duplicate #include <string> is dropped, and a conflict next to the debt entry is resolved. Checks, focused tests and the negative control all still pass.

What changed since my last review

  • PipelineJournal.cpp:45: static_assert(sizeof(State) == 944). main grew State to 936 on its own, and this PR's lineWidth adds 8 bytes. FileFormat stays at 16u (PipelineJournal.cpp:54), one past main's 15.
  • Pipeline.cpp: the PR no longer adds #include <string>, because main already has it (line 24).
  • docs/dev/debt/libSceAgcDriver.md: the PR's "Point and line polygon modes" text is unchanged. The neighbouring "Native multisampled depth clears" entry now has main's wording, so main's change is preserved.
  • No other code or test changes. The author reports a paired validation-layer run on RX 9060 XT / RADV for this base and head. I accept it as author-reported.

What I ran

Head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db, merged with --no-ff into main 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 (merged tree e0c560a0a1c472a16e2e02db6600805f3134de2d). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...62bfdab9fb2b885c386c3cc46f46cb5ca65e89db
python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24
# origin of the script's new VUIDs
git log --oneline 1e658521a0..04a9eb4fa2 --diff-filter=A -- 'core/libs/prx/libSceAgcDriver/tests/execution/*ather*'
# all nine production files of the PR restored from main
ninja -C build -j32 -l32 agc_driver_image_gather_volume_tests
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R '^agc_driver_image_gather_volume$'
# merged files restored, only Graphics/src/State.cpp from main
ninja -C build -j32 -l32 agc_driver_graphics_tests
ctest --test-dir build --output-on-failure -R '^agc_driver_graphics$'
# merged tree restored
ninja -C build -j32 -l32 agc_driver_graphics_tests agc_driver_image_gather_volume_tests agc_driver_polygon_mode_draw_tests
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -j8 --test-load 32 -R '^(agc_driver_graphics|agc_driver_polygon_mode_draw|agc_driver_image_gather_volume)$'
git status --porcelain
Check Result
git diff --check clean
check_conventions.py all checks passed
Configure / build / libs (script) ok
Selected tests (script, 2184) 2062 passed, 115 expected skips. 7 known failures, which also fail on main; no new failures or timeouts
Validation comparison (script, 783 tests) layer loaded in 782 tests, missing in none. New VUID-VkSamplerCreateInfo-addressMode* lines only in agc_driver_image_gather_volume, a test that did not exist at the baseline
agc_driver_image_gather_volume with main's production files the same four VUIDs (2 lines each) appear, so they come from main, not this PR. The test was added in f75385c1a2, after baseline 1e658521a0
agc_driver_graphics, agc_driver_polygon_mode_draw with the validation layer (merged tree) both pass. No VUID- lines and no was not found but was requested message
Worktree after the controls git status --porcelain empty
Negative control output
AGC graphics: a line polygon mode wider or narrower than one pixel is unsupported (register 0x282 = 0x00000010)
0% tests passed, 1 tests failed out of 1
	1773 - agc_driver_graphics (Failed)

The test code did not change since my last review, but I ran the negative control again on the new base. With only Graphics/src/State.cpp taken from main, agc_driver_graphics fails on main's one-pixel refusal (output above). After the merged files were restored, it passes.

Previous findings

  • Non-blocking, no GPU test draws wide lines: Still open. The decode (core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:1635), ValidateLineWidth (Pipeline.cpp:268) and raster.lineWidth (Pipeline.cpp:661) are still only exercised on the CPU or at a width of 1.0. This does not block the PR.
  • Non-blocking, FileFormat = 16u may collide with #9748 and #8212: Still open. Both are still open and also take 16, according to the author's comment of 2026-11-03. The author has committed to taking the next free number when rebasing after them.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Wide lines actually rasterized on a GPU: lavapipe is the only device here, and no test draws them.
  • Runs on other vendors, and the PPSA01619 title run the author reports.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5759920394 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5759920394). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T21:46:00Z. **Review:** APPROVED --- # Re-checked — approved Since my last review (f689d25), the PR was rebased onto `main` 04a9eb4fa. The rebase changes three things: the `State` size check goes from 936 to 944, a duplicate `#include <string>` is dropped, and a conflict next to the debt entry is resolved. Checks, focused tests and the negative control all still pass. ## What changed since my last review - `PipelineJournal.cpp:45`: `static_assert(sizeof(State) == 944)`. `main` grew `State` to 936 on its own, and this PR's `lineWidth` adds 8 bytes. `FileFormat` stays at `16u` (`PipelineJournal.cpp:54`), one past `main`'s 15. - `Pipeline.cpp`: the PR no longer adds `#include <string>`, because `main` already has it (line 24). - `docs/dev/debt/libSceAgcDriver.md`: the PR's "Point and line polygon modes" text is unchanged. The neighbouring "Native multisampled depth clears" entry now has `main`'s wording, so `main`'s change is preserved. - No other code or test changes. The author reports a paired validation-layer run on RX 9060 XT / RADV for this base and head. I accept it as author-reported. ## What I ran Head `62bfdab9fb2b885c386c3cc46f46cb5ca65e89db`, merged with `--no-ff` into `main` `04a9eb4fa2877eb6e40bf2c83adf972e40d89b24` (merged tree `e0c560a0a1c472a16e2e02db6600805f3134de2d`). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19). ```sh git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...62bfdab9fb2b885c386c3cc46f46cb5ca65e89db python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 # origin of the script's new VUIDs git log --oneline 1e658521a0..04a9eb4fa2 --diff-filter=A -- 'core/libs/prx/libSceAgcDriver/tests/execution/*ather*' # all nine production files of the PR restored from main ninja -C build -j32 -l32 agc_driver_image_gather_volume_tests env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R '^agc_driver_image_gather_volume$' # merged files restored, only Graphics/src/State.cpp from main ninja -C build -j32 -l32 agc_driver_graphics_tests ctest --test-dir build --output-on-failure -R '^agc_driver_graphics$' # merged tree restored ninja -C build -j32 -l32 agc_driver_graphics_tests agc_driver_image_gather_volume_tests agc_driver_polygon_mode_draw_tests env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -j8 --test-load 32 -R '^(agc_driver_graphics|agc_driver_polygon_mode_draw|agc_driver_image_gather_volume)$' git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | all checks passed | | Configure / build / libs (script) | ok | | Selected tests (script, 2184) | 2062 passed, 115 expected skips. 7 known failures, which also fail on `main`; no new failures or timeouts | | Validation comparison (script, 783 tests) | layer loaded in 782 tests, missing in none. New `VUID-VkSamplerCreateInfo-addressMode*` lines only in `agc_driver_image_gather_volume`, a test that did not exist at the baseline | | `agc_driver_image_gather_volume` with `main`'s production files | the same four VUIDs (2 lines each) appear, so they come from `main`, not this PR. The test was added in f75385c1a2, after baseline 1e658521a0 | | `agc_driver_graphics`, `agc_driver_polygon_mode_draw` with the validation layer (merged tree) | both pass. No `VUID-` lines and no `was not found but was requested` message | | Worktree after the controls | `git status --porcelain` empty | <details><summary>Negative control output</summary> ``` AGC graphics: a line polygon mode wider or narrower than one pixel is unsupported (register 0x282 = 0x00000010) 0% tests passed, 1 tests failed out of 1 1773 - agc_driver_graphics (Failed) ``` </details> The test code did not change since my last review, but I ran the negative control again on the new base. With only `Graphics/src/State.cpp` taken from `main`, `agc_driver_graphics` fails on `main`'s one-pixel refusal (output above). After the merged files were restored, it passes. ## Previous findings - Non-blocking, no GPU test draws wide lines: **Still open.** The decode (`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:1635`), `ValidateLineWidth` (`Pipeline.cpp:268`) and `raster.lineWidth` (`Pipeline.cpp:661`) are still only exercised on the CPU or at a width of 1.0. This does not block the PR. - Non-blocking, `FileFormat = 16u` may collide with #9748 and #8212: **Still open.** Both are still open and also take 16, according to the author's comment of 2026-11-03. The author has committed to taking the next free number when rebasing after them. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - Wide lines actually rasterized on a GPU: lavapipe is the only device here, and no test draws them. - Runs on other vendors, and the PPSA01619 title run the author reports. <!-- anyps5-bots job=3628 head=62bfdab9fb2b885c386c3cc46f46cb5ca65e89db -->
MarcZX10 commented 2026-11-05 00:25:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-05T00:25:16Z.

Review: COMMENTED


Re-checked — new head, no blocking findings

Both points of my earlier change request are addressed at this head: the debt entry now describes the new line width, and a paired validation-layer run on this head and base is reported; nothing was built or run here.

What I ran

Head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db, current base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24. I read the whole diff (11 files) and the debt entry at this head. Environment: Debian 12, Linux x86_64. No AnyPS5 build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9489
gh pr diff 9489 -R boykopovar/AnyPS5
gh api 'repos/boykopovar/AnyPS5/contents/docs/dev/debt/libSceAgcDriver.md?ref=62bfdab9fb2b885c386c3cc46f46cb5ca65e89db'
gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp?ref=62bfdab9fb2b885c386c3cc46f46cb5ca65e89db'
gh pr view 9489 -R boykopovar/AnyPS5 --json comments
gh pr checks 9489 -R boykopovar/AnyPS5

Results

Check Result Note
Diff check, conventions, template passed precheck
Export and ABI audit passed precheck
Test-quality heuristic passed precheck
Merge and dependency preview passed clean against current main
Debt entry passed lines are PA_SU_LINE_CNTL.WIDTH / 8 pixels wide
Width carried through decode, key, pipeline and journal passed State 936 to 944 bytes, journal format 15 to 16
Width validation passed needs wideLines, the device range and the granularity
Memoised validation key failed the width is truncated; see Findings
Hosted conventions and labels passed no build or test job runs on this head
Paired validation-layer run not run the author reports it for this head and base
NVIDIA and AMD GPU CI comments on this head not run both report a pass with 0 new failures
Local build and tests not run
Precheck report for this head, unedited table
Check Status Why / command
build_and_compile not_run Builds are intentionally excluded from this fast, no-build check pass.
diff_check passed Command ran; see raw output below. Command: git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...62bfdab9fb2b885c386c3cc46f46cb5ca65e89db
conventions_and_pr_template passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 --head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db --title feat(agc): draw line polygon modes at the PA_SU_LINE_CNTL width --body /tmp/anyps5-pr-precheck/final/9489/pr-body.md
changed_export_abi_audit passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 --head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db --json
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed Python tool module has a related tools/tests/test_.py suite.
python_test_registration not_applicable No changed Python test files need registration.
live_dependency_and_mergeability_check passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 9489 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/9489/stack
build_dependent_cpp_tests not_run Changed C/C++ source or test files need exact-head binaries; this fast pass does not build.
test_quality_heuristics passed Command ran; see raw output below. Command: /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/final/9489/head-62bfdab9fb2b-cda81059 --json 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/Pipeline.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
negative_controls not_applicable No changed tools/ Python test module is eligible for a base-source negative control.

Negative control

Not run. The test changes the width to 2 pixels and checks rejection without wideLines, at the range ends and off the granularity steps; I read it but did not run it.

Findings

Blocking

None.

Non-blocking

  1. The memoised validation key truncates the width. ValidationKey adds state.lineWidth through a helper that casts to uint64_t, so widths 1.0 and 1.5 give the same entry. ValidateLineWidth runs when the pipeline is built, not in this memo; I did not trace whether the memoised shader validation reads the width. Use std::bit_cast<std::uint32_t>(state.lineWidth), as the journal does, or state why truncation is intended.

Sources

Not verified

  • Compilation, agc_driver_graphics and agc_driver_polygon_mode_draw on any platform. The GPU CI comments and the author's validation-layer run are reports, not my runs.
  • Two-pixel lines on a real title, and the Mesa width reference in the description.

To get this to a good state

  1. Make the key exact, or explain why truncation is fine.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5777970506 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5777970506). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-05T00:25:16Z. **Review:** COMMENTED --- # Re-checked — new head, no blocking findings Both points of my earlier change request are addressed at this head: the debt entry now describes the new line width, and a paired validation-layer run on this head and base is reported; nothing was built or run here. ## What I ran Head `62bfdab9fb2b885c386c3cc46f46cb5ca65e89db`, current base `04a9eb4fa2877eb6e40bf2c83adf972e40d89b24`. I read the whole diff (11 files) and the debt entry at this head. Environment: Debian 12, Linux x86_64. No AnyPS5 build was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9489 gh pr diff 9489 -R boykopovar/AnyPS5 gh api 'repos/boykopovar/AnyPS5/contents/docs/dev/debt/libSceAgcDriver.md?ref=62bfdab9fb2b885c386c3cc46f46cb5ca65e89db' gh api 'repos/boykopovar/AnyPS5/contents/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp?ref=62bfdab9fb2b885c386c3cc46f46cb5ca65e89db' gh pr view 9489 -R boykopovar/AnyPS5 --json comments gh pr checks 9489 -R boykopovar/AnyPS5 ``` ## Results | Check | Result | Note | |---|---|---| | Diff check, conventions, template | passed | precheck | | Export and ABI audit | passed | precheck | | Test-quality heuristic | passed | precheck | | Merge and dependency preview | passed | clean against current `main` | | Debt entry | passed | lines are `PA_SU_LINE_CNTL.WIDTH / 8` pixels wide | | Width carried through decode, key, pipeline and journal | passed | `State` 936 to 944 bytes, journal format 15 to 16 | | Width validation | passed | needs `wideLines`, the device range and the granularity | | Memoised validation key | failed | the width is truncated; see Findings | | Hosted conventions and labels | passed | no build or test job runs on this head | | Paired validation-layer run | not run | the author reports it for this head and base | | NVIDIA and AMD GPU CI comments on this head | not run | both report a pass with 0 new failures | | Local build and tests | not run | | <details> <summary>Precheck report for this head, unedited table</summary> | Check | Status | Why / command | |---|---|---| | build_and_compile | not_run | Builds are intentionally excluded from this fast, no-build check pass. | | diff_check | passed | Command ran; see raw output below. Command: `git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...62bfdab9fb2b885c386c3cc46f46cb5ca65e89db` | | conventions_and_pr_template | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 --head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db --title feat(agc): draw line polygon modes at the PA_SU_LINE_CNTL width --body /tmp/anyps5-pr-precheck/final/9489/pr-body.md` | | changed_export_abi_audit | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 --head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db --json` | | python_syntax | not_applicable | No changed Python implementation files. | | related_python_unit_tests | not_applicable | No changed Python tool module has a related tools/tests/test_<module>.py suite. | | python_test_registration | not_applicable | No changed Python test files need registration. | | live_dependency_and_mergeability_check | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 9489 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/9489/stack` | | build_dependent_cpp_tests | not_run | Changed C/C++ source or test files need exact-head binaries; this fast pass does not build. | | test_quality_heuristics | passed | Command ran; see raw output below. Command: `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/final/9489/head-62bfdab9fb2b-cda81059 --json 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/Pipeline.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` | | negative_controls | not_applicable | No changed tools/ Python test module is eligible for a base-source negative control. | </details> ## Negative control Not run. The test changes the width to 2 pixels and checks rejection without `wideLines`, at the range ends and off the granularity steps; I read it but did not run it. ## Findings ### Blocking None. ### Non-blocking 1. **The memoised validation key truncates the width.** `ValidationKey` adds `state.lineWidth` through a helper that casts to `uint64_t`, so widths 1.0 and 1.5 give the same entry. `ValidateLineWidth` runs when the pipeline is built, not in this memo; I did not trace whether the memoised shader validation reads the width. Use `std::bit_cast<std::uint32_t>(state.lineWidth)`, as the journal does, or state why truncation is intended. ## Sources - Truncating helper: https://github.com/boykopovar/AnyPS5/blob/62bfdab9fb2b885c386c3cc46f46cb5ca65e89db/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp#L976 - Width added to the key: https://github.com/boykopovar/AnyPS5/blob/62bfdab9fb2b885c386c3cc46f46cb5ca65e89db/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp#L1013 - `ValidateLineWidth`: https://github.com/boykopovar/AnyPS5/blob/62bfdab9fb2b885c386c3cc46f46cb5ca65e89db/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp#L268-L278 - Journal uses the exact bits: https://github.com/boykopovar/AnyPS5/blob/62bfdab9fb2b885c386c3cc46f46cb5ca65e89db/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp#L227 ## Not verified - Compilation, `agc_driver_graphics` and `agc_driver_polygon_mode_draw` on any platform. The GPU CI comments and the author's validation-layer run are reports, not my runs. - Two-pixel lines on a real title, and the Mesa width reference in the description. ## To get this to a good state 1. Make the key exact, or explain why truncation is fine.
ahmadmuj commented 2026-11-06 13:01:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-11-06T13:01:36Z.

Review: COMMENTED


Head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db; PR base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24; tested main 2d2d60a959a7abc7b3a34b0341a40eae2af1d298.

I ran agc_driver_graphics, agc_driver_polygon_mode_draw, and a local DCB readback probe on both revisions and both devices below. This adds execution evidence to the earlier CPU and validation-key reviews.

Width changes reuse the narrow pipeline. The probe sends PA_SU_LINE_CNTL values 8,64,8,64 through separate DCB submissions. Registered shaders and target addresses stay unchanged. Each submission clears the target, draws, waits idle, and checks exact pixels.

The first narrow draw passes. On this head, draw 2 keeps narrow lines: pixel (10,4) stays RGBA (64,64,64,64), instead of white (255,255,255,255). The pipeline store records a hit, no miss, and one cached pipeline. Both RTX 4080 and lavapipe reproduce this.

Pinned main passes the same narrow control, then rejects width register 0x40 with its existing unsupported-width guard. That baseline refusal is distinct from the head's wrong pixels.

DrawKeyRegisters omits context register 0x282. Its shape key therefore stays unchanged. shapePipeline reuses the narrow pipeline through TouchCachedPipeline, before the width-aware full pipeline key runs.

Three controls on the unchanged head binary agree on both devices:

  • APS5_VERIFY_DRAW_RECIPE=1 reports that the decoders read context 0x282, which DrawKeyRegisters lacks.
  • APS5_VERIFY_SHAPE_MEMO=1 reports that the shape memo's pipeline differs from the pipeline store's on draw 2.
  • With only APS5_NO_DRAW_KEY=1, all four exact readbacks pass. The full pipeline cache records two misses, then two hits.

Please include the width register in the draw-register mask and cover width transitions through DCB submission. The pipeline-key addition alone does not protect this earlier reuse path.

Device and setup Main Head Validation
Native NVIDIA RTX 4080; Windows 11 Pro build 26200; driver 617.42; Vulkan 1.4.351; layer 1.4.367 Graphics and polygon tests pass; probe reaches expected first-wide refusal Graphics and polygon tests pass; probe fails the first-wide pixel assertion Loaded validation confirmed in each GPU process; zero VUIDs
llvmpipe LLVM 20.1.2; Ubuntu 24.04 WSL; Mesa 25.2.8-0ubuntu0.24.04.4; layer 1.3.275 Same results Same results Three occurrences per selection of inherited VUID-VkDeviceCreateInfo-pNext-pNext; zero new diagnostics

The older Linux layer does not recognize structure 1000574000. This is not a clean-validation claim for lavapipe. The graphics test is CPU-only. The other logs confirm the actual device and loaded layer, including the DCB driver's device.

Commands, geometry, and limits

Separate pinned source snapshots include the same local WideLineRegisterReadback.cpp fixture, SHA-256 18b0f24473a26b4209c727106631d042f31ba5e2a834e860f25dcbee94c7cd58. Original source and submodule hashes are checked before and after execution. No production fix is applied.

CMake uses Release, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON, and ANYPS5_AGC_EXECUTION_TESTS=WideLineRegisterReadback;PolygonModeDraw. Native builds use GCC 15.2.0 UCRT POSIX SEH; Linux builds use GCC 13.3.0. Build command for each separate directory:

cmake --build <build> --parallel 8 --target agc_driver_wide_line_register_readback_tests agc_driver_graphics_tests agc_driver_polygon_mode_draw_tests
ctest --test-dir <build> -R "^agc_driver_(wide_line_register_readback|graphics|polygon_mode_draw)$" -V --timeout 30

Native CTest runs each name separately with the same options and --no-tests=error. Both platforms set ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_HOST_REPORT=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and VK_LOADER_DEBUG=layer. Native also selects ANYPS5_GPU=NVIDIA GeForce RTX 4080; Linux selects the lavapipe ICD with VK_DRIVER_FILES.

Every selected test finishes below 30 seconds. The longest native test takes 20.69 seconds; the longest final Linux test takes 10.91 seconds. Both default selections report 2/3 passing, for the different probe failures described above. The conventions check also passes.

The target is 64x16 RGBA8. Screen vertices are (4.5,2.5), (40.5,2.5), (4.5,12.5), in triangle-list line mode. Samples x10..15,y4 lie strictly inside the eight-pixel horizontal line and outside the one-pixel line. Each channel must equal255 for wide draws and64 for narrow draws. Horizontal and vertical positive controls require255; far exterior samples require64. The registered vertex shader reads its buffer descriptor from s8..11. Both devices report strictLines and wideLines support; width8 fits their reported ranges and granularity.

Two separate lavapipe mutations use APS5_NO_DRAW_KEY=1, compared with its passing unchanged-head control. Forcing raster width1 fails the wide assertion after a cache miss. Removing width from the full pipeline key fails it after a cache hit. These establish the intended raster and full-key paths, not GPL cache coverage.

Native mutation builds, GPL-key mutation, later stale decode reuse, journal replay, games, console behavior, and AMD hardware are not tested. This is focused execution evidence, not a full-suite approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5800415629 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9489#pullrequestreview-5800415629). Originally posted by [ahmadmuj](https://github.com/ahmadmuj) on 2026-11-06T13:01:36Z. **Review:** COMMENTED --- Head `62bfdab9fb2b885c386c3cc46f46cb5ca65e89db`; PR base `04a9eb4fa2877eb6e40bf2c83adf972e40d89b24`; tested main `2d2d60a959a7abc7b3a34b0341a40eae2af1d298`. I ran `agc_driver_graphics`, `agc_driver_polygon_mode_draw`, and a local DCB readback probe on both revisions and both devices below. This adds execution evidence to the earlier CPU and validation-key reviews. **Width changes reuse the narrow pipeline.** The probe sends `PA_SU_LINE_CNTL` values `8,64,8,64` through separate DCB submissions. Registered shaders and target addresses stay unchanged. Each submission clears the target, draws, waits idle, and checks exact pixels. The first narrow draw passes. On this head, draw 2 keeps narrow lines: pixel `(10,4)` stays RGBA `(64,64,64,64)`, instead of white `(255,255,255,255)`. The pipeline store records a hit, no miss, and one cached pipeline. Both RTX 4080 and lavapipe reproduce this. Pinned main passes the same narrow control, then rejects width register `0x40` with its existing unsupported-width guard. That baseline refusal is distinct from the head's wrong pixels. [`DrawKeyRegisters`](https://github.com/boykopovar/AnyPS5/blob/62bfdab9fb2b885c386c3cc46f46cb5ca65e89db/core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp#L330-L347) omits context register `0x282`. Its shape key therefore stays unchanged. [`shapePipeline`](https://github.com/boykopovar/AnyPS5/blob/62bfdab9fb2b885c386c3cc46f46cb5ca65e89db/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp#L2869-L2877) reuses the narrow pipeline through `TouchCachedPipeline`, before the width-aware full pipeline key runs. Three controls on the unchanged head binary agree on both devices: - `APS5_VERIFY_DRAW_RECIPE=1` reports that the decoders read context `0x282`, which `DrawKeyRegisters` lacks. - `APS5_VERIFY_SHAPE_MEMO=1` reports that the shape memo's pipeline differs from the pipeline store's on draw 2. - With only `APS5_NO_DRAW_KEY=1`, all four exact readbacks pass. The full pipeline cache records two misses, then two hits. Please include the width register in the draw-register mask and cover width transitions through DCB submission. The pipeline-key addition alone does not protect this earlier reuse path. | Device and setup | Main | Head | Validation | | --- | --- | --- | --- | | Native NVIDIA RTX 4080; Windows 11 Pro build 26200; driver 617.42; Vulkan 1.4.351; layer 1.4.367 | Graphics and polygon tests pass; probe reaches expected first-wide refusal | Graphics and polygon tests pass; probe fails the first-wide pixel assertion | Loaded validation confirmed in each GPU process; zero VUIDs | | llvmpipe LLVM 20.1.2; Ubuntu 24.04 WSL; Mesa 25.2.8-0ubuntu0.24.04.4; layer 1.3.275 | Same results | Same results | Three occurrences per selection of inherited `VUID-VkDeviceCreateInfo-pNext-pNext`; zero new diagnostics | The older Linux layer does not recognize structure `1000574000`. This is not a clean-validation claim for lavapipe. The graphics test is CPU-only. The other logs confirm the actual device and loaded layer, including the DCB driver's device. <details> <summary>Commands, geometry, and limits</summary> Separate pinned source snapshots include the same local `WideLineRegisterReadback.cpp` fixture, SHA-256 `18b0f24473a26b4209c727106631d042f31ba5e2a834e860f25dcbee94c7cd58`. Original source and submodule hashes are checked before and after execution. No production fix is applied. CMake uses Release, `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=ON`, and `ANYPS5_AGC_EXECUTION_TESTS=WideLineRegisterReadback;PolygonModeDraw`. Native builds use GCC 15.2.0 UCRT POSIX SEH; Linux builds use GCC 13.3.0. Build command for each separate directory: ```text cmake --build <build> --parallel 8 --target agc_driver_wide_line_register_readback_tests agc_driver_graphics_tests agc_driver_polygon_mode_draw_tests ctest --test-dir <build> -R "^agc_driver_(wide_line_register_readback|graphics|polygon_mode_draw)$" -V --timeout 30 ``` Native CTest runs each name separately with the same options and `--no-tests=error`. Both platforms set `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_HOST_REPORT=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, and `VK_LOADER_DEBUG=layer`. Native also selects `ANYPS5_GPU=NVIDIA GeForce RTX 4080`; Linux selects the lavapipe ICD with `VK_DRIVER_FILES`. Every selected test finishes below 30 seconds. The longest native test takes 20.69 seconds; the longest final Linux test takes 10.91 seconds. Both default selections report 2/3 passing, for the different probe failures described above. The conventions check also passes. The target is 64x16 RGBA8. Screen vertices are `(4.5,2.5)`, `(40.5,2.5)`, `(4.5,12.5)`, in triangle-list line mode. Samples x10..15,y4 lie strictly inside the eight-pixel horizontal line and outside the one-pixel line. Each channel must equal255 for wide draws and64 for narrow draws. Horizontal and vertical positive controls require255; far exterior samples require64. The registered vertex shader reads its buffer descriptor from s8..11. Both devices report strictLines and wideLines support; width8 fits their reported ranges and granularity. Two separate lavapipe mutations use `APS5_NO_DRAW_KEY=1`, compared with its passing unchanged-head control. Forcing raster width1 fails the wide assertion after a cache miss. Removing width from the full pipeline key fails it after a cache hit. These establish the intended raster and full-key paths, not GPL cache coverage. Native mutation builds, GPL-key mutation, later stale decode reuse, journal replay, games, console behavior, and AMD hardware are not tested. This is focused execution evidence, not a full-suite approval. </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9489
No description provided.