Repository navigation
chore(upstream-sync): sync x86sim/metal2vulkan@4329b35edb87 - #8
Closed
github-actions[bot] wants to merge 8 commits into
Closed
github-actions[bot] wants to merge 8 commits into
github-actions[bot] wants to merge 8 commits into
Conversation
…, not in an upload (red) A newer heap texture placed over an older one's bytes takes its move from UNDEFINED in the upload ahead of its first command buffer. Vulkan lets that move write the image's memory. If the command buffer reads the older texture before it writes the newer one, the read can see changed bytes, and Metal changes none. The pin round's AMDVLK leg showed it: Radeon 780M under AMDVLK, job m3-max-79662 at 685df42, 1 of 915 failed. The failing test is heap_alias's every_device_reads_an_older_texture_before_a_newer_one_over_its_bytes_is_written: 554 of 262144 texels of the older RGBA16Float texture read NaN, for the RGBA8Unorm 256x256 newer shape, with the RGBA16Float 256x128 and R32Float 256x256 shapes failing the same way. RADV and ANV pass it. That test's comment now says so. New counts test in tests/alias.rs, deterministic on every device lavapipe included. P is written; then Q, R, S and U are each placed over P's bytes: - Q is written after a read of P: checks [0, 1], one heap move, no upload barrier. - R is read after a read of P: the same for a first use that reads. - S's heap is declared (useHeap:), then P is read: checks [1], one heap move, no upload barrier; declaring the heap again moves nothing. - U is read by the host (get_bytes): its upload moves it once, the second read not at all. At this commit the uploads move each newer texture, so the upload-barrier, check and heap-move counts differ (red); the fix follows.
…t its first use, not in an upload A newer heap texture placed over an older one's bytes moved out of UNDEFINED in the upload ahead of its first command buffer. Vulkan lets that move write the image's memory (a compression state's initialization), and a command buffer that reads the older texture before writing the newer one then reads changed bytes, where Metal changes none. AMDVLK does this on a Radeon 780M (round job m3-max-79662, 1 of 915 failed; RADV and ANV pass). The ruled form, one form on every device with no device or driver key: no upload moves such a texture. Its first use moves it, in the command stream, after the earlier reads. - alias: a texture placed with links is unmoved (Placement::unmoved) as well as stale. A first use in a command buffer of a texture unmoved as it is encoded, a read included, adds a check at the head of its segment, as a first write already did. The segment ends first where a link was read in it. The submit thread resolves the check in queue order: a write's check moves a stale texture, and any check moves an unmoved one, which is then unmoved no more. - Each heap lists its unmoved textures (Places::unmoved). An entry leaves as its texture moves or is released, so the list never holds more than the heap's live placements. The device counts them, so use_heap on a device with none loads one atomic and locks nothing. - use_heap (compute and render) is a read of each unmoved texture of the heap, since a kernel or a draw may reach it next through an address: its check goes where the use_heap is. - get_bytes of an unmoved texture moves it in its own upload, ahead of its copy (alias::host_read). replace_region already moved a stale texture (host_write). - Image.over and its source scope in Image::homing are gone: an unmoved image is made homed and never enters an upload's homes. - Runtime README: the heap texture contract says when the move happens. The known gap of textures carries the residuals: a never-written newer texture that is read; an older texture read through a heap declaration after a newer one over its bytes was made and before that one is written (in both, the move may change the older bytes, as AMDVLK's does); a first use rt cannot name; and a draw's first use, checked where the pass's part of the command buffer starts. To verify at this commit (jobs in the handover): the red commit's counts test and heap_alias on lavapipe, clippy in three configurations, doc and private doc, the runtime and validation suites on lavapipe, AMDVLK on a Radeon 780M red at the red commit and green here, and RADV, ANV and NVIDIA unchanged.
…pped and counted (red) On macos-26, CI's Xcode 26.6 refuses the public fixtures of AIR 2.9 and Metal 4.1, which come from the macOS 27 SDK: `xcrun metallib` says "air version set to 2.9.0 (...), but expecting 2.8" for 31 typed fixtures, and `xcrun metal` says "invalid value 'metal4.1' in '-std=metal4.1'" for the 10 sources that name metal4.1. typed_fixtures_round_trip and msl_fixtures_round_trip fail on them. round_trip_all now keeps each input's outcome in a Tally, whose finish lists every skipped input and the total above the toolchain's newest version. The tests own their inputs and need no Mac: a fixture of AIR 2.9 refused by a toolchain that states 2.8, and a source naming metal4.1 refused by a compiler whose notes offer up to metal4.0, are each to be skipped and counted; every other error (another metallib error, a refusal whose expected version is not below the input's or names another version, a refused standard the source does not name or that the compiler offers, any other compiler error) is a failure, and a failure fails the round trip. Red here: Tally::refused files every refusal as a failure, so the two skip tests fail.
… above its newest Tally::refused now reads the input's own version and keys the skip on the toolchain's own refusal of it, compared with the version the toolchain says it takes: - typed AIR: the input's `!air.version` node, and `xcrun metallib`'s "air version set to X (...), but expecting Y". Skipped only where X is the input's version and Y is below it. - MSL: the source's `// metal-std:` standard S, and `xcrun metal`'s "invalid value 'S' in '-std=S'". Skipped only where every `metalX.Y` the compiler's notes offer is below S. Anything else stays a failure. finish lists each skipped input with both versions, then prints "SKIP <n> of <inputs> inputs above the toolchain's newest version". Over the public fixtures, 31 of 582 typed inputs state AIR 2.9.0 (545 state 2.8.0, the rest older) and 10 of 747 MSL sources name metal4.1. Those are the counts of the two refusals in CI run 46959260218 on macos-26 (31 and 10). On that runner, the two round trips should print "SKIP 31 of 582" and "SKIP 10 of 747" and pass. ci.yml is unchanged. The macos-26 arm64 image 20261123.0526.1 carries Xcode 26.0.1 to 26.6 (default 26.6) and SDKs up to macOS 26.5, so no Xcode on it takes AIR 2.9.
github-actions
Bot
force-pushed
the
sync/upstream-x86sim-to-drill-sync-clean-20261206
branch
from
December 6, 2026 13:09
c459a22 to
4b68c10
Compare
Author
|
Automated compatibility check for upstream |
|
Closing disposable DoD Item 11 upstream-sync drill PR after verifying clean sync (47652467010), report fix + idempotent PR update + comment (47653207514), conflict raw-mirror (47652476741), and blocked-PR loud report (47652487068). |
Apdelrahman1911
deleted the
sync/upstream-x86sim-to-drill-sync-clean-20261206
branch
December 6, 2026 13:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated Upstream Synchronization
https://github.com/x86sim/metal2vulkanx86sim@4329b35edb8709dd07af75bcbf14190fc492878bdrill/sync-clean-20261206(base881c20164ac3, 1 local commits preserved)6none2026-12-06T13:08:58.014953+00:00Incoming Upstream Commits
Recent Upstream Releases
Review Policy
ios-linuxpatches and optimizations ondrill/sync-clean-20261206are preserved via clean merge.