fix(shader): preserve flat aliases in barycentric emulation #12619

Merged
CorruptName merged 3 commits from upstream-pr/12619 into main 2026-12-04 05:46:50 +00:00
CorruptName commented 2026-10-28 23:06:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CorruptName on 2026-10-28T23:06:05Z.


What

Preserve flat fragment inputs that share an export slot with smooth inputs during barycentric emulation. Keep their input representations separate and apply the existing provoking-vertex validation before pipeline-cache lookup.

Add positive mixed-alias pixel checks for the supported interpolation/provoking combinations through the geometry and tessellation paths. The latest update removes the expected-rejection loop as requested in review; the runtime guard remains unchanged.

Existing instruction semantics and support restrictions are unchanged. Native fragment-barycentric, mesh, and rect-list mixed-alias coverage are outside this regression test. No performance improvement is claimed.

Tested

Validation below was performed and reported by other contributors on the older PR revision a582c98640, before the expected-rejection loop was removed. These are their results, not new tests by the PR author, and they do not validate the latest revision 17ab7d7.

  • TechLevelZero's NVIDIA report: NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Ubuntu 26.04.1 LTS. Tested the older revision merged onto main 52c09d5. Build passed; 2,198 tests passed, 6 failed (none new versus main), and 39 were skipped. No new Vulkan validation IDs versus main were reported.
  • bunbeans2-arch's Windows report: AMD Radeon RX 9070 XT, driver 32.0.32015.7029, Windows 11 Pro. Tested the older PR revision directly. agc_driver_pixel_barycentric_emulation passed 3/3 runs, including the positive mixed-alias cases; no VUID lines were reported.
  • blawesom's Linux report: AMD Radeon RX 9070 XT with RADV, CachyOS Linux. Reported 53/53 focused tests passing on both the older PR revision and the compared main revision, with no VUID/SYNC-HAZARD diagnostics.

Latest update 17ab7d7: only the expected-rejection loop was deleted. git diff --check passed. Build and GPU tests were not rerun. The conventions checker could not run because Python was unavailable.

The branch currently conflicts with main; this update does not resolve those conflicts.

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: none
  • GPUs tested: contributor-reported tests of older revision a582c98640 only: NVIDIA RTX 2000 Ada Generation (TechLevelZero) and AMD Radeon RX 9070 XT (bunbeans2-arch and blawesom); driver/OS details and report links above. Latest revision 17ab7d7 has not been GPU-tested.
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5059108410 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12619). Originally posted by [CorruptName](https://github.com/CorruptName) on 2026-10-28T23:06:05Z. --- ### What Preserve flat fragment inputs that share an export slot with smooth inputs during barycentric emulation. Keep their input representations separate and apply the existing provoking-vertex validation before pipeline-cache lookup. Add positive mixed-alias pixel checks for the supported interpolation/provoking combinations through the geometry and tessellation paths. The latest update removes the expected-rejection loop as requested in review; the runtime guard remains unchanged. Existing instruction semantics and support restrictions are unchanged. Native fragment-barycentric, mesh, and rect-list mixed-alias coverage are outside this regression test. No performance improvement is claimed. ### Tested Validation below was performed and reported by other contributors on the older PR revision `a582c98640`, before the expected-rejection loop was removed. These are their results, not new tests by the PR author, and they do not validate the latest revision `17ab7d7`. - [TechLevelZero's NVIDIA report](https://github.com/boykopovar/AnyPS5/pull/12619#issuecomment-6495451819): NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Ubuntu 26.04.1 LTS. Tested the older revision merged onto main `52c09d5`. Build passed; 2,198 tests passed, 6 failed (none new versus main), and 39 were skipped. No new Vulkan validation IDs versus main were reported. - [bunbeans2-arch's Windows report](https://github.com/boykopovar/AnyPS5/pull/12619#issuecomment-6523805369): AMD Radeon RX 9070 XT, driver 32.0.32015.7029, Windows 11 Pro. Tested the older PR revision directly. `agc_driver_pixel_barycentric_emulation` passed 3/3 runs, including the positive mixed-alias cases; no VUID lines were reported. - [blawesom's Linux report](https://github.com/boykopovar/AnyPS5/pull/12619#issuecomment-6871515133): AMD Radeon RX 9070 XT with RADV, CachyOS Linux. Reported 53/53 focused tests passing on both the older PR revision and the compared main revision, with no VUID/SYNC-HAZARD diagnostics. Latest update `17ab7d7`: only the expected-rejection loop was deleted. `git diff --check` passed. Build and GPU tests were not rerun. The conventions checker could not run because Python was unavailable. The branch currently conflicts with `main`; this update does not resolve those conflicts. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [ ] 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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: contributor-reported tests of older revision `a582c98640` only: NVIDIA RTX 2000 Ada Generation (TechLevelZero) and AMD Radeon RX 9070 XT (bunbeans2-arch and blawesom); driver/OS details and report links above. Latest revision `17ab7d7` has not been GPU-tested. - [x] AI-assisted: yes <!-- yes / no -->
MarcZX10 commented 2026-11-20 09:50:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T09:50:47Z.

Review: COMMENTED


Reviewed — no blocking findings

The reviewed change has no verified blocking defects; the review is incomplete because no repository reader or shell tool is available in this session.

What I ran

No commands were run. I could not inspect the prepared review files or repository at the pinned head.

Results

Check Result Note
Diff and changed files not run Review inputs unavailable
Targeted code audit not run Repository reader unavailable

Findings

Blocking

None verified.

Non-blocking

None verified.

Not verified

The description, commits, diff, manifest, changed file contents, tests, and relevant callers were not read. No files can be reported as read against files reviewed.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5990723557 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12619#pullrequestreview-5990723557). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T09:50:47Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The reviewed change has no verified blocking defects; the review is incomplete because no repository reader or shell tool is available in this session. ## What I ran No commands were run. I could not inspect the prepared review files or repository at the pinned head. ## Results | Check | Result | Note | |---|---|---| | Diff and changed files | not run | Review inputs unavailable | | Targeted code audit | not run | Repository reader unavailable | ## Findings ### Blocking None verified. ### Non-blocking None verified. ## Not verified The description, commits, diff, manifest, changed file contents, tests, and relevant callers were not read. No files can be reported as read against files reviewed. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 22:56:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:56:30Z.

Review: COMMENTED


The trial merge is clean. The new mixed-alias fixture checks that a flat input and a smooth input sourced from the same export slot keep distinct semantics. Please retain that case for both shader front ends and both provoking-vertex conventions where supported. In particular, keep the same-key reuse control so the validation and decoration stay correct on a cache hit as well as a cold pipeline. I have no paired Vulkan result for this head yet.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6180101605 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12619#pullrequestreview-6180101605). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:56:30Z. **Review:** COMMENTED --- The trial merge is clean. The new mixed-alias fixture checks that a flat input and a smooth input sourced from the same export slot keep distinct semantics. Please retain that case for both shader front ends and both provoking-vertex conventions where supported. In particular, keep the same-key reuse control so the validation and decoration stay correct on a cache hit as well as a cold pipeline. I have no paired Vulkan result for this head yet. AI-assisted: yes.
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!12619
No description provided.