feat(libSceImeDialog): type with the controller on an on-screen keyboard #11207

Merged
EagleBearerYS merged 7 commits from upstream-pr/11207 into main 2026-10-27 11:00:59 +00:00
EagleBearerYS commented 2026-10-25 21:50:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-25T21:50:42Z.


What

sceImeDialog now shows a keyboard the controller types on. Until now the dialog drew nothing, and only the host keyboard could type, so a player with only a controller couldn't get past a name or text prompt. The keyboard follows shadPS4's pad keyboard (30f4170896) for its pages, labels and bindings. Each part is its own commit:

  • Model (libSceImeDialog/src/PadKeyboard.cpp):
    • Pages: Latin lower and upper, Symbols on two pages, and Specials lower and upper.
    • Navigation: the D-pad and left stick move with wrap.
    • Buttons:
      • Cross presses the selected key, and R2 accepts.
      • Circle cancels.
      • Square is backspace, and L1+Square clears.
      • Triangle is space.
      • L1/R1 move the caret.
      • L2 cycles lower → upper (one-shot) → caps lock, L2+Triangle toggles symbols, and L3 toggles accented letters.
    • Repeats: held buttons repeat on Dear ImGui's defaults, 0.275 s and then every 0.050 s, as shadPS4 uses them.
    • Held buttons: a button already held when the dialog opens does nothing until it's pressed again.
    • From the dialog's parameters: the currency key follows supported_languages, the enter key's label follows enter_label, and the starting page follows the extended priority. disable_device controller turns shortcuts and navigation off.
  • Routing (libSceIme): a sink for the captured pad and a provider for the keyboard's view. Both are cleared when the dialog ends.
  • Dialog (libSceImeDialog/Export.cpp): pad edits go through the same path as host typing. R2 or Done accepts and Circle cancels. As before, the host keyboard can type and Enter accepts, and the text is written to the title's buffer once, on accept.
  • Hand-off (libSceVideoOut, libScePad):
    • While the keyboard is open, the first controller's input goes to it.
    • Every pad read returns a neutral sample with only the 0x80000000 (Intercepted) bit set, as shadPS4's pad library does while its IME holds the pad.
    • Buttons still held when the dialog closes stay hidden from the title until each is released.
  • Drawing (libSceAgcDriver):
    • The performance overlay's rectangle recorder is split out as RecordRects, and its palette grows from 3 to 7 colours.
    • Its pipelines are now keyed by render pass. A pass that ends in TRANSFER_SRC has a different subpass dependency, so it needs its own pipeline.
    • KeyboardOverlay.cpp lays the keyboard out in the bottom half of the frame, at about 3 screen pixels per glyph pixel at 1080p. It uses a hand-made 5×9 font that covers printable ASCII, every character on the pages and the key symbols. Anything else, such as CJK, falls back to a box.
    • VulkanDevice::present draws the keyboard over each flipped frame, before the performance overlay. VideoOutDriver::presentLoop hands it the dialog's state before each flip.
  • Debt (docs/dev/debt/libSceImeDialog.md) records the open questions:
    • the Intercepted sample on a PS5;
    • live buffer writes and the text filter;
    • the result and term codes while the dialog runs;
    • redraw only on flips;
    • the repeat timings;
    • the extras left out (mouse mode, the right-stick drag, prediction, copy/paste).

Merge order with #10507: this PR goes first, as orezraey proposed (comment). The two conflict in VulkanDevice.cpp, in 5 hunks, 2 of them #10487's own. orezraey merges main into #10507 after this, keeping the keyboard path next to the overlay compositing. If #10043 merges after this, the keyboard's starting layout also needs || upscaled.

Octopath Traveler 0 (PPSA28495) at its favourite-food prompt, on Windows: the keyboard as it opens, the text typed, and the title's box after R2.

Open Typed After R2
The keyboard open over the prompt The keyboard's field reading "pie" The title's box reading "pie" after R2

