Skip to content

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

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
CorruptName:fix/flat-smooth-input-alias
Dec 4, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
CorruptName:fix/flat-smooth-input-alias

Conversation

@CorruptName

@CorruptName CorruptName commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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

@oneandonlydean oneandonlydean self-assigned this Oct 28, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@CorruptName could you drop the new expected-rejection loop in CheckMixedAlias (PixelBarycentricEmulation.cpp, lines 428-438) and keep the positive mixed-alias pixel checks? It requires P10/first and P20/last to throw with "not measured". Our standing test rule is to test supported behavior and argument validation, without pinning a valid unimplemented form to throw, because that breaks when the form is implemented. This asks only to remove those new assertions; the runtime support guard can stay. Please retain the supported interpolation/provoking cases and cache-enabled/disabled validation coverage.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 7275 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PixelBarycentricEmulation.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PixelBarycentricEmulation.cpp
core/shader/recompiler/Optimization/src/ShaderInfoCollector.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PixelBarycentricEmulation.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 10351 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 11551 core/shader/recompiler/Optimization/src/ShaderInfoCollector.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 12944 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PixelBarycentricEmulation.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PixelBarycentricEmulation.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 16571 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 17022 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 17056 core/shader/recompiler/Optimization/src/ShaderInfoCollector.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 17611 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 20519 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 22424 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 22692 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 25010 core/shader/recompiler/Optimization/src/ShaderInfoCollector.cpp
PR 26084 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 27698 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 28142 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28229 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 28470 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28487 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28488 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
PR 28586 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/Optimization/src/ShaderInfoCollector.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28668 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/Optimization/src/ShaderInfoCollector.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28673 core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp

