mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:00:52 +01:00
[PR #62] TEST-2033: print the sizes when the compacted-size check fails #114
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#114
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/62
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9785📝 Commits (1)
de2370etest(xdxr): print the sizes when the compacted-size check fails📊 Changes
1 file changed (+12 additions, -1 deletions)
View changed files
📝
runtime/test/vk_xdxr_build_test.cpp(+12 -1)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: TEST-2033 (the claim could not be posted: interactions on
this repository are limited to collaborators)
What and why
TEST-2033:
vk_xdxr_build_test.cpp:571fails on a real Apple M4 with MoltenVK 1.4.2 (#9396, builtwith Zig's clang), while CI's paravirtual Metal device passes. The item asked to tell a compiler
issue from a MoltenVK/Metal one.
It is not the compiler. On an Apple M1 Pro, macOS 27.3, MoltenVK 1.4.2 (Homebrew):
vk_xdxr_build_testctestzig c++0.17.1 (clang 22.1.8, the reporter's)The
xdxr_build_casesoutputs of the two builds are byte-identical, andxdxr_build_checkpasses.Khronos synchronization validation 1.4.363 reports no hazard in the whole test.
Since
EXPECTreturns at the first failure, everything before line 571 passed on the M4. The secondhalf of the condition is implied by the earlier
dumpcheck (same layout parameters), so on the M4the GPU's postbuild value differed from the size the host read from the header after the build.
The check only printed the condition, so this change prints the values when it fails:
postbuild 0xabababab...: the GPU's write to the 16-byteinfobuffer never reached the host(MoltenVK/Metal, for example a small buffer used only through its device address on Apple9)
header nowdiffers fromheader at build: something wrote overblas_randomafter its buildpostbuildthat differs from an unchanged header: the GPU read a stale header orthe wrong address
Builtkeeps a pointer to the structure's mapped bytes to read the header again. Nothing changeswhen the check passes.
It applies cleanly on
#8776, which edits other lines of the same file.Tested
Zig 0.17.1 without warnings, and
vk_xdxr_build_testpasses with both.compacted size: postbuild 0x0000000000021a80, clone postbuild 0x0000000000021a80, header at build 137856, header now 137856, layout 169984.vk_xdxr_build_testthere with this change shows which of thethree cases it is.
python -I scripts/check_no_game_data.py runtime/test/vk_xdxr_build_test.cpp: exit 0.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.