shader: name the refusal of a sampler built from computed words #58
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/58"
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 Sandile-0511 on 2026-11-26T11:35:37Z.
What this changes
a computed buffer descriptor used as a viewcan never come from a buffer access.classifylabels any untraceable four-dword group with a constant last dword asBuiltMemorywhencomputed_buffersis on, whatever operand it is, so the message is only reached from an image instruction: through its sampler, or through a 128-bit image descriptor. The reported offset is the consumer's, because the failing instruction has no side effect.This gives the sampler case its own message,
a sampler built from computed words, and documents both cases. No lowering changes. In a run at world load the new message appeared, so at least one real shader has the sampler shape.Supporting it needs more than the translator (a static sampler cannot carry runtime state); I can write that up separately.
How it was tested
cargo test -p victory-shader: 220 passed, 0 failed, 2 ignored. New testguessed_pixel_computed_samplers_and_short_images_remain_refused(computed sampler gives the new message at the export's offset; the same sampler with constant dwords lowers; anr128image keeps the old message).cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings(clean, run on a Mac)cargo xtask policy(365 files ok)Checklist
VICTORY_*variable and documented (none added)Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T11:51:51Z.
Review: APPROVED
The targeted refusal looks good. The regression checks the new sampler message, the unchanged short-image message, and the constant sampler case. One wording nit for follow-up: the
BuiltMemoryfallback also requires computed buffers to be enabled and the inferred address to resolve toMEMORY.