Skip to content

fix(kyty): align combined scalar buffer offsets - #324

Open
mjnhbg3 wants to merge 1 commit into
simnJS:AnyKytyfrom
mjnhbg3:fix/kyty-sbuffer-offset-alignment
Open

mjnhbg3 wants to merge 1 commit into
simnJS:AnyKytyfrom
mjnhbg3:fix/kyty-sbuffer-offset-alignment

Conversation

@mjnhbg3

@mjnhbg3 mjnhbg3 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What

Align the sum of SOFFSET and the instruction immediate before S_BUFFER dword loads. Apply the same address rule to the SPIR-V emitter, SRT walker, descriptor tracking, and runtime materialization. Ambiguous descriptor shapes use the existing generic path.

This addresses the scalar buffer portion of #216. The issue describes separate truncation, while AMD RDNA2 ISA §7.2.1 specifies offset = OFFSET + SOFFSET and aligns the final buffered address. The debt fragment records that the carry case has not been measured on PS5 hardware. The other #216 points remain open. The branch is based on the current AnyKyty head 688dbf145d.

Tested

  • Windows 11 Pro build 26200, NVIDIA GeForce RTX 5070 Ti, driver 616.64: with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and VK_LOADER_DEBUG=layer, the final GPU replay fixture fails on exact base 688dbf145d in both carry cases while its no-carry control passes. The change passes all seven replay cases, including the crossed bound.
  • The final CPU descriptor fixture fails two sampler mapping checks on the exact base and passes on the change. kyty_shim_flattened_srt_uniform passes on both.
  • On the same NVIDIA GPU, kyty_shim_cross_queue_label_order and kyty_shim_recompiler_valid_spirv pass 2/2 on both the exact base implementation and the change. Both verbose CTest logs show Insert instance layer "VK_LAYER_KHRONOS_validation" from validation SDK 1.4.350, no missing-layer warning, and zero VUID- errors. The baseline used the same final fixtures with the four changed implementation files restored from 688dbf145d; the candidate was restored and rebuilt afterward.
  • The exact-base Linux Kyty CI job and Windows Kyty CI job passed. I inspected their build warning logs before opening this PR. Genuine warning fixtures passed: 7 Kyty PGO, 9 relinker, and 19 settings cases.
  • tools/check_conventions.py --base origin/AnyKyty, tools/check_kyty_settings.py, tools/debt_fold.py --check, git diff --check, and tools/pr_overlap.py --branch fix/kyty-sbuffer-offset-alignment passed. The requested origin/main convention check cannot run because this fork does not publish a main branch. No PS5 hardware or title run was available.
  • PR CI on head 13393c1 passed: Linux Kyty (115 tests), Windows Kyty (104 tests), Linux ASan, Linux TSan, lavapipe (95 tests), relinker fuzzers, conventions, and portability. Compared with the exact-base jobs, Linux and Windows have the same non-PGO warning classes and counts (44 and 127); no warning is from a changed file. PGO hash-mismatch advisories vary slightly after the changed functions. The Kyty and lavapipe logs contain no VUID- errors.

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: NVIDIA GeForce RTX 5070 Ti, driver 616.64, Windows 11 Pro build 26200
  • AI-assisted: yes

@mjnhbg3
mjnhbg3 force-pushed the fix/kyty-sbuffer-offset-alignment branch from 6fce179 to 13393c1 Compare November 26, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant