feat(agc): draw line polygon modes at the PA_SU_LINE_CNTL width #9489
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9489"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-21T23:18:08Z.
What
A line polygon mode (
PA_SU_SC_MODE_CNTLpolygon type 1) was refused unlessPA_SU_LINE_CNTL.WIDTHwas 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 witha line polygon mode wider or narrower than one pixel.State::lineWidthasWIDTH / 8pixels, the scalemain's one-pixel check already uses (8 = one pixel) and the one RADV programs (S_028A08_WIDTH(lineWidth * 8)inradv_cmd_buffer.c). Only a zero width is still refused.VkPipelineRasterizationStateCreateInfo::lineWidth. A width other than one pixel needs thewideLinesfeature, which the device now enables when available, and must lie withinlimits.lineWidthRangeon a whole number oflimits.lineWidthGranularitysteps from its low end.ValidateLineWidthchecks all three and throws with the width and the limits otherwise.Stategrows by 8 bytes, so the pipeline journal's static size check moves to 944 andFileFormatto 16.DepthBoundsBiasTestsnow decodes a 0x10 width as two pixels and still refuses a zero width, and checksValidateLineWidth: one pixel withoutwideLines, 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],lineWidthGranularity0.125). Results are for all three commits.main04a9eb4fa.maingrewStateto 936, so withlineWidththe size check is 944;FileFormatis 16 (one pastmain's 15).main04a9eb4fa, built and run in the same tree: 56 of 3,828 tests fail on this change, and all 56 fail onmaintoo, so the change adds none. Most of them are shader recompiler tests (agc_shader_*,agc_spirv_*) aborting withfree(): invalid pointeronmainitself on this machine.agc_driver_graphicsandagc_driver_polygon_mode_drawwithANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(VK_LAYER_KHRONOS_validation1.4.341), run withctest -Vonmain04a9eb4faand on this change62bfdab9f: both pass on both, noVUID-errors on either, and neither log reportswas not found but was requested by env var VK_INSTANCE_LAYERS.main; with this change, on a local branch that also carries other unrelated changes, the fights run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
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
wideLinesdoes not guarantee that a device accepts every non-unit line width. Vulkan also constrainslineWidthtoproperties.limits.lineWidthRangeandlineWidthGranularity. 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.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
colorRopto the sameDrawRegisterKey.cppcomparison predicate this PR extends withlineWidth; #9450 and open pipeline-journal PRs #6612, #6639, #6801, #7948, #8365 and #8542 also changePipelineJournal.cppstate encoding/size orFileFormat. 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'sDepends on:line as the project rule requires. The overlap report also lists older conflicting journal/graphics PRs for manual review.Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-21T23:45:08Z.
Thanks for the review.
Line width limits: done in 75cf7f4ad.
ValidateLineWidthnow refuses a width other than one pixel when:wideLines,limits.lineWidthRange, orlimits.lineWidthGranularitysteps from the range's low end.The error names the width and the limits. Pipelines call it in place of the
wideLines-only check.DepthBoundsBiasTestscovers 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 wheremaindoes. The validatedagc_driver_graphicsrun shows noVUID-errors.Merge order: most of #9348, #9450, #6612, #6639, #6801, #7948, #8365 and #8542 move
FileFormatfrom 6 to 7, and #9348 and #9450 extend the samesameDecodecomparison. This PR does not need to go first. Whichever of them lands first, I'll rebase this onto it, moveFileFormatand theStatesize check past it, and keep their fields in the comparison. TheDepends on:line now says so. If you'd rather this wait for a particular one, tell me which and I'll mark it.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_graphicsmain/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 saysDepends 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 thesameDecodepredicate are preserved. Also,Unblocks: PPSA01619needs 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 tonone. The latest hosted checks shown here are conventions and labels; I did not run local tests.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:
sameDecodecomparison.PipelineJournal.cpp.Whenever one of them merges, I'll rebase this onto
main. The rebase keeps their fields insameDecode, keeps their journal encoding, and takes the nextFileFormatand the matchingStatesize above whatevermainhas then. Authors, if you'd rather order it differently, say so here and I'll record that instead. Once you agree, theDepends on:line will say "after #9348, #9450, ..." rather thannone.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.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 (
0d34f90fabande867237953). The journal's read event moved from astatic thread_localtoHostThreadLocal, inJournalFile::Read, so keep that hunk.AI-assisted: yes (Claude Code)
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
HostThreadLocalread event inJournalFile::Read(0d34f90fab,e867237953).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_graphicsvalidation comparison address the earlier technical concerns. I am requesting changes for remaining repository requirements: the checklist still leavesDepends onunchecked while #9348, #9450, #6801 and #7948 await author agreement; the requiredUnblocksformat 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 changeUnblockstonone, and fix/rerun conventions. The reported code/tests are also based on an older main than currentab347d144d88fae054d9770cf0db8d3565735c02; 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.Imported from boykopovar/AnyPS5. Originally posted by Gooshy on 2026-10-22T04:31:32Z.
Thanks @MarcZX10.
Depends on:line didn't start with a PR number. Both are fixed.mainab347d144(no conflicts). I built and testedmainand this change on that base:agc_idle_publish_wait,agc_driver_image_array_window_past_layer_limit,agc_driver_tessellation, which fail onmainon this RX 9060 XT).agc_driver_graphicsrun passes on both, with noVUID-errors and no missing-layer message on either.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.none, before merge.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 yourlibraryKeyschange is to the key contents.Neither PR depends on the other, so I'd propose no
Depends onin 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?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
763b1fe648ddfbfb54882264f0f5303314c57a8aagainst PR baseb28bb772177768f99874ca38f6252cd0139acf2a. The stack tool previewed the PR cleanly against currentmaina4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8. 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.
Results
main.Full precheck table and raw helper output
The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check b28bb772177768f99874ca38f6252cd0139acf2a...763b1fe648ddfbfb54882264f0f5303314c57a8/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/usr/bin/python3 tools/pr_abi_audit.py --base b28bb772177768f99874ca38f6252cd0139acf2a --head 763b1fe648ddfbfb54882264f0f5303314c57a8 --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./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/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./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.cppNo 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:
Hosted checks reported on this head:
Negative control
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 / 8and 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.The repository requires the same focused AGC tests on
mainand the change with the validation layer, no shader cache, and required Vulkan enabled. The validation-layer run in the PR description uses baseab347d144, while the current PR base isb28bb772; 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
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
ab347d144base; 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_graphicswithANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationon bothb28bb772177768f99874ca38f6252cd0139acf2aand763b1fe648ddfbfb54882264f0f5303314c57a8using the same GPU. Confirm neither log reports a missing requested layer and that the change adds noVUID-errors. I will re-check the new head, debt text, conventions, and paired test evidence.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
f689d25142f6c89875d8e176182f6beb373fd5c3merged with--no-ffintomain5cb015caaaaf83f8ee431414ee6a457b5b307d49(merged treec743f5ab6ea27fee5a2134be4620eeaacacf604e). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).Results
git diff --checkcheck_conventions.pymain;unwrap_selffixedagc_driver_image_sample_lod_clamp_shader_lanemain, not this PR: the test was added after the baseline commit (fe18496c95), and it still fails when built withmain's versions of this PR's production filesunwrap_self_..._destination_directory_groupmain: atools/Python test that fails inos.chown(EINVAL) in the sandbox; this PR touches notools/fileVUID-agc_driver_graphics,agc_driver_polygon_mode_drawwith the validation layer (my run)VUID-lines; nowas not found but was requestedmessagegit status --porcelainemptyNegative control output
Negative control
main.agc_driver_graphics_teststhen no longer compiles, because the test usesState::lineWidth,Context::wideLinesandValidateLineWidth, whichmaindoesn't have.Graphics/src/State.cppfrommain.agc_driver_graphicsthen fails onmain's one-pixel refusal for a 0x10 width (output above).Findings
Blocking
None.
Non-blocking
PA_SU_LINE_CNTL, so the wide line itself is only checked on the CPU: the decode incore/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:1643andValidateLineWidthincore/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 withoutwideLines, would coverraster.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
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
main04a9eb4fa. The rebase changes three things: theStatesize 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).maingrewStateto 936 on its own, and this PR'slineWidthadds 8 bytes.FileFormatstays at16u(PipelineJournal.cpp:54), one pastmain's 15.Pipeline.cpp: the PR no longer adds#include <string>, becausemainalready 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 hasmain's wording, somain's change is preserved.What I ran
Head
62bfdab9fb2b885c386c3cc46f46cb5ca65e89db, merged with--no-ffintomain04a9eb4fa2877eb6e40bf2c83adf972e40d89b24(merged treee0c560a0a1c472a16e2e02db6600805f3134de2d). Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).git diff --checkcheck_conventions.pymain; no new failures or timeoutsVUID-VkSamplerCreateInfo-addressMode*lines only inagc_driver_image_gather_volume, a test that did not exist at the baselineagc_driver_image_gather_volumewithmain's production filesmain, not this PR. The test was added inf75385c1a2, after baseline1e658521a0agc_driver_graphics,agc_driver_polygon_mode_drawwith the validation layer (merged tree)VUID-lines and nowas not found but was requestedmessagegit status --porcelainemptyNegative control output
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.cpptaken frommain,agc_driver_graphicsfails onmain's one-pixel refusal (output above). After the merged files were restored, it passes.Previous findings
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:1635),ValidateLineWidth(Pipeline.cpp:268) andraster.lineWidth(Pipeline.cpp:661) are still only exercised on the CPU or at a width of 1.0. This does not block the PR.FileFormat = 16umay 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
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 base04a9eb4fa2877eb6e40bf2c83adf972e40d89b24. 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.Results
mainPA_SU_LINE_CNTL.WIDTH / 8pixels wideState936 to 944 bytes, journal format 15 to 16wideLines, the device range and the granularityPrecheck report for this head, unedited table
git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...62bfdab9fb2b885c386c3cc46f46cb5ca65e89db/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/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 --head 62bfdab9fb2b885c386c3cc46f46cb5ca65e89db --json/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/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.mdNegative 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
ValidationKeyaddsstate.lineWidththrough a helper that casts touint64_t, so widths 1.0 and 1.5 give the same entry.ValidateLineWidthruns when the pipeline is built, not in this memo; I did not trace whether the memoised shader validation reads the width. Usestd::bit_cast<std::uint32_t>(state.lineWidth), as the journal does, or state why truncation is intended.Sources
github.com/boykopovar/AnyPS5@62bfdab9fb/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp (L976)github.com/boykopovar/AnyPS5@62bfdab9fb/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp (L1013)ValidateLineWidth:github.com/boykopovar/AnyPS5@62bfdab9fb/core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp (L268-L278)github.com/boykopovar/AnyPS5@62bfdab9fb/core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp (L227)Not verified
agc_driver_graphicsandagc_driver_polygon_mode_drawon any platform. The GPU CI comments and the author's validation-layer run are reports, not my runs.To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-11-06T13:01:36Z.
Review: COMMENTED
Head
62bfdab9fb2b885c386c3cc46f46cb5ca65e89db; PR base04a9eb4fa2877eb6e40bf2c83adf972e40d89b24; tested main2d2d60a959a7abc7b3a34b0341a40eae2af1d298.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_CNTLvalues8,64,8,64through 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
0x40with its existing unsupported-width guard. That baseline refusal is distinct from the head's wrong pixels.DrawKeyRegistersomits context register0x282. Its shape key therefore stays unchanged.shapePipelinereuses the narrow pipeline throughTouchCachedPipeline, before the width-aware full pipeline key runs.Three controls on the unchanged head binary agree on both devices:
APS5_VERIFY_DRAW_RECIPE=1reports that the decoders read context0x282, whichDrawKeyRegisterslacks.APS5_VERIFY_SHAPE_MEMO=1reports that the shape memo's pipeline differs from the pipeline store's on draw 2.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.
VUID-VkDeviceCreateInfo-pNext-pNext; zero new diagnosticsThe 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.cppfixture, SHA-25618b0f24473a26b4209c727106631d042f31ba5e2a834e860f25dcbee94c7cd58. 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, andANYPS5_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:Native CTest runs each name separately with the same options and
--no-tests=error. Both platforms setANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_HOST_REPORT=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer. Native also selectsANYPS5_GPU=NVIDIA GeForce RTX 4080; Linux selects the lavapipe ICD withVK_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.