Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
|
Linux check of the exact head
AI-assisted: yes |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the remaining point is optional, and one changed test file could not be read in full.
What I ran
Reviewed head d7018563da936789b9587945581d9d95f2f83b1e using the prepared diff and the pinned repository reader. No commands or tests were run in this review.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | Core restore and pass lifecycle inspected |
| Tests | not run | Author reports 28 targeted ctest entries passed |
| Full changed-file coverage | not run | tests/Graphics.cpp was excluded as too large |
Findings
Blocking
None.
Non-blocking
Graphics/src/Draw.cpp:3180distinguishes a masked pass from other render passes by mixing a mask value into the existing pass key. This appears to prevent an unmasked draw from joining the restore pass, as intended; consider using an explicit key component if the pass-key representation is extended later, so the distinction is structural rather than hash-based.
Not verified
- The full text of
core/libs/prx/libSceAgcDriver/tests/Graphics.cppwas excluded by the review folder size rule; its changed hunks were inspected indiff.patchonly. - No build, tests, Vulkan validation, or console run was performed by this reviewer. The reported Windows 11 / RTX 2080 Ti tests and PPSA38500 bring-up result are author-reported.
- All other changed files listed in
manifest.jsonwere read from the prepared full texts or targeted pinned-head ranges, includingtests/execution/SampleMaskEarlyStores.cppand the debt note.
To get this to a good state
Nothing is required. Optional: consider representing the masked-pass discriminator explicitly in the pass key.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows/AMD GPU run at this head ( The new test's one Setup:
AI-assisted: yes. |
Plyxen
left a comment
There was a problem hiding this comment.
I read the diff at d7018563da. Windows 11, GCC 15.2, merged into main at cf556db18c3 together with other open PRs (so not an isolated build), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation on an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).
agc_driver_sample_mask_depth_stencil,agc_driver_sample_mask_early_storesand the 60 tests ofagc_driver_graphics_tests: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has aVUID-orSYNC-HAZARDline.- Control (same tree and tests, the changed files of those PRs put back to
main's): the first two fail on both GPUs: "a sample mask that differs between the pixels of a quad, from a pixel program with early depth or stencil tests that writes memory, is unsupported" (the control also lacks #28218).
Not checked: a title.
AI-assisted: yes (Claude Code)
ligmaSec
left a comment
There was a problem hiding this comment.
The fixture checks that a masked early-Z draw and a later unmasked draw use separate passes. The recording logic can also continue a pass across draws with the same mask, where it saves depth once and restores the excluded pixels only at pass end. Could the fixture issue two consecutive same-mask draws with distinct depth/stencil values and assert both that the pass continues and that the masked pixels retain their original values afterward? This covers the lifetime of the saved attachment across the continuation.
Source review at d7018563da. The head trial-merges onto d2e04ef9b3. Paired Vulkan execution is queued.
AI-assisted: yes.
|
Linux/RADV validation of head The candidate passed all 7/7 selected quad-mask, sample-order, alpha-to-coverage, and pixel-sample-iteration tests, including Both restore controls fail independently on RADV:
Thus the test actually detects restoring masked pixels and restoring every pixel, rather than merely accepting a plausible final image. The current-main merge was intentionally conservative: it keeps main's per-target multisample recipe support and the PR's
|
What
Stacked on #28218: its commit is the first one here, and this PR is the second commit only.
With #28218, a draw that applies a quad sample mask in the pixel shader under early depth or stencil tests, from a pixel program that writes memory, runs under
EarlyFragmentTests. The early tests then also run for the masked pixels, so #28218 still refuses such a draw when it writes depth or stencil: the masked pixels would get the draw's depth and stencil, which on the console they never reach.This PR lifts that refusal. For such a draw (
prepareDraw,MaskedDepth), the depth-stencil target is copied before the draw's render pass (RecordMaskedDepthSave). After the pass, one pass puts the copy's depth back throughgl_FragDepth, and its stencil throughVK_EXT_shader_stencil_export, or one pass per bit without it, into the masked pixels only (RecordMaskedDepthRestore). The kept pixels are therefore tested and written in primitive order as on the console, and the masked ones end unchanged.Depthis split intoSaveand the draw, and the pass gets single-sample variants of its three fragment programs (DepthSingle,StencilExportSingle,StencilBitsSingle) plus sample shading only above one sample.DepthSurfaceMaskedTargetfinds the resident depth surface the copy is taken from.MaskedDepthRestoreRefusalkeeps the refusal where the restore is not implemented: a multisampled or layered depth target, or a host depth format other than the ones the sample-order depth pass writes back throughgl_FragDepth(16-bit, or 32-bit float). Like that pass, the restore does not keep a subnormal or NaN depth value on the RTX 2080 Ti's driver, as found in the review of perf(agc): read depth planes into storage images in a compute pass #12120.The debt fragment of #28218 is updated to describe the restore.
Tested
agc_driver_sample_mask_early_stores(from fix(agc): run quad-masked early-Z stores under early fragment tests #28218) now covers draws that write depth or stencil, over five quad pixel masks, for one triangle and for two overlapping triangles in one draw:agc_driver_sample_mask_depth_stencilnow expects the storing early-Z program with depth writes to store only in the kept pixels.sampleOrderTests(agc_graphics_profile_draw) checksMaskedDepthRestoreRefusal: a single-sampled 32-bit float target with stencil and a stencil-only write are accepted, and layered, multisampled and 24-bit depth targets are refused.agc_driver_sample_mask_early_stores: a restore that does nothing fails at "quad pixel mask 1, one triangle, depth is the draw's where the mask kept the pixel and the test passed, and the old depth elsewhere: pixel (3, 0) is 255, expected kept", and one that puts back every pixel fails at the same check with "pixel (2, 0) is 64, expected drawn".ctest --test-dir build -R <those names> -V, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layer(validation layer 1.4.363.1). On this change all 28 pass. On fix(agc): run quad-masked early-Z stores under early fragment tests #28218 alone, the same base 06f1bef, the 26 of them it has pass. The loader inserts the layer in every test that creates a Vulkan instance, neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS, and neither has aVUID-line.D32_SFLOAT_S8_UINTtarget. With both parts on the bring-up tree, the title draws them and reaches its first world frame (bring-up run 157).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)Summary by CodeRabbit
Bug Fixes
Tests
Documentation