gpu: a value test on Metal for computed compute buffers (#421) #422
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/422"
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by tiagonogueiraa-bit on 2026-11-27T17:36:36Z.
Refs #421
docs/native-host.md("Computed compute buffers") said that path was only translation-tested: "no value test runs it on a GPU". This PR adds that test. It is test and docs only, with no translator or host change.Test.
addr_tests::a_compute_buffer_descriptor_around_a_computed_address_loads_title_memory(victory-gpu, on Metal with MSC 4.0 beta 3).shaders::translateof an FSPX container (pipeline::test_compute_container) whose root-constant record (root type 0, user data 0) reaches four user SGPRs. Soconstants_to_the_endandzero_copy_memoryare exercised as in a run.s[0:1] + 16(stride 0, control word0x31014fac, bounds mode 3 with a byte count in dword 2), loads its dword by byte offset (buffer_load_dword ... offen) and stores it todst[lane]withglobal_store_dword.VA_A), so the high bits go through the page table.Learned while writing it. I first used control word
0x00014fac(bounds mode 0). With stride 0 every lane read 0, because mode 0 checks each offset against the stride. The docs now say so, next to the test's name.Checks.
cargo test -p victory-shader -p victory-hle -p victory -p victory-gpu -p victory-metal -p xtask: 1054 passed, 0 failed, 11 ignored.-D warnings: clean.cargo xtask policy: ok.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T01:34:31Z.
Review: APPROVED
Check report (helping the maintainer clear the queue):
checkandmacos-scriptsgreen on the current head.226645f9) merged with this PR and the other test/docs/tools PRs we're landing in this batch (#397 #399 #422 #467 #471 #475 #479 #481 #486 #489 #494 #498 #505 #511). On it, thevictory-gpu(arm64),victory-shader,victory-backend,victory-metalandvictorytests pass, as do the macOS script tests (rustup-path.sh,run-summary-compare.sh,run-summary.sh --self-test), Windows clippy (-D warnings) andcargo xtask policy. Onevictory-gpurun in four failed main's ownmulti_mip_array_and_placed_depth_twins_preserve_all_subresources_and_remirror_immediately. That test also flakes on main alone, so it isn't from this batch.Thanks @tiagonogueiraa-bit!