Tested

  • GitHub's runners: run 40228102836, against main + #10487, 10 times, with no failures.
    • The tests: ime_dialog_pad_keyboard, guest_ime_pad_route, agc_keyboard_overlay, guest_ime_dialog, pad_sdl, guest_pad and the four agc_performance_overlay tests.
    • Linux: 10 tests, 0 skipped. Windows: 10 tests, 2 skipped, the device tests, since the runner has no Vulkan device.
  • Octopath Traveler 0 (PPSA28495), on Windows 11 with an RTX 3070 Laptop GPU (NVIDIA 617.42). Two unprofiled boots of this branch:
    • The keyboard: at the favourite-food name prompt, it opened over the frame (the screenshots above). Flips didn't stall while it was open.
    • Host keyboard: typing "pie" filled the field. Both R2 (the right mouse button by default) and Enter accepted it. The title's box took "pie", and the title moved on to its "Is this your favourite dish?" question. 0 FATAL lines in either boot.
    • Pad model: no physical controller was available; pad input came from mouse bindings. The second boot bound Cross, Left and Right to mouse buttons in anyps5-input.ini.
      • The mouse wheel (Up/Down) and those buttons moved the cursor, Cross typed, and Enter accepted.
      • The text came out "pIE". Left was bound to mouse X1, which keeps its default L2 binding, because an anyps5-input.ini line replaces only its own action's bindings. So each Left press also cycled the case.
      • The two Left presses before "i" locked upper case. The five before "e" left a one-shot upper case. That's what ime_dialog_pad_keyboard's case tests expect.
    • What doesn't reach the keyboard while it's open:
      • APS5_PAD_INPUT_FILE samples, since the pad reads give the Intercepted sample then;
      • keys bound to pad buttons, since the dialog takes the host keyboard as text.
        Mouse wheel and mouse button bindings do reach it.
  • Linux (Ubuntu 24.04, gcc 13.3, lavapipe, CI's configure flags), tests as an unprivileged user:
    • New tests:
      • ime_dialog_pad_keyboard covers the model;
      • guest_ime_pad_route covers the routing;
      • agc_keyboard_overlay covers the layout of every page at 1280×720 and 1920×1080, glyph coverage, the CJK and emoji fallback, the caret, and palette contrast in sRGB and PQ.
    • Extended tests:
      • guest_ime_dialog: typing, R2, Circle, Abort, Term, ForceClose, a button held at open, the length cap, disable_device and priority;
      • pad_sdl: the Intercepted sample, the sink, and buttons held after close;
      • agc_performance_overlay: the keyboard in SDR and HDR10, under the performance overlay, and after the presentation pass.
    • Each commit builds, passes check_test_registration.py and passes its own tests. Each code commit's test fails with that commit's code reverted.
    • Full ctest: 2,284 tests, with the same 7 failures (IPv6 socket tests, which the test machine can't run) and the same 92 skips as main + #10487. The new and changed tests passed 10 times in a row.
    • Vulkan validation, main + #10487 (2a5b1f2688) against 042dc0ade7 on the same machine: Khronos layer 1.3.275 with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, sync validation on (VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true) and ANYPS5_REQUIRE_VULKAN=1, each test alone under ctest -V. ANYPS5_NO_SHADER_CACHE wasn't set; the run on GitHub's runner below sets it. VK_LOADER_DEBUG=layer put the loader's "Insert instance layer" line in every log of a test that creates an instance.
      • agc_performance_overlay, agc_driver_presentation_pass and agc_resident_present: 0 VUIDs on both sides.
      • video_out_hdr_present, under Xvfb: VUID-VkDeviceCreateInfo-pNext-pNext ×3 on both sides. It comes from the layer's age: the device's create chain has a structure newer than 1.3.275.
      • All 23 video_out_flip_tests modes, run directly under Xvfb with the same layer settings: 23 of 23 pass on both sides, and the only VUID is the same pNext one, on both.
    • End to end under Xvfb: a scratch program opened the dialog and flipped through VideoOut. The keyboard appeared over both buffer and black flips, with the performance overlay above it, and went away after sceImeDialogTerm.
  • 533ecba824, after MarcZX10's review (run): a press published before the keyboard captured the pad stayed in the read latch and in the sample queue. The first ReadState after the hand-off returned it beside the Intercepted bit, and Read returned the queued samples from before the capture unmasked. The sample that starts the capture now clears both.
    • guest_pad's new case publishes Cross and then an intercepted sample before any read, and requires ReadState to return exactly 0x80000000. A second pass requires every sample Read returns to be 0x80000000 too.
    • pad_sdl now leaves an A press and release unread before the hand-off, and checks every queued sample instead of only the last.
    • With 042dc0ade7's code, guest_pad and pad_sdl fail on both runners. With the fix, the pad, IME, keyboard and performance overlay tests pass 10 runs in a row. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 10 run, 8 pass, 2 skip, 0 fail; agc_performance_overlay and agc_performance_overlay_device_selection skip, since that runner has no Vulkan device.
    • Suites: libc and libkernel pass on Linux (144 and 208) and on Windows (171 and 224). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Vulkan validation as CONTRIBUTING prescribes, on GitHub's Linux runner (run 40240129928): main + #10487 (2a5b1f2688) against 533ecba824, both built and run on the same runner, on lavapipe (llvmpipe, Mesa 25.2.8, LLVM 20.1.2) with vulkan-validationlayers 1.3.275. Both arms set VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, and run the tests under ctest -V with VK_LOADER_DEBUG=layer.
    • The loader inserted the layer in every run of agc_resident_present, agc_driver_presentation_pass, agc_performance_overlay and agc_performance_overlay_device_selection: 4 times in main's one run, 12 in this branch's three. Neither log has the "was not found but was requested by env var VK_INSTANCE_LAYERS" warning.
    • No VUID-, SYNC-HAZARD or UNASSIGNED- message on either side.
    • main's tree ran the 10 of these tests it has; agc_keyboard_overlay, guest_ime_pad_route and ime_dialog_pad_keyboard are new here. The other tests create no Vulkan instance, and video_out_hdr_present skips on the runner, which has no display.
    • Linux: 13 run, 12 pass, 1 skip, 0 fail, in each of 3 runs. Windows, without the layer: 13 run, 8 pass, 5 skip, 0 fail; the device tests skip, since that runner has no Vulkan device.
  • Not tested: a PS5, a physical controller (the pad tests use SDL's virtual controller), or an HDR display.
  • 05f5f1d752, a merge of #10487's 815dfe12e4 (run), which merges main 14c99b52ac; nothing conflicted. The keyboard, IME, pad and overlay tests pass 10 runs in a row. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 10 run, 8 pass, 2 skip, 0 fail; the two skipped (agc_performance_overlay and agc_performance_overlay_device_selection) need a Vulkan device, which the Windows runner lacks. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (172 and 230). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 100453195d, a merge of main 190386eb70 (run). zaidhawk's #9919 adds kLatchExpiryLimit to PadState.cpp next to this PR's kInterceptedButton; the merge keeps both, and nothing else conflicted. This PR's changed lines are the same. The pad, IME dialog and overlay tests, 10 of them, pass 10 runs in a row. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 10 run, 8 pass, 2 skip, 0 fail; agc_performance_overlay and agc_performance_overlay_device_selection skip there. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (173 and 231). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Demon's Souls (PPSA01341) v1.07, on Linux with an RTX 4080, by @edubox at 100453195d (comment): the pad keyboard appears at the character-name prompt, the D-pad moves the selection, Cross types the selected character, and moving to the Accept key and pressing Cross completes the dialog. The game then creates SAVEDATA0PlayerProfile0 and continues to the tutorial. The R2 shortcut was not tried there. The IME pad-keyboard, pad-route, dialog and overlay tests pass on that machine.

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: #10487. #10507 goes after this, for merge order only (orezraey then merges main into it)
  • Fixes: none
  • Unblocks: Octopath Traveler 0 (PPSA28495) #11114: its favourite-food name prompt, for a player with only a controller. On main the dialog draws nothing and only takes host keyboard text. With this change the run moved past the prompt.
  • GPUs tested: llvmpipe (lavapipe, Mesa 25.2.8, LLVM 20.1.2) on Ubuntu 24.04; NVIDIA GeForce RTX 3070 Laptop GPU (617.42) on Windows 11
  • AI-assisted: yes

Related: #6404, for Plants vs. Zombies: Replanted (PPSA29802). A player reported being stuck at its name prompt without a keyboard; not tested here.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5009062450 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11207). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-25T21:50:42Z. --- ### What `sceImeDialog` now shows a keyboard the controller types on. Until now the dialog drew nothing, and only the host keyboard could type, so a player with only a controller couldn't get past a name or text prompt. The keyboard follows shadPS4's pad keyboard ([30f4170896](https://github.com/shadps4-emu/shadPS4/tree/30f4170896/src/core/libraries/ime)) for its pages, labels and bindings. Each part is its own commit: - **Model** (`libSceImeDialog/src/PadKeyboard.cpp`): - **Pages:** Latin lower and upper, Symbols on two pages, and Specials lower and upper. - **Navigation:** the D-pad and left stick move with wrap. - **Buttons:** - Cross presses the selected key, and R2 accepts. - Circle cancels. - Square is backspace, and L1+Square clears. - Triangle is space. - L1/R1 move the caret. - L2 cycles lower → upper (one-shot) → caps lock, L2+Triangle toggles symbols, and L3 toggles accented letters. - **Repeats:** held buttons repeat on Dear ImGui's defaults, 0.275 s and then every 0.050 s, as shadPS4 uses them. - **Held buttons:** a button already held when the dialog opens does nothing until it's pressed again. - **From the dialog's parameters:** the currency key follows `supported_languages`, the enter key's label follows `enter_label`, and the starting page follows the extended `priority`. `disable_device` controller turns shortcuts and navigation off. - **Routing** (`libSceIme`): a sink for the captured pad and a provider for the keyboard's view. Both are cleared when the dialog ends. - **Dialog** (`libSceImeDialog/Export.cpp`): pad edits go through the same path as host typing. R2 or Done accepts and Circle cancels. As before, the host keyboard can type and Enter accepts, and the text is written to the title's buffer once, on accept. - **Hand-off** (`libSceVideoOut`, `libScePad`): - While the keyboard is open, the first controller's input goes to it. - Every pad read returns a neutral sample with only the `0x80000000` (Intercepted) bit set, as shadPS4's pad library does while its IME holds the pad. - Buttons still held when the dialog closes stay hidden from the title until each is released. - **Drawing** (`libSceAgcDriver`): - The performance overlay's rectangle recorder is split out as `RecordRects`, and its palette grows from 3 to 7 colours. - Its pipelines are now keyed by render pass. A pass that ends in TRANSFER_SRC has a different subpass dependency, so it needs its own pipeline. - `KeyboardOverlay.cpp` lays the keyboard out in the bottom half of the frame, at about 3 screen pixels per glyph pixel at 1080p. It uses a hand-made 5×9 font that covers printable ASCII, every character on the pages and the key symbols. Anything else, such as CJK, falls back to a box. - `VulkanDevice::present` draws the keyboard over each flipped frame, before the performance overlay. `VideoOutDriver::presentLoop` hands it the dialog's state before each flip. - **Debt** (`docs/dev/debt/libSceImeDialog.md`) records the open questions: - the Intercepted sample on a PS5; - live buffer writes and the text filter; - the result and term codes while the dialog runs; - redraw only on flips; - the repeat timings; - the extras left out (mouse mode, the right-stick drag, prediction, copy/paste). **Merge order with #10507:** this PR goes first, as orezraey proposed ([comment](https://github.com/boykopovar/AnyPS5/pull/10507#issuecomment-6418363253)). The two conflict in `VulkanDevice.cpp`, in 5 hunks, 2 of them #10487's own. orezraey merges `main` into #10507 after this, keeping the keyboard path next to the overlay compositing. If #10043 merges after this, the keyboard's starting layout also needs `|| upscaled`. Octopath Traveler 0 (PPSA28495) at its favourite-food prompt, on Windows: the keyboard as it opens, the text typed, and the title's box after R2. | Open | Typed | After R2 | |---|---|---| | ![The keyboard open over the prompt](https://raw.githubusercontent.com/EagleBearerYS/AnyPS5/f4ee327ac372beb6575938ea61fe715b9ef11909/imedialog-keyboard/octo-keyboard-0584.png) | ![The keyboard's field reading "pie"](https://raw.githubusercontent.com/EagleBearerYS/AnyPS5/f4ee327ac372beb6575938ea61fe715b9ef11909/imedialog-keyboard/octo-host-typed-pie.png) | ![The title's box reading "pie" after R2](https://raw.githubusercontent.com/EagleBearerYS/AnyPS5/f4ee327ac372beb6575938ea61fe715b9ef11909/imedialog-keyboard/octo-accepted-pie.png) | ### Tested - **GitHub's runners:** [run 40228102836](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40228102836), against `main` + #10487, 10 times, with no failures. - The tests: `ime_dialog_pad_keyboard`, `guest_ime_pad_route`, `agc_keyboard_overlay`, `guest_ime_dialog`, `pad_sdl`, `guest_pad` and the four `agc_performance_overlay` tests. - Linux: 10 tests, 0 skipped. Windows: 10 tests, 2 skipped, the device tests, since the runner has no Vulkan device. - **Octopath Traveler 0 (PPSA28495)**, on Windows 11 with an RTX 3070 Laptop GPU (NVIDIA 617.42). Two unprofiled boots of this branch: - **The keyboard:** at the favourite-food name prompt, it opened over the frame (the screenshots above). Flips didn't stall while it was open. - **Host keyboard:** typing "pie" filled the field. Both R2 (the right mouse button by default) and Enter accepted it. The title's box took "pie", and the title moved on to its "Is this your favourite dish?" question. 0 FATAL lines in either boot. - **Pad model:** no physical controller was available; pad input came from mouse bindings. The second boot bound Cross, Left and Right to mouse buttons in `anyps5-input.ini`. - The mouse wheel (Up/Down) and those buttons moved the cursor, Cross typed, and Enter accepted. - The text came out "pIE". Left was bound to mouse X1, which keeps its default L2 binding, because an `anyps5-input.ini` line replaces only its own action's bindings. So each Left press also cycled the case. - The two Left presses before "i" locked upper case. The five before "e" left a one-shot upper case. That's what `ime_dialog_pad_keyboard`'s case tests expect. - **What doesn't reach the keyboard while it's open:** - `APS5_PAD_INPUT_FILE` samples, since the pad reads give the Intercepted sample then; - keys bound to pad buttons, since the dialog takes the host keyboard as text. Mouse wheel and mouse button bindings do reach it. - **Linux** (Ubuntu 24.04, gcc 13.3, lavapipe, CI's configure flags), tests as an unprivileged user: - **New tests:** - `ime_dialog_pad_keyboard` covers the model; - `guest_ime_pad_route` covers the routing; - `agc_keyboard_overlay` covers the layout of every page at 1280×720 and 1920×1080, glyph coverage, the CJK and emoji fallback, the caret, and palette contrast in sRGB and PQ. - **Extended tests:** - `guest_ime_dialog`: typing, R2, Circle, Abort, Term, ForceClose, a button held at open, the length cap, `disable_device` and priority; - `pad_sdl`: the Intercepted sample, the sink, and buttons held after close; - `agc_performance_overlay`: the keyboard in SDR and HDR10, under the performance overlay, and after the presentation pass. - **Each commit** builds, passes `check_test_registration.py` and passes its own tests. Each code commit's test fails with that commit's code reverted. - **Full ctest:** 2,284 tests, with the same 7 failures (IPv6 socket tests, which the test machine can't run) and the same 92 skips as `main` + #10487. The new and changed tests passed 10 times in a row. - **Vulkan validation**, `main` + #10487 (2a5b1f2688) against 042dc0ade7 on the same machine: Khronos layer 1.3.275 with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, sync validation on (`VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true`) and `ANYPS5_REQUIRE_VULKAN=1`, each test alone under `ctest -V`. `ANYPS5_NO_SHADER_CACHE` wasn't set; the run on GitHub's runner below sets it. `VK_LOADER_DEBUG=layer` put the loader's "Insert instance layer" line in every log of a test that creates an instance. - `agc_performance_overlay`, `agc_driver_presentation_pass` and `agc_resident_present`: 0 VUIDs on both sides. - `video_out_hdr_present`, under Xvfb: `VUID-VkDeviceCreateInfo-pNext-pNext` ×3 on both sides. It comes from the layer's age: the device's create chain has a structure newer than 1.3.275. - All 23 `video_out_flip_tests` modes, run directly under Xvfb with the same layer settings: 23 of 23 pass on both sides, and the only VUID is the same pNext one, on both. - **End to end under Xvfb:** a scratch program opened the dialog and flipped through VideoOut. The keyboard appeared over both buffer and black flips, with the performance overlay above it, and went away after `sceImeDialogTerm`. - **533ecba824, after MarcZX10's review** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40239170282)): a press published before the keyboard captured the pad stayed in the read latch and in the sample queue. The first `ReadState` after the hand-off returned it beside the Intercepted bit, and `Read` returned the queued samples from before the capture unmasked. The sample that starts the capture now clears both. - `guest_pad`'s new case publishes Cross and then an intercepted sample before any read, and requires `ReadState` to return exactly `0x80000000`. A second pass requires every sample `Read` returns to be `0x80000000` too. - `pad_sdl` now leaves an A press and release unread before the hand-off, and checks every queued sample instead of only the last. - With 042dc0ade7's code, `guest_pad` and `pad_sdl` fail on both runners. With the fix, the pad, IME, keyboard and performance overlay tests pass 10 runs in a row. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 10 run, 8 pass, 2 skip, 0 fail; `agc_performance_overlay` and `agc_performance_overlay_device_selection` skip, since that runner has no Vulkan device. - Suites: libc and libkernel pass on Linux (144 and 208) and on Windows (171 and 224). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Vulkan validation as CONTRIBUTING prescribes, on GitHub's Linux runner** ([run 40240129928](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40240129928)): `main` + #10487 (2a5b1f2688) against 533ecba824, both built and run on the same runner, on lavapipe (llvmpipe, Mesa 25.2.8, LLVM 20.1.2) with vulkan-validationlayers 1.3.275. Both arms set `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`, and run the tests under `ctest -V` with `VK_LOADER_DEBUG=layer`. - The loader inserted the layer in every run of `agc_resident_present`, `agc_driver_presentation_pass`, `agc_performance_overlay` and `agc_performance_overlay_device_selection`: 4 times in `main`'s one run, 12 in this branch's three. Neither log has the "was not found but was requested by env var VK_INSTANCE_LAYERS" warning. - No `VUID-`, `SYNC-HAZARD` or `UNASSIGNED-` message on either side. - `main`'s tree ran the 10 of these tests it has; `agc_keyboard_overlay`, `guest_ime_pad_route` and `ime_dialog_pad_keyboard` are new here. The other tests create no Vulkan instance, and `video_out_hdr_present` skips on the runner, which has no display. - Linux: 13 run, 12 pass, 1 skip, 0 fail, in each of 3 runs. Windows, without the layer: 13 run, 8 pass, 5 skip, 0 fail; the device tests skip, since that runner has no Vulkan device. - Not tested: a PS5, a physical controller (the pad tests use SDL's virtual controller), or an HDR display. - **05f5f1d752, a merge of #10487's 815dfe12e4** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40274879460)), which merges `main` 14c99b52ac; nothing conflicted. The keyboard, IME, pad and overlay tests pass 10 runs in a row. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 10 run, 8 pass, 2 skip, 0 fail; the two skipped (`agc_performance_overlay` and `agc_performance_overlay_device_selection`) need a Vulkan device, which the Windows runner lacks. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (172 and 230). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **100453195d, a merge of `main` 190386eb70** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40319365979)). zaidhawk's #9919 adds `kLatchExpiryLimit` to `PadState.cpp` next to this PR's `kInterceptedButton`; the merge keeps both, and nothing else conflicted. This PR's changed lines are the same. The pad, IME dialog and overlay tests, 10 of them, pass 10 runs in a row. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 10 run, 8 pass, 2 skip, 0 fail; `agc_performance_overlay` and `agc_performance_overlay_device_selection` skip there. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (173 and 231). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Demon's Souls (PPSA01341)** v1.07, on Linux with an RTX 4080, by @edubox at 100453195d ([comment](https://github.com/boykopovar/AnyPS5/pull/11207#issuecomment-6423195179)): the pad keyboard appears at the character-name prompt, the D-pad moves the selection, Cross types the selected character, and moving to the Accept key and pressing Cross completes the dialog. The game then creates `SAVEDATA0PlayerProfile0` and continues to the tutorial. The R2 shortcut was not tried there. The IME pad-keyboard, pad-route, dialog and overlay tests pass on that machine. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10487. #10507 goes after this, for merge order only (orezraey then merges `main` into it) - [x] Fixes: none - [x] Unblocks: Octopath Traveler 0 (PPSA28495) #11114: its favourite-food name prompt, for a player with only a controller. On `main` the dialog draws nothing and only takes host keyboard text. With this change the run moved past the prompt. - [x] GPUs tested: llvmpipe (lavapipe, Mesa 25.2.8, LLVM 20.1.2) on Ubuntu 24.04; NVIDIA GeForce RTX 3070 Laptop GPU (617.42) on Windows 11 - [x] AI-assisted: yes Related: #6404, for Plants vs. Zombies: Replanted (PPSA29802). A player reported being stuck at its name prompt without a keyboard; not tested here.
MarcZX10 commented 2026-10-25 22:02:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T22:02:18Z.

Review: DISMISSED


The controller handoff still leaks pre-dialog input to the title. I compiled the exact PR PadState.cpp and header with only a stub for sceKernelGetProcessTime, then reproduced both public read paths:

  • Publish a normal Cross sample, then an intercepted neutral sample before the title reads. Pad::ReadState(0) returns 0x80004000 (Intercepted plus Cross), because it ORs pressedSinceRead into the already-intercepted result.
  • With those same two queued samples, Pad::Read(..., 64, 0) returns count=2, with 0x00004000 as the first sample and 0x80000000 as the last. It drains the pre-capture queue without masking its entries.

This contradicts the PR's stated behavior that every pad read while the keyboard is open contains only the Intercepted bit. PadSdl.cpp currently checks only queued[count - 1], so it misses the earlier queued button. Please suppress/clear pending press latches and pre-capture queued samples at handoff, and add regressions that assert every result from both ReadState and Read is neutral while captured.

Please also finish the required report details:

  • CONTRIBUTING.md requires the Unblocks entry to link the Game bring-up discussion. The matching discussion is #11114; add it to the checklist.
  • The description says #10507 must be merged before this PR to resolve the VulkanDevice.cpp conflict, but the checklist lists only #10487 under Depends on. Please list #10507 there too, or update the stated merge order.
  • For the AGC/VideoOut validation requirement, the report says no new VUID- messages but does not state whether the comparison used VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1, or confirm neither log contains the missing-layer warning. Please add those exact run details and the main/change comparison, or run the prescribed check if it was not done.

I fetched exact head 042dc0ade7dcaac81d57d3b79d7cc3c941305494. python3 tools/check_conventions.py --base upstream/main --head upstream/pr/11207 and git diff --check upstream/main...upstream/pr/11207 pass. The PR author's validation/test results are reported in the description; I have not independently run the full Vulkan suite.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5645555913 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11207#pullrequestreview-5645555913). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T22:02:18Z. **Review:** DISMISSED --- The controller handoff still leaks pre-dialog input to the title. I compiled the exact PR `PadState.cpp` and header with only a stub for `sceKernelGetProcessTime`, then reproduced both public read paths: - Publish a normal Cross sample, then an intercepted neutral sample before the title reads. `Pad::ReadState(0)` returns `0x80004000` (Intercepted plus Cross), because it ORs `pressedSinceRead` into the already-intercepted result. - With those same two queued samples, `Pad::Read(..., 64, 0)` returns `count=2`, with `0x00004000` as the first sample and `0x80000000` as the last. It drains the pre-capture queue without masking its entries. This contradicts the PR's stated behavior that every pad read while the keyboard is open contains only the Intercepted bit. `PadSdl.cpp` currently checks only `queued[count - 1]`, so it misses the earlier queued button. Please suppress/clear pending press latches and pre-capture queued samples at handoff, and add regressions that assert every result from both `ReadState` and `Read` is neutral while captured. Please also finish the required report details: - `CONTRIBUTING.md` requires the `Unblocks` entry to link the Game bring-up discussion. The matching discussion is [#11114](https://github.com/boykopovar/AnyPS5/discussions/11114); add it to the checklist. - The description says #10507 must be merged before this PR to resolve the `VulkanDevice.cpp` conflict, but the checklist lists only #10487 under `Depends on`. Please list #10507 there too, or update the stated merge order. - For the AGC/VideoOut validation requirement, the report says no new `VUID-` messages but does not state whether the comparison used `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, and `ANYPS5_REQUIRE_VULKAN=1`, or confirm neither log contains the missing-layer warning. Please add those exact run details and the main/change comparison, or run the prescribed check if it was not done. I fetched exact head `042dc0ade7dcaac81d57d3b79d7cc3c941305494`. `python3 tools/check_conventions.py --base upstream/main --head upstream/pr/11207` and `git diff --check upstream/main...upstream/pr/11207` pass. The PR author's validation/test results are reported in the description; I have not independently run the full Vulkan suite.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!11207
No description provided.