Repository navigation
perf(shader): compute v_pk_fma_f16 and v_pk_fmac_f16 with OpFmaKHR - #11265
Conversation
|
This pull request is labeled |
MarcZX10
left a comment
There was a problem hiding this comment.
The code review found the FMA path consistently gated by native f16 rounding/denorm support and shaderFmaFloat16; the test and replay flag exercise the enabled and fallback paths. I ran git diff --check and python3 tools/check_conventions.py --base upstream/main on this exact head; both pass. The PR's reported GPU comparisons are useful, but I could not independently run the Vulkan test locally, and hosted product-build jobs were skipped.
The required performance evidence is still missing. The repository rule and the automated request require the main and changed aps5-summary.jsonl lines plus two traces from the same title, scene and machine, and tools/trace_digest.py output. The PR says its game windows covered different scenes and therefore are not comparable, and does not include those artifacts. Please rerun a comparable capture pair and attach both lines, traces and digest output, or get maintainer direction on an applicable exception before treating the perf report as complete. I am requesting changes for this outstanding contribution-rule requirement; this is not a finding that the code path itself is incorrect.
|
Thanks @MarcZX10, fair. What this PR changes is pipeline creation, and |
|
@MarcZX10 added to the body: both In the base window, the |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Re-reviewed the updated performance report. The two summary lines and gzip traces are accessible from the linked fork release; I downloaded both traces and ran tools/trace_digest.py on each, confirming the reported 8,412.7 ms base frame and 2,651.4 ms changed-build maximum. Both captures mark trace_dropped: true, which the report discloses. The remaining policy issue is the baseline commit: abfc85162b6e is the head of open PR #11184, not main. PR #11184 is still OPEN, and the current upstream main is acb900c194325b9ee8c23c10768a9a491454f0b2; comparing that main with abfc85162b6e shows the branches have diverged. Please provide a capture from current main and the changed stack on the same title/scene/machine, or obtain maintainer approval to use the parent PR as the baseline and document that exception. This request is only about satisfying the stated main baseline for the performance claim; I found no new code finding. Hosted policy/conventions pass; product build jobs are skipped by path policy.
e3a18ac to
61bc200
Compare
|
@MarcZX10 done: both branches are rebased onto The result is honest but flat: in this pair neither build compiles The 44 f16/fma tests were rerun on the rebased head with validation and spirv-val (RTX 4090 fused, UHD 770 fallback): all pass. |
MarcZX10
left a comment
There was a problem hiding this comment.
The updated capture pair resolves my earlier baseline concern: the body now supplies current main (acb900c19432) and PR head (61bc20017f97) summaries for the same GTA V scene/window, machine, GPU, and settings, and both published trace filenames match their summary lines. I downloaded both release traces and independently ran the current tools/trace_digest.py from upstream/main with each summary file alongside its trace.
The attached digest files do not reproduce from those published trace artifacts. For example, the main digest says the draw committer has 8.5 ms busy / 0.0 ms waiting, while the rerun reports 8.4 / 0.2; the PR digest says 7.0 / 0.0, while the rerun says 6.8 / 0.2. The reruns also include a Largest GPU batches section that is absent from both attached outputs. Please regenerate and replace the two digest files using the current script on these exact trace assets. The summary headers, reported frame maxima and slowest-frame rows match; this request is about making the attached full digest output reproducible from the published pair.
|
@MarcZX10 right, those two came from an older |
MarcZX10
left a comment
There was a problem hiding this comment.
The replacement trace digests now reproduce exactly from the released traces using tools/trace_digest.py from current main; that resolves my previous evidence finding.
One required shader validation result is still missing from the report. CONTRIBUTING.md requires the same focused shader tests on main and this change, with validation enabled, for every reported GPU. The description reports the focused f16/fma runs on this PR head, but its full-suite baseline is from main 50bc72b, before the current rebase; I do not see the focused test results from current main acb900c on either the RTX 4090 or UHD 770. The hosted product jobs are skipped for this PR, so CI does not supply that comparison. Please add the focused baseline outcomes for both GPUs, including confirmation that VK_LAYER_KHRONOS_validation was inserted and the comparison found no new VUID errors.
|
@MarcZX10 added under Tested: the same 44 focused f16/fma tests on |
|
The updated description now includes the focused baseline runs on current
All five are still open on the inspected heads. The checklist currently lists only #11184 under |
|
@MarcZX10 thanks for checking. I looked at each overlap: none of the five is a functional dependency, they touch unrelated topics and only collide on neighbouring lines:
So no merge order is needed between them and this PR, and |
|
Test suite only; no title was run. AI-assisted: yes (Claude Code) |
|
@TechLevelZero thanks for running it. This branch carries #11184 (its first commit moves Without that step the checkout keeps |
|
Correction to my overlap comment: I reran the pairwise merges on the current PR heads. They do have textual conflicts in the shared files I named, but that alone does not prove a functional dependency or mean all five belong on this checklist line. Your explanation that these are adjacent edits that can be carried through a rebase is reasonable; A separate freshness issue has appeared since the last test report. |
MarcZX10
left a comment
There was a problem hiding this comment.
The earlier exact-head review findings about the trace digests and focused current-main validation were addressed in the report, and I am withdrawing my request to list the five textual-conflict PRs as dependencies; #11184 is the functional dependency because this change requires its SPIR-V pins. Current upstream main has moved since those runs: this branch is 3 ahead / 196 behind 14c99b52ac, and #11184 remains open. Please refresh onto current main after #11184 lands, rerun the focused validation comparison and update the performance evidence for that exact head before this is ready to approve.
|
@MarcZX10 thanks for rerunning the merges. Agreed: once #11184 lands I will rebase this branch onto the resulting |
|
@MarcZX10 refreshed now that #13053 has restored the SPIR-V pins on
The body now has the new tables and summary lines, and the old pair is gone from it. Traces, digests from current AI-assisted: yes (Claude Code) |
MarcZX10
left a comment
There was a problem hiding this comment.
Re-checked — new head, looks good
The updated exact-head GPU comparison and reproducible performance artifacts resolve my prior review blockers; I found no blocking issue in the current diff.
What I ran
Reviewed head 8d84578a43058c8ca30606335ad7a9a702af2658 against PR base 08a10d225306ad102b57408e2ef7566bcfb829b2. The merge preview against that base was clean (tree 57e164f31b2aced81bc98f57a34a475ccffc9ba0). git diff --check and repository conventions passed. I downloaded the three released traces and summaries and reran tools/trace_digest.py from current main; all three generated digests exactly match the attached digests.txt sections. I did not run a build or GPU tests locally.
git merge-tree --write-tree upstream/main refs/remotes/upstream/pr11265
git diff --check upstream/main...refs/remotes/upstream/pr11265
python3 tools/check_conventions.py --base upstream/main --head refs/remotes/upstream/pr11265 --title 'perf(shader): compute v_pk_fma_f16 and v_pk_fmac_f16 with OpFmaKHR' --body <(gh pr view 11265 -R boykopovar/AnyPS5 --json body --jq .body)
python3 tools/trace_digest.py <base-trace> --summary <base-summary>
python3 tools/trace_digest.py <base-rerun-trace> --summary <base-rerun-summary>
python3 tools/trace_digest.py <pr-trace> --summary <pr-summary>Results
| Check | Result |
|---|---|
| Current-base merge preview | Clean; tree 57e164f31b2aced81bc98f57a34a475ccffc9ba0 |
| Diff check | Passed; no whitespace errors |
| Repository conventions | Passed |
| Published trace digest reproduction | All 3 digests match the released digests.txt |
| Hosted checks | Windows, Ubuntu/macOS relinker and ASAN, conventions, eligibility, labels, and report passed; Linux and specialized jobs skipped; two macOS relinker jobs were pending at review time |
| Focused GPU tests and performance measurements | Author-reported; not run locally |
Unedited local check output
57e164f31b2aced81bc98f57a34a475ccffc9ba0
All conventions checks passed.
base MATCH
pr MATCH
base2 MATCH
Findings
Blocking
None found in the reviewed diff. The earlier missing current-baseline focused comparison and trace-digest reproducibility issues are resolved in the updated report.
Non-blocking
- The capture baseline is
mainat91a69952c1; currentmainhas advanced to08a10d2253. The merge preview is clean, and none of the interveningmaincommits changes a file touched by this PR. - The author reports 45/45 focused tests with validation on RTX 4090 for both arms, and 43/45 with the same two hardware skips on UHD 770; those GPU runs were not independently performed by me. The trace reports disclose event drops after the relevant compile slices.
Sources
- Reviewed shader FMA implementation at this head
- Published matched capture summaries, traces, CSVs and digests
Not verified
I did not build the project or run Vulkan/GPU tests locally. The hosted Linux job was skipped and the two macOS relinker checks were still pending; no RADV/AMD run is reported.
❌ NVIDIA GPU test: failedPR head
New validation errorsThis PR changes test files, so each test below was also run on main with only the PR's test changes applied; 0 there means the PR's other changes cause the error.
agc_driver_dpp16_operands: new validation messagesagc_driver_dpp8_pk_fmac: new validation messagesagc_driver_dx10_clamp: new validation messagesagc_driver_float16_fma_rounding: new validation messagesagc_driver_float16_unused_nan_payloads: new validation messagesUnstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validation IDs already present on main (4 IDs in 510 tests)Skipped (44)ReproduceAutomated 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. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
The exact-head NVIDIA validation report shows nine new Vulkan validation IDs on this PR, including unsupported FMAKHR capability and SPV_KHR_fma extension declarations.
What I ran
Reviewed head 8d84578a43058c8ca30606335ad7a9a702af2658 against PR base 08a10d225306ad102b57408e2ef7566bcfb829b2; the merge preview against current main was clean. Local environment: Linux x86_64, Python 3.11.2. I inspected the shader capability detection/emission and the exact-head GPU report. No local build or GPU test was run.
git diff --check 08a10d225306ad102b57408e2ef7566bcfb829b2...8d84578a43058c8ca30606335ad7a9a702af2658
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 11265Results
| Check | Result |
|---|---|
| Diff whitespace | Passed; no output |
| Conventions and PR template | Passed locally |
| Current-main merge preview | Clean |
| Exact-head NVIDIA validation report | Failed: 9 new validation IDs across agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, and agc_driver_dx10_clamp; each was reproduced when rerun alone |
| Main and main-plus-test-change controls | The report records zero of these IDs on both controls |
| Local build and GPU tests | Not run |
The report identifies VUID-VkShaderModuleCreateInfo-pCode-08739 for an unsupported SPIR-V capability and VUID-VkShaderModuleCreateInfo-pCode-08741 for unsupported SPV_KHR_fma; it also reports 08737 from SPIR-V validation. The PR tests completed, but those passing exits do not make the validation errors harmless. The no-build precheck's ABI/test-quality steps could not start because workspace-local helper scripts were absent in its isolated checkout; those results do not affect this Vulkan finding.
Negative control
| Assertion | Change to code under test | Did the new test fail? |
|---|---|---|
| NVIDIA report's validation finding | Main with only this PR's test-file changes | No; the report records zero of these IDs. |
Findings
Blocking
- The current feature/capability path produces SPIR-V that the NVIDIA RTX 2000 Ada Vulkan validation run rejects as declaring unsupported FMA capability/extension. The same three tests have zero such IDs on main and on main plus the PR's test-only changes, and the report reproduced the IDs when each test was rerun alone. Please correct the device feature/extension gating so
FMAKHRandSPV_KHR_fmaare emitted only when actually supported and enabled, retaining the existing fallback otherwise. Then rerun the same three tests with validation enabled and confirm zero new IDs against main.
Non-blocking
None.
Sources
- Capability detection and Vulkan extension enablement at the reviewed head
- FMA capability and extension emission at the reviewed head
- Exact-head NVIDIA validation report and control runs
Not verified
I did not reproduce the NVIDIA GPU run locally or build this PR. The reported failing GPU is an RTX 2000 Ada; the author's separate RTX 4090 run and Intel fallback run do not cover this reported device-specific failure.
To get this to a good state
Fix the capability/extension path or keep the fallback on devices that do not support it, then rerun the reported validation tests and compare them with main. I will rerun the same available no-build checks and reassess the exact new head.
|
@MarcZX10 @TechLevelZero thanks for the report. I think the validation layer on that runner is older than What the messages say
When Vulkan-ValidationLayers learned it (
Getting both The gating.
On a device without the extension the fallback stays. The UHD 770 shows this: Same three tests here with a current layer (head
@TechLevelZero could you check the layer version on the runner? Either of these would show it:
If it is older than 1.4.330, a newer layer, for example the LunarG SDK tarball or a build of |
jotitadev
left a comment
There was a problem hiding this comment.
Confirming tibzejoker's explanation of the NVIDIA report: the bot's layer is Vulkan-ValidationLayers 1.3.275 (Ubuntu 24.04's package), and the nine IDs come from that layer.
- The bot's own messages show it. The
pNext-pNextmessage in its "already present on main" list (428 tests) says "based on the Valid Usage documentation for version 275 of the Vulkan header". The "Vulkan 1.4.329" in the report header is the driver's API version: my 3070 on the same 595.99.02 driver reportsapiVersion = 1.4.329. - The 595.99.02 driver advertises
VK_KHR_shader_fmawithshaderFmaFloat16 = true, so the fused path is taken on NVIDIA. The 1.3.275 layer'sspirv-valrejects it withInvalid capability operand: 6030(6030 isFMAKHR).
I reproduced it with 8d84578a43 merged onto main 16345cad6a, on Ubuntu 26.04 with GCC 15.2, Release and -DANYPS5_ENABLE_SPIRV_TOOLS=ON. The run used ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, -j1, and the three tests agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac and agc_driver_dx10_clamp.
| Device / layer | Result | New VUIDs |
|---|---|---|
RTX 3070, VVL 1.3.275 (the .deb from Ubuntu 24.04) |
pass 2/2 | 08739 and 08741 on all three tests in both runs; 08737 in the first run only. Same IDs as the bot |
RTX 3070, VVL 1.4.341 (layer insertion checked with VK_LOADER_DEBUG=layer) |
pass 3/3 | none |
| RTX 3070, no layer | pass 3/3 | n/a |
| lavapipe (Mesa 26.0.3), VVL 1.4.341 | pass | none |
On main with VVL 1.3.275, the same three tests only log the pNext-pNext that is already on main. So the PR's gating holds on NVIDIA. These IDs come from the old layer and are gone with 1.4.341.
GPUs tested: NVIDIA RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Thanks @jotitadev for checking this on your 3070 with both layers. It confirms what I suspected: the bot's layer is 1.3.275, and with 1.4.341 the three tests report no @MarcZX10 the nine IDs in the report come from the bot's validation layer, not from this PR. When you have a moment, could you take another look at head AI-assisted: yes (Claude Code) |
|
@MarcZX10 on the nine validation IDs: our 4090 receipt on |
|
RADV fused-path coverage: this RX 9060 XT actually executes the Main
The reported 589824 is the fixture's combined half-result comparison count across fused and forced-FMA-fallback variants, not 589824 distinct fused FMA instructions; the fixture also covers packed add/mul and modifiers. Repeats use its deterministic inputs. This is bit-equivalence and newly exercised backend coverage, not a speed measurement. Main's correct fallback is expected to pass; the failure above is an explicit fault injection on the merge, not a claim that pristine main calculates those values incorrectly. Environment: CachyOS Linux x86-64, kernel Limits: no game, trace, compile-time/FPS measurement, full suite, native PS5/gfx1013 instruction oracle or SPIRV-Tools-ON build. The GPU reference is the fixture's existing f32 translation, not a new independent guest-ISA oracle. This does not replace the performance receipts or validate the old NVIDIA setup. No approval or merge recommendation is implied. AI-assisted independent hardware test run (gpt-6.1-sol). Reproduction and outputUse the same configured Release/BUILD_TESTING build on pinned main and its clean merge with the PR. Build these targets (four build jobs), then run serially: cmake --build build-main --parallel 4 --target \
agc_driver_packed_float16_native_tests agc_driver_dpp16_operands_tests \
agc_driver_dpp8_pk_fmac_tests agc_driver_dx10_clamp_tests \
agc_driver_packed_f16_denormal_modes_tests agc_driver_float16_fma_rounding_tests \
agc_driver_f16_fma_invalid_nan_tests agc_driver_f16_fma_denormal_modes_tests
export ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1
export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer
export VK_LAYER_PATH="$HOME/.local/share/anyps5-tester/vk-layers/usr/share/vulkan/explicit_layer.d"
ctest --test-dir build-main \
-R '^agc_driver_(packed_float16_native|dpp16_operands|dpp8_pk_fmac|dx10_clamp|packed_f16_denormal_modes|float16_fma_rounding|f16_fma_invalid_nan|f16_fma_denormal_modes)$' \
--parallel 1 --repeat until-fail:3 --timeout 30 --no-tests=error -VRecorded entries were run individually three times, with the same environment. For the same-fixture main control, on a clean checkout of the pinned main, copy only this file, rebuild its target and rerun its entry three times: git restore --source 8d84578a43058c8ca30606335ad7a9a702af2658 -- \
core/libs/prx/libSceAgcDriver/tests/execution/PackedFloat16Native.cppRestore the fixture afterwards. For the fault injection on the merge, in Complete per-entry/per-repeat verbose logs, build logs, source/fixture hashes and the single-operand fault diff are retained locally. |
|
Thanks @RNK123, this run is the one the PR lacked: a device that actually takes the @MarcZX10 with these, the fused path is covered on RADV (RX 9060 XT) and NVIDIA (RTX 4090), the fallback on the UHD 770, and there are 0 AI-assisted: yes (Claude Code) |
When the device has native f16 math and VK_KHR_shader_fma with shaderFmaFloat16, a packed f16 fma is one f16vec2 OpFmaKHR (SPV_KHR_fma). Vulkan requires OpFmaKHR to be correctly rounded and to respect RoundingModeRTE and DenormPreserve, so it gives the fused, once-rounded result the f32 round-to-odd sum computes. The NaN, FP16_OVFL and clamp rules still run on the result bits. Rebased onto current main by tibzejoker. Co-Authored-By: thibaut <thibaut-leaux-angeli@live.fr> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PHJtpJ4hw3KWJhobipK8ia
--shader-fma adds the FMAKHR capability and SPV_KHR_fma to a saved request's target, as --robust2 and --maintenance8 do for their features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PHJtpJ4hw3KWJhobipK8ia
8d84578 to
bd204f0
Compare
|
Rebased onto current
On the UHD 770,
@MarcZX10 this is the head to re-review. RNK123's RADV run above covers the fused path on AMD. AI-assisted: yes (Claude Code) |
❌ NVIDIA GPU test: failedPR head
New validation errorsThis PR changes test files, so each test below was also run on main with only the PR's test changes applied; 0 there means the PR's other changes cause the error.
agc_driver_dpp16_operands: new validation messagesagc_driver_dpp8_pk_fmac: new validation messagesagc_driver_dx10_clamp: new validation messagesagc_driver_float16_fma_rounding: new validation messagesagc_driver_float16_unused_nan_payloads: new validation messagesUnstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (4 IDs in 517 tests)Skipped (48)ReproduceAutomated 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. |
|
Note on the NVIDIA CI report above (head bd204f0): the 26 new IDs are the same layer-version issue as on 10-30, now over more tests because the rebase picked up main's newer f16 tests.
Here, with VVL 1.4.363, the focused set ( |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (9, not counted against this PR)Validation IDs already present on main (4 IDs in 517 tests)Skipped (58)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
What
@queeeef's #4072, rebased onto current
main(it was closed only for the rebase and for the SPIR-V pins, which #11184 restored). Step 2 of #11183.v_pk_fma_f16andv_pk_fmac_f16become one f16vec2OpFmaKHRwhen the device has native f16 math (Float16, RTE, preserved denormals) andVK_KHR_shader_fmawithshaderFmaFloat16. Without it, the f32 round-to-odd path stays (#2000).OpFmaKHRas correctly rounded and among the instructions that respectDenormPreserve; the module declaresRoundingModeRTE16. So every non-NaN result isa * b + crounded once to f16, ties to even, denormals kept, which is what the f32 round-to-odd sum computes. NaN,FP16_OVFLand clamp rules run on the result bits as for perf(shader): compute v_pk_add_f16 and v_pk_mul_f16 with native f16 math #3531's add/mul. A FLOAT_MODE that flushes f16 denormals keeps the f32 path, and one that does not round f16 to nearest even still throws, as for add/mul.ShaderValidation's new parameters andVulkanDevice's float controls;FMAKHRandSPV_KHR_fmaare only accepted when the device enabledshaderFmaFloat16, as the review asked;agc_shader_replay --shader-fmaadds that capability to a saved request, like--robust2, so the numbers below can be reproduced fromAPS5_DUMP_SHADERScaptures.Tested
Windows 11 Pro, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=ON(spirv-val checks every module, the configuration in which #4072 failed on RADV), onmain1e658521a0.RTX 4090 (NVIDIA 616.92,
shaderFmaFloat16= true): the 45 f16/fma tests (-R "fma|float16|f16|packed_alu|dx10_clamp|dpp8_pk_fmac|dpp16_operands") pass underVK_LAYER_KHRONOS_validationwithANYPS5_NO_SHADER_CACHE=1.agc_driver_packed_float16_nativecompiles each FLOAT_MODE withOpFmaKHR, withoutFMAKHRand without Float16, and requires the same bits from all three:packed f16 native tests passed (589824 halves, fused f16 fma).Intel UHD 770 (
ANYPS5_GPU=Intel, noVK_KHR_shader_fma): the 6 tests that failed in the RADV review pass; the native test reportsno FMAKHR(fallback path).Focused tests,
main1e658521a0vs this PRbd204f0f60(its rebase onto thatmain;git range-diffshows both commits unchanged):ctest -R "fma|float16|f16|packed_alu|dx10_clamp|dpp8_pk_fmac|dpp16_operands"(47 tests),VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(43 layer insertions per run,VK_LOADER_DEBUG=layer),ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1, spirv-val on. Both trees use SPIRV-Tools v2025.5 (pins restored by build(deps): restore the SPIRV-Tools, SPIRV-Headers and libvorbis pins #13053).mainVUID-lines (main / PR)OpFmaKHR(589824 halves compared)VK_KHR_shader_fmaThe two Intel skips are the same on both sides (
agc_driver_f64_fma_subnormalsandagc_driver_float16_dot: that device has no Float64 or dot2).Full suite (earlier head,
ctest --timeout 120 --parallel 12 -E '^agc_driver_bda_device$'): 2389 of 2391 passed. The two failures,agc_host_import_cut_lifetimeandagc_driver_depth_plane_partial_store, also fail onmain.Size, Grand Theft Auto V compute shaders (79 requests saved in the open world,
agc_shader_replay --spv [--shader-fma]): 1,768,794 -> 1,633,289 SPIR-V words (-7.7 %). Only the two shaders with packed f16 fma change:0x25b390800-24.7 % and0x25b393000(RCAS) -12.6 %.In game (performance form), RTX 4090, NVIDIA 616.92, on
main91a69952c1.What blocks this on plain
main: GTA V stops before the menu (GTA V (PPSA04264) stops before the menu: color export format 4 into an unsigned integer target is unsupported #11513), and then, ~60 s into Story, on GTA V (PPSA04264) stops when the save loads: compute shader reads or writes a converted float image with 16-bit data #11425. Both arms therefore carry fix(shader): load and store 16-bit data of converted packed images #11580 (the open fix for GTA V (PPSA04264) stops when the save loads: compute shader reads or writes a converted float image with 16-bit data #11425) and a local revert of fix(libSceAgcDriver): export raw 32-bit values into UINT color targets as integers #9789, and nothing else. The measured commits are681ef43926(main arm) and02172d7ed3(main arm + this PR), on the fork branchestest/fma5-baseandtest/fma5-pr.Traces, summaries, digests (
trace_digest.pyfrom currentmain) and replay CSVs: fork release perf-11265-20261030.Pipeline creation, salted replays. Each build had one cold run with captures on (
APS5_DUMP_COMPUTE_PIPELINES,APS5_DUMP_COMPUTE_MIN_WORDS=50000, emptyANYPS5_SHADER_CACHE_DIR). The captures were then compiled 5 times each withagc_compute_pipeline_replay. Every compile carries a distinctOpSourceExtensionsalt (per build, capture and run), so the driver's own cache misses:mainwordsmainmedian ms0x25b3908000x25b393000(RCAS)Cold open-world load, the same save in every run,
APS5_TRACE_SECONDS=40:80,APS5_MIMALLOC=1, an emptyANYPS5_SHADER_CACHE_DIRper run. The order wasmain, then the PR, thenmainagain, so both arms see the same NVIDIA driver cache:Vulkan.ComputePipeline(0x25b390800, queue worker 0x0)mainmainagainThe 14-16 s max frame in every run is the load's
Driver.Packet.memory_wait, not a compile. All three traces dropped queue worker 0x0 events late in the window (after 78.3 / 75.6 / 78.6 s), after the compile slices (+53.5 to +54.3 s).{"commit":"681ef4392670","dirty":false,"env":{"APS5_MIMALLOC":"1","APS5_TRACE_DIR":"","APS5_TRACE_SECONDS":"40:80"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"13th Gen Intel(R) Core(TM) i9-13900K","cpu_threads":32,"memory_mib":65295,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.005.000","resolution":"3840x2160","window":{"spec":"seconds 40:80","first_present":454,"ms":80011.685},"presents":1919,"frame_ms":{"p50":16.811,"p90":33.618,"p99":253.639,"max":16365.273},"gpu_busy_ms_per_present":2.823,"worker_busy_pct":{"queue worker 0x0":73.392,"queue worker 0x28":2.641,"queue worker 0x20":25.167,"queue worker 0x30":12.741,"queue worker 0x38":2.257},"top_phases_ms_per_frame":{"Driver.Packet":47.958,"Driver.Packet.memory_wait":17.945,"VideoOut.Flip":17.614,"VideoOut.Flip.vblank_wait":15.645,"Graphics.Draw":13.186,"Graphics.Draw.draw_and_resource_release":12.355,"Driver.Packet.draw":11.246,"Driver.Draw":11.218},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":78.273,"events_lost":36292,"totals_full":false}},"trace":"aps5-trace-681ef4392670-21344.json.gz"}
{"commit":"02172d7ed375","dirty":false,"env":{"APS5_MIMALLOC":"1","APS5_TRACE_DIR":"","APS5_TRACE_SECONDS":"40:80"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"13th Gen Intel(R) Core(TM) i9-13900K","cpu_threads":32,"memory_mib":65295,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.005.000","resolution":"3840x2160","window":{"spec":"seconds 40:80","first_present":454,"ms":80031.893},"presents":1981,"frame_ms":{"p50":16.834,"p90":34.470,"p99":236.325,"max":14174.024},"gpu_busy_ms_per_present":3.415,"worker_busy_pct":{"queue worker 0x0":73.370,"queue worker 0x20":13.755,"queue worker 0x28":22.742,"queue worker 0x30":5.947,"queue worker 0x38":1.032},"top_phases_ms_per_frame":{"Driver.Packet":46.622,"Driver.Packet.memory_wait":17.574,"VideoOut.Flip":17.149,"VideoOut.Flip.vblank_wait":15.449,"Graphics.Draw":13.481,"Graphics.Draw.draw_and_resource_release":12.445,"Driver.Packet.draw":12.111,"Driver.Draw":12.074},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":75.588,"events_lost":96457,"totals_full":false}},"trace":"aps5-trace-02172d7ed375-34488.json.gz"}