feat(shader): accept SDWA byte destination selectors on v_cvt_f16_i16 #18244
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18244"
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 Kikoarl on 2026-11-10T23:32:50Z.
What
Accept Sub-Dword Addressing (SDWA) byte destination selectors on
v_cvt_f16_i16(VOP1 opcode0x51).Updates
vop1SdwaRulesforVCvtF16I16incore/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cppto allowsdwaSelBytes() | sdwaSelWords()(previously restricted tosdwaSelWords()). In AMD RDNA2 ISA §13.3.7 Table 88, 16-bit destination instructions accept byte destination selectors (BYTE_0..BYTE_3) alongside word destination selectors (WORD_0,WORD_1) and destination unused modesUNUSED_PAD,UNUSED_SEXT, andUNUSED_PRESERVE.Sources:
VOP1Instructions.tdandSIPeepholeSDWA.cppdestination foldingdocs/dev/debt/shader.mdunder### FunctionalTested
/tmp/anyps5_verify_build(-DBUILD_TESTING=ON), rebased cleanly ontoorigin/main(115a7036e2, PR head3f915509ed):ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir /tmp/anyps5_verify_build --output-on-failure -R "^agc_driver_sdwa_cvt_f16_i16_bytes":agc_driver_sdwa_cvt_f16_i16_bytes(Wave32): Passed (0.82 sec)agc_driver_sdwa_cvt_f16_i16_bytes_wave64(Wave64): Passed (0.33 sec)int16_tvalues (-1,-2,-8,-1000, etc.) across 6 sub-dword destination selections (BYTE_0..BYTE_3,WORD_0,WORD_1) and 3 unused modes (UNUSED_PAD,UNUSED_SEXT,UNUSED_PRESERVE), plus negative decoder refusal checks for invalid selector7, illegal unused mode3, and SDWA source negate on integer source.python3 tools/debt_fold.py --check,python3 tools/check_conventions.py --base origin/main, andgit diff --check origin/main..HEAD: passed cleanly.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-10T23:57:55Z.
Review: COMMENTED
Reviewed — looks good
I found no blocking issue in the four changed files; this is a comment-only result while two hosted jobs are pending and the required paired GPU validation is not available.
What I ran
Reviewed head
2d8e6892710ec034e70ed3d1cc33496b229ed6acagainst basebc94a8e423ea026aadbb29165fed1ad2db471154; the merge preview was clean. I read all four changed files and checked the decoder rule, test assertions, and CMake test discovery.Environment: Linux 6.1, Python 3.11.2, GCC 12.2.0. I ran:
I did not build or run the GPU test locally. The author reports Wave32 and Wave64 runs on Intel RPL-S and decoder refusal tests; I did not reproduce those runs.
Results
Precheck details
Command:
Exact head/base recorded by the precheck:
Applicable command output:
The exact
git diff --checkexited 0 with no output. The ABI audit returnednot_applicablewith no findings. The test-quality heuristic flagged the new C++ test as not found literally in CMake; manual inspection confirmed this is a false positive because CMake glob-registerstests/execution/*.cppandtests/cmake/*.cmake.Hosted status command:
Observed output:
Negative control
I did not run a base-versus-change negative control. The author reports decoder tests rejecting an invalid destination selector, an invalid unused mode, and a source modifier on an integer source; I did not reproduce them.
Findings
Blocking
None found in the changed files.
Non-blocking
The new test adds useful byte/word destination coverage for all three unused-bit modes, but the PR does not include matched
mainand PR-head Vulkan validation-layer logs. The repository's AGC/shader guidance asks for the same focused test on both revisions and a VUID comparison.Sources
VCvtF16I16Not verified
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, andVK_LAYER_KHRONOS_validationon eithermainor this head, or compare their VUID output.To get this to a good state
Please provide the matched focused GPU test logs from
mainand this head using the repository's validation settings, and let the two Windows jobs finish. I’ll refresh the head and rerun the relevant checks before considering an approval.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T10:12:17Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this change; the optional points below are for follow-up.
What I ran
Reviewed head
7066d46b9a9f59cda8d06b00de980e6866d4e831usingrepo_read.py. No build or test commands were run; the execution results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/tests/execution/SdwaCvtF16I16Bytes.cpp:34declarescheckPinned, but the test never reads it. The fixed expected values are checked unconditionally, so remove the unused field or use it to control the pinned-value checks.Not verified
No build, local test, or independent hardware execution was performed. The physical GPU results and conventions check in the description were not independently verified. The complete changed files read were
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sdwa_cvt_f16_i16_bytes_tests.cmake,core/libs/prx/libSceAgcDriver/tests/execution/SdwaCvtF16I16Bytes.cpp,core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp, anddocs/dev/debt/shader.md. No changed files were excluded by the manifest.To get this to a good state
Nothing is required. Optional: remove or use the unused
checkPinnedfield.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T11:14:51Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
747ed735b00ecdecbc2e57144af061e38f12f987using the prepared diff and pinned repository reader. No shell or test commands were available to run.Read all four changed files:
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sdwa_cvt_f16_i16_bytes_tests.cmake,core/libs/prx/libSceAgcDriver/tests/execution/SdwaCvtF16I16Bytes.cpp,core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp, anddocs/dev/debt/shader.md. No changed files were excluded.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
The selector rule adds byte destinations for
VCvtF16I16; related decode rules and selector masks were inspected at the pinned decoder source. The changed execution test and CMake registration were also reviewed in the prepared diff.Not verified
The reported Wave32/Wave64 GPU execution, refusal tests, and conventions check were author-reported and not run during this review. Physical console behavior remains unverified, as stated in the description. The prepared bundle contained no excluded changed files.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T11:44:43Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the review found no verified defects in the changed code.
What I ran
Reviewed head
3f915509ed1cddcb735edd326931cdf793bf959e. I used the prepared diff andrepo_read.pyto inspect the full text of all four files listed as reviewed in the manifest. I did not run commands or tests; test results below are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The reported Wave32/Wave64 execution tests, build, convention/debt checks, and
git diff --checkwere not run in this review. PS5 gfx1013 behavior remains unmeasured, as the updated debt entry states. No files were excluded from the reviewed set; all four manifest entries markedincludedwere read.To get this to a good state
Nothing is required.