@github-actions github-actions Bot added shader core/shader agc libSceAgc* needs rebase Conflicts with main, rebase needed labels Oct 29, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a582c98 merged onto main 52c09d5 · tested 2026-10-29 11:30 UTC · 23 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,198 passed · 6 failed (0 new, 5 also fail on main, 1 unstable on main) · 39 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,243 of 2,873 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (855 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 2 of the last 4 main runs
Failing on main too (5, not counted against this PR)
agc_compute_pipeline_inspection
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 405 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (405 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alpha_to_coverage, agc_driver_array_layer_target_cpu, agc_driver_bc_block_copy, and 397 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (39)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_labels: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SD
Reproduce
git fetch origin a582c98640dc9593fe179dbcfde6aededa7854f7 52c09d567d2fa453494dd720fcf53a98149468e4
git checkout 52c09d567d2fa453494dd720fcf53a98149468e4 && git merge --no-ff a582c98640dc9593fe179dbcfde6aededa7854f7
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@bunbeans2-arch

Copy link
Copy Markdown
Contributor

A Windows run with AMD's own driver, since the GPUs tested are RADV on Linux: AMD RDNA 4, a582c98640 as is. It conflicts with current main in PixelBarycentricEmulation.cpp, so I built the head itself (base 66248d1d5d).

Windows 11 Pro 10.0.22631, AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32015.7029, amdvlk64), MSYS2 UCRT64 g++ 16.1.0, Release. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; with VK_LOADER_DEBUG=layer the loader logs Insert instance layer "VK_LAYER_KHRONOS_validation" in every run of every test below that creates a Vulkan instance. 3 runs:

  • agc_driver_pixel_barycentric_emulation passes 3 of 3. The emulation runs through the geometry, tessellation and rect-list stages here, not just the built-in path.
  • The new mixed alias case, twice per run: mixed flat/smooth alias passed for mode 0 last, mode 1 first, and mode 2 first and last, at pixels=932 each. Mode 0 first and mode 1 last are refused with v_interp_mov p10 of a flat input with the first provoking vertex is not measured and the p20 / last counterpart.
  • No VUID- line.

AI-assisted: yes (Claude Code)

@blawesom

Copy link
Copy Markdown
Contributor

Validation: fix(shader): preserve flat aliases in barycentric emulation (queue item 35)

Environment

  • Machine: CachyOS, kernel 7.3.4-1-cachyos, Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (RADV GFX1201, /dev/kfd present)
  • Scope: Linux + AMD RADV only; results do not speak for other GPUs/drivers/OSes
  • PR state at check: OPEN, not locked, headRefOid = a582c98 (matches queue SHA)
  • Base: origin/main = a9f2910 (worktree /home/benj/scratch/wt5/base-main, reused read-only, clean, existing build)
  • PR tree: /home/benj/scratch/wt5/pr-12619 @ a582c98 (single commit "fix(shader): preserve flat inputs aliased with smooth barycentric inputs" on branch base 66248d1)

Build

  • cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBUILD_TESTING=ON → exit 0, wall 9 s (log q35-pr12619-configure.log)
  • cmake --build build --parallel 12 (CMAKE_BUILD_PARALLEL_LEVEL=12, MAKEFLAGS=-j12) → exit 0, wall 224 s, 6175 targets (log q35-pr12619-build.log)

Focused tests

  • Pattern: anchored alternation of 53 test names present in BOTH trees (keyword-filtered barycentric|flat|interp|spirv + core shader-recompiler tests; full list q35-pattern-names.txt, regex q35-pattern.txt). ctest -N -R matched sets diffed identical in base and PR builds (53 = 53, no diff).
  • Command (both trees, identical env, timeout 3600 each):
    ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_ADD_LAYER_PATH=/home/benj/scratch/vvl-layer VK_LOADER_DEBUG=layer ANYPS5_GPU='AMD Radeon RX 9070 XT' ctest --test-dir build -R '<pattern>' -V
  • Base (q35-tests-base.log): exit 0, wall 5 s — 100% tests passed out of 53
  • PR (q35-tests-pr.log): exit 0, wall 4 s — 100% tests passed out of 53
  • Per-test comparison: 53 Passed in both, name+status lists identical (diff empty). Includes agc_driver_pixel_barycentric_emulation, agc_driver_mesh_barycentric_emulation, agc_fragment_barycentric, agc_interpolant_mapping, agc_driver_interpolation_modes/f16, agc_driver_pixel_exec_interpolation, all agc_driver_flat_* / agc_flat_scratch, all agc_spirv_*, agc_shader_fusion/helpers/control_flow/memory, etc.

Vulkan validation-layer checks (per AGENTS.md)

  • was not found but was requested by env var VK_INSTANCE_LAYERS: ABSENT in both logs (count 0)
  • Insert instance layer "VK_LAYER_KHRONOS_validation": PRESENT in both logs (29 occurrences each); VK_LOADER_DEBUG=layer output confirms insertion
  • VUID-/SYNC-HAZARD-/bracketed-ID scan: 0 matches in BOTH logs → the change adds no new validation IDs (none existed on either side)
  • GPU confirmed in use: "AMD Radeon RX 9070 XT" appears 87x per log; RADV loaded (radv not-conformant warning present, expected on Mesa)

Push

  • git push fork +a582c98640dc9593fe179dbcfde6aededa7854f7:refs/heads/validation/pr-12619 → succeeded (new branch on blawesom/AnyPS5)

Verdict

PASS — build green, 53/53 focused shader-recompiler tests pass identically on base and PR with the Khronos validation layer inserted and zero VUID/SYNC-HAZARD diagnostics on either tree. No new validation errors attributable to the PR.

Limitations

  • Single run per tree (no repetition/statistics); intermittent faults not excluded
  • Linux/AMD RADV only; no AGC-vs-hardware comparison, no NVIDIA/other-OS coverage
  • PR branch base (66248d1) is behind origin/main (a9f2910); the focused set was restricted to tests registered in both trees, so tests added on main after the branch point were not run
  • ctest can report Passed while validation errors are logged; checked logs explicitly for VUID-/SYNC-HAZARD IDs (none in either log)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 14, 2026
@domx4q

domx4q commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

NVIDIA Linux run with the Khronos validation layer of the current head eeaff3faa6; the runs in Tested and in the thread are of a582c98640 (NVIDIA) or AMD.

Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head eeaff3faa6 merged onto main 40206fe50d with --no-ff (clean, as b82443d4a8). Main baseline is a Release build of 40206fe50d on the same machine.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -R '^agc_driver_pixel_barycentric_emulation' -V
main 40206fe50d this PR
Result 1 of 1 passed 1 of 1 passed
Insert instance layer "VK_LAYER_KHRONOS_validation" 1 1
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- none none

The pattern is the test this PR changes. main runs main's PixelBarycentricEmulation.cpp; the merge runs this PR's, with the mixed flat/smooth alias case. It passes on the RTX 4090 (barycentric emulation through the geometry stage passed: 932 perspective and 932 linear I/J pixels, raw vertex values, host interpolation, face culling, flat inputs and triangle strips).

Negative control: the merge with Pipeline.cpp, ShaderInfoCollector.cpp, SpirvEmitterHelpers.cpp and SpirvInputOutput.cpp reverted to main, same command, fails as expected, with no VUID-:

AGC graphics: mixed flat/smooth alias lost the provoking value: mode=0 actual=3.050000

No VUID- errors on either side; the focused test passes on Ada and fails without the source change.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head eeaff3faa6, applied with git apply on main fd4aeed483 together with the other 26 PRs of one batch (#24498, #24665, #17297, #21499, #21726, #22534, #12900, #17843, #22051, #22075, #23087, #23206, #23222, #23227, #13147, #17482, #21935, #17477, #18272, #22858, #22929, #23028, #23295, #23916, #24179, #24706). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
agc_driver_mesh_barycentric_emulation, agc_driver_pixel_barycentric_emulation (2 tests, matched by name to the test file this PR changes) all pass all pass

Whole batch: the full ctest -j 12 (6525 tests) on the RTX 3080 has 8 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Traced to other PRs of the batch, each by reverting it and testing again: #18272 (guest_audio_out), #12900 (guest_user_service_initial_user_bounds); none is in this PR's area. Failing tests I could not trace to a single PR (reverting the likely candidates did not clear them): guest_content_search. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@CorruptName the only thing I see holding this on eeaff3faa6 is the conventions check: the Checklist line "Based on current main; no other open PR implements the same functions" is unticked. If that is true, could you tick it in the description? Editing the description reruns the check, so no push is needed.

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@oneandonlydean
oneandonlydean merged commit 9cd1b45 into boykopovar:main Dec 4, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants