Skip to content

fix(shader): include instruction details in VOP2 decode errors - #22529

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
joelfernandes23:fix/agc-vop2-decode-context
Nov 27, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
joelfernandes23:fix/agc-vop2-decode-context

Conversation

@joelfernandes23

Copy link
Copy Markdown
Contributor

What

Report the rejected VOP2 opcode, program counter, and raw instruction word in the existing decode error. PRAGMATA (PPSA02530) stopped at an unsupported VOP2 encoding during a Windows bring-up run, but the diagnostic had no instruction details to tell a missing opcode from invalid shader data.

This changes error reporting only. Unsupported encodings still raise the same exception type and supported instructions decode as before.

Tested

Windows 11 Pro 26200, Radeon RX 7900 XT, AMD Vulkan driver 26.10.1, WinLibs MinGW GCC 15.2. The expanded VOP2 test fails against the original decoder and passes with the change, checking six rejected encodings after a leading instruction so the PC is nonzero. The same four focused tests passed on main and the change: agc_vop2_encoding_decode, agc_tiled_resolve, agc_changed_copy, and agc_bound_changed_copy. The three Vulkan tests loaded Khronos validation with synchronization validation enabled on both runs and logged no VUIDs or synchronization hazards. The VOP2 unit test exercises the decoder without opening a Vulkan device. No game was run for this standalone change.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: AMD Radeon RX 7900 XT, AMD proprietary Vulkan driver 26.10.1, Windows 11 Pro 26200
  • AI-assisted: yes

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 65cea7bfe7, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#18156, #21208, #22013, #22795, #23226, #23385, #24324, #24533, #24582, #24690, #24693, #17553, #19619, #20085, #21081, #19682, #22123, #22572, #22662, #23479, #23787, #24568, #15330, #21249, #21630, #21713, #22040, #23490, #24394). 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_vop2_encoding_decode (1 test, matched by name to the test file this PR changes) all pass all pass

Whole batch: the full ctest -j 12 (6540 tests) on the RTX 3080 has 5 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: #17553 (guest_memory); none is in this PR's area. The 2143 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)

@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 — looks good

Nothing blocks this change; the review evidence supports merging.

What I ran

Reviewed head 65cea7bfe7768d67839082a1f19d145f7383ce2f. No commands or tests were run in this review session; the PR description reports focused test results.

Results

Check Result Note
Diff and changed code passed Both changed files read
Tests in this session not run Results in description are author reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

Runtime behavior and the author-reported Windows tests were not independently verified. Read core/libs/prx/libSceAgcDriver/tests/Vop2EncodingDecode.cpp and core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp; no changed files were excluded according to the manifest.

To get this to a good state

Nothing is required.

@github-actions

github-actions Bot commented Nov 26, 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 17606 core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp
PR 24513 core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp

@oneandonlydean
oneandonlydean merged commit 3d43500 into boykopovar:main Nov 27, 2026
16 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.

4 participants