Skip to content

fix(libc): compute atanl with FreeBSD msun's ld80 code as the bundled libc.prx does - #11262

Merged
oneandonlydean merged 11 commits into
boykopovar:mainfrom
AlexFigas:fix/libc-atanl-msun-ld80
Nov 12, 2026
Merged

oneandonlydean merged 11 commits into
boykopovar:mainfrom
AlexFigas:fix/libc-atanl-msun-ld80

Conversation

@AlexFigas

@AlexFigas AlexFigas commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What

atanl called the host std::atan, which differed from the console's result on 734,205 of 20 million random arguments. This PR replaces it with FreeBSD msun's s_atanl.c (ld80), the atanl of the libc.prx that PPSA21564 bundles (0x417f0, the library's own code).

The binary follows s_atanl.c step by step:

  • Large or not a number. If the exponent is ≥ 0x4040 (ATAN_CONST), a NaN returns x + x and anything else returns ±(atanhi[3] + atanlo[3]).
  • Small. expman = exponent << 8 | mantissa bits 55–62. Below 0x3ffdc0 (|x| < 0.4375), it evaluates 1e300 + x > 1 (the double 1e300, before the exponent test) and returns x when the exponent is below 0x3fdf. Otherwise it returns x - x*(s1 + s2).
  • Reduction. The thresholds are 0x3ffe60, 0x3fff30 and 0x400038. They select (2x - 1)/(2 + x), (x - 1)/(x + 1), (x - 1.5)/(1 + 1.5x) or -1/x on |x|. The result is atanhi[id] - ((x*(s1 + s2) - atanlo[id]) - x), negated for negative arguments.
  • Polynomial. s1 = z*T_even(w) and s2 = w*T_odd(w) over the 13 aT coefficients, with z = x² and w = z².

The three tables are taken from the binary as exact 80-bit hex literals (aT at 0x15e9b0, atanhi at 0x15e930, atanlo at 0x15e970). These are the ld80 invtrig.c values; atanhi[3]/atanlo[3] are the pio2_hi/pio2_lo that asinl and acosl already use.

x87 precision. As with acosl in #11260, the binary's atanl has no instruction that reads or sets the x87 control word and s_atanl.c has no ENTERI(), so it computes at the caller's precision. It adds atanhi[3] + atanlo[3] at run time, since the tables are invtrig.c externs, so at 53 bits the large-argument result rounds to 53 bits; GCC had folded that sum at 64 bits. The port now adds it through #11260's SumAtCallerPrecision.

atanl gets its own debt entry like acosl's (it runs at the caller's precision), and is removed from the list of long-double functions the host computes.

Licence. The notices of ld80/invtrig.c and s_atanl.c are copied verbatim directly above the coefficient tables and above atanl. The tables moved next to atanl for that, as Math.cpp already does for the msun code of sinh.

Tested

On Ubuntu 24.04 under WSL2 (GCC 13.3, Release), head 1dfac78, which merges #11260's head 0de3168 (with main 813f46c) into the previous head 0ecffe5, without a conflict. 0ecffe5 merged #11260's head 39fb738 (with main a4eca2a) into 6479c72, without a conflict either. That head merged #11260's c6faef7 (with main e0caf13) into ab63a05, where the merge conflicted where main's tanhf from #9867 met this stack's atanl and the old tanhf stub; it keeps main's tanhf and this PR's atanl:

Checklist

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 18110 docs/dev/debt/libc.md L88
PR 18122 atanl
PR 18481 docs/dev/debt/libc.md L88
PR 18513 core/libs/prx/libc/src/Math.cpp L4030-4033
docs/dev/debt/libc.md L88
PR 18525 docs/dev/debt/libc.md L88

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.

