fix: support SDK startup, linear framebuffers and indexed draws #24

Merged
SamG-Coder merged 7 commits from upstream-pr/24 into main 2026-09-28 05:03:34 +00:00
SamG-Coder commented 2026-09-26 23:17:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SamG-Coder on 2026-09-26T23:17:26Z.


Fix SDK startup with an empty allocator replacement table, add linear framebuffer presentation through the current presentation path, and implement explicit indexed draws with packet validation. Retain buffer-address regression coverage for the correction already upstream, and restrict the POSIX exception-runtime test to Unix so Windows test builds succeed.

Also fix two issues reproduced after rebasing: render-target format lookup probed unsupported formats by repeatedly throwing exceptions, costing about 78 ms per draw; the lookup now searches supported entries directly. Recorder buffers now use Windows FLS cleanup to avoid MinGW freeing emulated TLS storage before running their destructors. Cross-DLL tests check independent values and destruction on standard and native Windows threads.

Validation: Windows Release build succeeds; 43 of 46 CTest tests pass. The unchanged agc_driver, agc_driver_flip, and agc_driver_pm4 failures were separately reproduced on upstream 7656458. The complete external PS5-ELF-to-Windows demo suite passes, including both draw modes, transforms, multiple draws, queued frames, and alpha blending; framebuffer comparisons pass. Graphics demos measured 59.1-60.2 FPS over 120 frames after warmup, versus about 12 FPS for a triangle and 6 FPS for two draws/blending before these fixes. Ten repeated linear-VideoOut runs and a debugger run exited successfully after the teardown fix. These checks do not establish physical PS5 execution, other-host support, or game compatibility.

Rebased onto upstream main at 7656458. Superseded heap-cache and condition-wait changes are dropped. Demos, SDK tools, binaries, logs, and documentation remain outside Git.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4650363612 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24). Originally posted by [SamG-Coder](https://github.com/SamG-Coder) on 2026-09-26T23:17:26Z. --- Fix SDK startup with an empty allocator replacement table, add linear framebuffer presentation through the current presentation path, and implement explicit indexed draws with packet validation. Retain buffer-address regression coverage for the correction already upstream, and restrict the POSIX exception-runtime test to Unix so Windows test builds succeed. Also fix two issues reproduced after rebasing: render-target format lookup probed unsupported formats by repeatedly throwing exceptions, costing about 78 ms per draw; the lookup now searches supported entries directly. Recorder buffers now use Windows FLS cleanup to avoid MinGW freeing emulated TLS storage before running their destructors. Cross-DLL tests check independent values and destruction on standard and native Windows threads. Validation: Windows Release build succeeds; 43 of 46 CTest tests pass. The unchanged agc_driver, agc_driver_flip, and agc_driver_pm4 failures were separately reproduced on upstream 7656458. The complete external PS5-ELF-to-Windows demo suite passes, including both draw modes, transforms, multiple draws, queued frames, and alpha blending; framebuffer comparisons pass. Graphics demos measured 59.1-60.2 FPS over 120 frames after warmup, versus about 12 FPS for a triangle and 6 FPS for two draws/blending before these fixes. Ten repeated linear-VideoOut runs and a debugger run exited successfully after the teardown fix. These checks do not establish physical PS5 execution, other-host support, or game compatibility. Rebased onto upstream main at 7656458. Superseded heap-cache and condition-wait changes are dropped. Demos, SDK tools, binaries, logs, and documentation remain outside Git.
SamG-Coder commented 2026-09-28 00:04:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SamG-Coder on 2026-09-28T00:04:52Z.


Framebuffer captures from the passing external SDK demo suite at e424b6b (Windows Release, 28 September 2026). These are actual PS5-target ELF demos converted by AnyPS5 and run on Windows. The PNGs are lossless conversions of GPU framebuffer readbacks; the transform pair is placed side by side. These are not physical PS5 captures.

06 — Triangle. Geometry and interpolated vertex colours matched the independent pixel checks (maximum sampled channel error: 1/255). Both indexed and auto-indexed draw modes passed; the image below is from the auto-indexed run.

Triangle framebuffer

07 — Constant-buffer transforms. Frame 138 on the left and frame 139 on the right show the position update. Both frames passed position and colour checks.

Transform frames 138 and 139

08 — Two draws. Two separate draws with different transforms in one frame; both triangles passed framebuffer checks.

Two draws framebuffer

10 — Alpha blending. Overlapping triangles checked against the CPU reference, including 375 overlap samples; maximum sampled channel error was 1/255.

Alpha blending framebuffer

The graphics suite measured 59.1–60.2 FPS over 120 frames after warmup. These captures demonstrate rendering output; they do not by themselves establish frame pacing, game compatibility, or physical-console execution. Image files and demo sources remain outside the repository.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5861062742 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24#issuecomment-5861062742). Originally posted by [SamG-Coder](https://github.com/SamG-Coder) on 2026-09-28T00:04:52Z. --- Framebuffer captures from the passing external SDK demo suite at e424b6b (Windows Release, 28 September 2026). These are actual PS5-target ELF demos converted by AnyPS5 and run on Windows. The PNGs are lossless conversions of GPU framebuffer readbacks; the transform pair is placed side by side. These are not physical PS5 captures. **06 — Triangle.** Geometry and interpolated vertex colours matched the independent pixel checks (maximum sampled channel error: 1/255). Both indexed and auto-indexed draw modes passed; the image below is from the auto-indexed run. ![Triangle framebuffer](https://github.com/user-attachments/assets/edc6f9db-6c7d-4c94-8df7-97136b48b996) **07 — Constant-buffer transforms.** Frame 138 on the left and frame 139 on the right show the position update. Both frames passed position and colour checks. ![Transform frames 138 and 139](https://github.com/user-attachments/assets/f81e0d95-bffc-463c-8c74-1c285ce31a10) **08 — Two draws.** Two separate draws with different transforms in one frame; both triangles passed framebuffer checks. ![Two draws framebuffer](https://github.com/user-attachments/assets/c1f30a5a-d648-4fce-bcf1-682f0330b8ee) **10 — Alpha blending.** Overlapping triangles checked against the CPU reference, including 375 overlap samples; maximum sampled channel error was 1/255. ![Alpha blending framebuffer](https://github.com/user-attachments/assets/8aa77742-a765-437b-bf66-ff950849cd92) The graphics suite measured 59.1–60.2 FPS over 120 frames after warmup. These captures demonstrate rendering output; they do not by themselves establish frame pacing, game compatibility, or physical-console execution. Image files and demo sources remain outside the repository.
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!24
No description provided.