Pull request Shared files not compared
PR 5021 docs/dev/debt/libc.md
PR 6295 core/libs/prx/libc/src/Math.cpp
core/libs/tests/GuestMath.cpp
PR 7447 docs/dev/debt/libc.md
PR 7544 core/libs/prx/libc/src/Math.cpp
core/libs/tests/GuestMath.cpp
docs/dev/debt/libc.md
PR 7715 docs/dev/debt/libc.md
PR 8150 docs/dev/debt/libc.md
PR 8965 docs/dev/debt/libc.md
PR 9087 docs/dev/debt/libc.md
PR 9340 docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9447 docs/dev/debt/libc.md
PR 9466 docs/dev/debt/libc.md
PR 9526 docs/dev/debt/libc.md
PR 10409 docs/dev/debt/libc.md
PR 10780 docs/dev/debt/libc.md
PR 11109 core/libs/prx/libc/src/Math.cpp
core/libs/tests/GuestMath.cpp
docs/dev/debt/libc.md
PR 11172 docs/dev/debt/libc.md
PR 11332 docs/dev/debt/libc.md
PR 11625 docs/dev/debt/libc.md
PR 11661 docs/dev/debt/libc.md
PR 11689 docs/dev/debt/libc.md
PR 11698 docs/dev/debt/libc.md
PR 11726 docs/dev/debt/libc.md
PR 11848 docs/dev/debt/libc.md
PR 12682 docs/dev/debt/libc.md
PR 12688 docs/dev/debt/libc.md
PR 12700 docs/dev/debt/libc.md
PR 12849 docs/dev/debt/libc.md
PR 12965 docs/dev/debt/libc.md
PR 13449 docs/dev/debt/libc.md
PR 13794 docs/dev/debt/libc.md
PR 13804 docs/dev/debt/libc.md
PR 14212 docs/dev/debt/libc.md
PR 15095 docs/dev/debt/libc.md
PR 17008 docs/dev/debt/libc.md
PR 17010 docs/dev/debt/libc.md
PR 17259 docs/dev/debt/libc.md
PR 18122 core/libs/prx/libc/src/Math.cpp
docs/dev/debt/libc.md
PR 18347 docs/dev/debt/libc.md
PR 18389 docs/dev/debt/libc.md
PR 18524 docs/dev/debt/libc.md

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The atanl port and its test data are otherwise well-supported, but the implementation has the x87 precision-state gap already recorded in docs/dev/debt/libc.md: the function performs long-double arithmetic without forcing the 64-bit x87 precision used by the reference routine. Guest threads can arrive with 53-bit precision (0x27f), so the reported bit-for-bit comparison under the harness's default control word does not establish the same result for actual callers. The tests do not set a non-default control word or check restoration. Please add a scoped 64-bit precision mode with a regression under 53-bit precision that verifies both result bits and restoration, or provide evidence that the console contract preserves the caller's mode and test both modes. The hosted check suite now passes, including macOS Intel Release register-context; product builds are skipped, and I have not independently run the author's comparison.

@wachi35676

Copy link
Copy Markdown
Contributor

Windows run of head b3bd0e627fa8 merged onto main 0f34ebb85, WinLibs GCC 15.2.0, Release. Your runs were under WSL.

  • guest_math passes 3/3. With only atanl put back to main's std::atan(x) (keeping fix(libc): compute acosl with FreeBSD msun's ld80 code as the bundled libc.prx does #11260's acosl), it aborts at Guest atanl failed for 9c00000000000000:4000, so the new checks cover this commit.
  • The 21 constants match FreeBSD 11.4 ld80 invtrig.c bit for bit, compared as 80-bit values: AtanCoefficients = aT[] (13), AtanHigh = atanhi[] (4), AtanLow = atanlo[] (4). The ATAN_CONST, ATAN_LINEAR and reduction thresholds match s_atanl.c.

AI-assisted: yes (Claude Code); results above were run on this machine.

@AlexFigas

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Same answer as on #11260 (#11260 (comment)). The bundled atanl (0x417f0) has no instruction that reads or sets the x87 control word, and s_atanl.c has no ENTERI(), so it runs at the caller's precision.

At 53 bits the port differed from it only for |x| ≥ 2^65, where the binary adds atanhi[3] + atanlo[3] at run time and GCC had folded the sum (12,475 of 2,000,000 arguments). That return now uses #11260's SumAtCallerPrecision, and 20,000,000 random arguments match the binary at 64-, 53- and 24-bit precision. CheckAtanl also runs nine arguments at 53 bits: each reduction, ±2^65 and -∞. Each must give the binary's 53-bit result and leave the control word unchanged. With the sum folded again, it aborts at 0x8000000000000000:4040.

The head is 7f5f340, restacked on #11260's new head.

@babyhuey

Copy link
Copy Markdown
Contributor

Windows run of this head 7f5f3408e56, merged onto main 0a570f617d8 (clean merge, local only), with the selection CI's skipped Windows product job uses: Windows 11, Ryzen 7 5800X, RTX 3080, WinLibs GCC 15.2, Release, BUILD_TESTING=ON. The tree was configured fresh after the merge, then select_tests.py select / ninja -f select.ninja selected / --target libs / select_tests.py ctest --parallel 4 --timeout 120.

  • Selected 2547 tests: 1838 pass, 1 fails, guest_raise_exception, which also fails on 0a570f617d8 itself on this machine (crash or timeout under --parallel 4; it passed on 27ad7244d22, and I'm narrowing that down separately), 708 skip. No failures from this PR.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR describes bitwise comparisons against the bundled libc.prx across 20 million arguments, all three x87 precision settings, and the key special/large-argument paths. I am not approving this submitted head yet: its merge-base with main is 68cc9d4, while current main is 3fea2a9. Main has since changed Math.cpp, GuestMath.cpp, and docs/dev/debt/libc.md, all of which this PR edits. The tested tree named in the description is 5b5d24c, not the submitted head's base.

This PR also depends on #11260 and #9867, and its branch is stacked on #11260. Please coordinate the rebase after those dependencies are integrated, then rerun guest_math and confirm the updated checklist still names the required dependencies. I found no independently reproduced arithmetic failure; I cannot validate the integrated result until the stack is current.

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 7f5f3408e5, merged into main 1089f2bbfd (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. long double is the 80-bit x87 type on this toolchain, as on the console.

The tree also carried the other open libc PRs #11260, #11266, #11632, #11634, #11278, #11270, #11283, #10929, all merged cleanly, so the run is a joint one; the tests of this PR are guest_math. Every test in the set passed: ctest --test-dir build -R "math|libc|...|stdio" 32/32 and ctest -R "guest_dinkumware_internals|guest_standard_streams" 5/5, guest_math in 0.05 s. Build clean. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@AlexFigas

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Rebased onto #11260's 23a6c80 on main 1089f2b (c7362dc). guest_math passes 3 runs. This head's atanl_nid_postfix gives the binary's result, NaN bits, errno and flags, and leaves the control word unchanged, for 5,000,000 arguments at each of 64, 53 and 24 bits under each rounding mode.

That run found one difference, now fixed. The small-argument test added the long double 1e300L, which is not exact at 53 bits, so atanl(±0) and other tiny arguments raised FE_INEXACT at 53 bits. The binary adds the double 1e300 and raises nothing. CheckAtanl now checks atanl(+0) at 53 bits, and it fails with 1e300L.

The dependencies are unchanged (#11260 and #9867); I'll rebase again when #9867 lands.

@AlexFigas
AlexFigas requested a review from MarcZX10 October 27, 2026 14:51

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the current head c7362dc. The reduction thresholds, rational approximation, and caller-precision large-argument sum follow the pinned FreeBSD ld80 implementation. The PR now tests the bundled binary's results at 64-, 53-, and 24-bit precision and leaves the control word unchanged, addressing the prior precision-state concern. I found no separate arithmetic defect.

Independent focused check: I applied the #11260 and #11262 Math.cpp, GuestMath.cpp, and debt changes to the clean #11213-based Release checkout, rebuilt guest_math_tests, and ran guest_math three times; all passed. This verifies the stack on its 1089f2b base plus unrelated #11213 exception changes, not the current integrated main tree.

The integration request remains: #11260 and #9867 are still open, and the stack is based on 1089f2b while current main is 2ee8e97 (30 commits ahead). Please rebase after those dependencies land and rerun guest_math on the integrated head before approval.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head c7362dc. The atanl range reductions, coefficient tables, and caller-precision large-argument sum follow the pinned FreeBSD ld80 implementation. The new tests and reported comparisons cover 64-, 53-, and 24-bit precision and control-word preservation. I found no arithmetic defect.

Independent local check: applied the #11260 and #11262 Math.cpp, GuestMath.cpp, and debt changes to a clean #11213-based Release checkout, built guest_math_tests, and ran guest_math three times; all passed. I did not rerun the author's native differential harness. The current-main merge preview is clean, and main has not changed these files since the stack's 1089f2b base.

I approve the implementation and focused test evidence. #11260 and #9867 remain open and are explicitly declared dependencies; preserve their stated landing order before merging this stack.

@JJenkx

JJenkx commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

A runtime differential of this head against the libc.prx that titles ship.

Setup:

  • A scratch loader runs the decrypted libc.prx of PPSA07923 and PPSA05916 natively on Windows 11 and calls their atanl by NID. Neither copy is an FMA build.
  • It compares them with atanl from the libc.prx DLL built from this PR's exact head c7362dc28e (WinLibs GCC 15.2.0 UCRT r7, Release). guest_math passes on that build.
  • There are 100,000 arguments per title, evenly spread over ±20,000 in steps of 0.001. Each call compares the full 80-bit result.

Results:

  • Current main differs from the titles on 1806 of the 100,000.
  • This PR differs on none, on both titles.

Only finite arguments in that range were covered: no NaNs, infinities, subnormals or arguments of large magnitude.

AI-assisted: yes (Claude Code).

@MarcZX10 MarcZX10 mentioned this pull request Oct 27, 2026
12 tasks done
@AlexFigas

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Head ab63a05 merges #11260's refreshed head 84502b8 (main cc26ab4 and the whitespace fix in the e_acosl.c notice) into the approved aaa0f5c. On this head guest_math and guest_math_exact pass 3 runs each, and the 12 console-differential sweeps of atanl (5,000,000 arguments at 64, 53 and 24 bits under each rounding mode) show no difference in result, NaN bits, errno, flags or control word. git diff --check and check_conventions.py pass. The order is unchanged: #11260 and #9867 land first.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 1, 2026
@AlexFigas

Copy link
Copy Markdown
Contributor Author

@MarcZX10 #9867 has merged, which left this PR conflicting with main in Math.cpp (its tanhf rewrite against the old tanhf stub next to atanl). Head 6479c72 merges #11260's refreshed head c6faef7 and resolves it by keeping main's tanhf and this PR's atanl; nothing else changes. On this head guest_math and guest_math_exact pass 3 runs each, the 12 console-differential sweeps of atanl show no difference, and git diff --check and check_conventions.py pass. Depends on is now #11260 (#9867 has merged), and #10226, #10229 and #12053 merge cleanly with this head.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 1, 2026
@AlexFigas

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Head 0ecffe5 merges #11260's refreshed head 39fb738 (current main a4eca2a) into the approved branch, without a conflict. On this head guest_math and guest_math_exact pass 3 runs each, and the 12 console-differential sweeps of atanl (5,000,000 arguments at 64, 53 and 24 bits under each rounding mode) show no difference in result, NaN bits, errno, flags or control word. git diff --check and check_conventions.py pass. #9867 and #11077 have merged; the order is unchanged: #11260 and #12366 land first.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 0ecffe5 merged onto main 1e65852 · tested 2026-11-03 23:22 UTC · 18 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,693 passed · 14 failed (0 new, 13 also fail on main, 1 unstable on main) · 61 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 3,768 of 3,818 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (1334 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics 68.8 s, ⚠️ agc_driver_graphics_maps_fallback 68.8 s, ⚠️ public_headers 64.9 s, ⚠️ agc_driver_image_sample_unnormalized 61.7 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
Failing on main too (13, not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_store_over_untracked
agc_driver_submit_progress
agc_driver_two_sample_alpha_to_coverage_sample_mask_export
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 765 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (765 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_alpha_to_coverage_sample_mask_export, and 757 more
VUID-vkCmdCopyImage-srcImage-01548 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, and 1 more
VUID-vkCmdCopyImage-srcImage-01551 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, and 1 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (61)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_copied_writer_label_order_drain: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platfo
Reproduce
git fetch origin 0ecffe5ca55fe9aaa55cc30056cee882ad4fac47 1e658521a0a599872612bb91949311e2956b5283
git checkout 1e658521a0a599872612bb91949311e2956b5283 && git merge --no-ff 0ecffe5ca55fe9aaa55cc30056cee882ad4fac47
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated 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.

@AlexFigas

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Head 1dfac78 merges #11260's refreshed head 0de3168 (current main 813f46c) into the approved branch, without a conflict. On this head guest_math, guest_math_elementary and guest_math_exact pass 3 runs each, and the 12 console-differential sweeps of atanl (5,000,000 arguments at 64, 53 and 24 bits under each rounding mode) show no difference in result, NaN bits, errno, flags or control word. git diff --check and check_conventions.py pass. #12366 and #11077 have merged; the order is unchanged: #11260 lands first. oberonlift's #15802 stack (opened later) also rewrites the long double functions and conflicts with this head; noted in the description.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@maskym

maskym commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Retested head 1dfac78f90 on Windows (the head moved since my earlier run), merged alone into main f439f7f3a0.

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

guest_math, the test this PR adds or extends, passes 3 of 3 runs. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants