Under the identity domains a texture slot sampled through a constexpr sampler takes the sampler
from the set-1 sampler array of its use (binding 2 plain, 3 compare, 4 integer texture) at an
index the consumer pushes: PushField::ConstexprSampler(CombinedSampler), one u32. The consumer
makes the device sampler that the new public CombinedSampler::constexpr_sampler(profile)
describes, places it at an index of that array, and pushes the index. The index is a push word,
not a specialization constant: an index allocated at run time would key the driver's and the
pipeline cache's entries. Link's immutable sampler for the default domains now goes through the
same method, with the same result.
Under the identity domains every device sampler is normalized: a constexpr pixel sampler's
coordinate is scaled in the shader, as a runtime sampler's is, never handed to the device's
unnormalized sampler. A linear sample or gather through it records
PrecisionNote::PixelSamplerScaling, which is static. No address-mode-map variant applies there
(no binder picks a variant), so the sampler keeps its own modes and the slot records no
ConstexprSampled fact.
Still refused as Unsupported{IdentityDomains}: an argument buffer's sampler, arrays of samplers,
bicubic and anisotropy emulation. The refusal test now uses engine/a2_bicubic_weights.
Translation output changes only under the identity domains (Device::from_queries). Device::new
output is unchanged: golden_hashes_match_the_table passes at this tip (job m3-max-42192), with no
"changed under an unchanged key" and no "profile changed:" line.
Public surface: PushField::ConstexprSampler and CombinedSampler::constexpr_sampler are added
(api_signatures blessed); nothing is removed or changed.
SEMANTICS_VERSION 2162: identity-domain modules of constexpr-sampling kernels change.
ARTIFACT_FORMAT_VERSION 531: PushField gains a variant.
Verified:
- m3-max-42097 (msi), this change on cd5a76a757: clippy -p metal2vulkan --all-targets
--all-features and rustdoc -D warnings green; nextest all() of metal2vulkan, 3,689 of 3,693
passed. The four failures were development's own (the new pad_simd_shape and
vector_word_phases fixtures had no table rows), re-blessed at 74669c0552.
- m3-max-42098 (msi): clippy --cfg m2v_gpu and --cfg m2v_cpu_icd green.
- m3-max-42192 (msi), this tip on the samplers landing on 58891b9ce5: golden_hashes_match_the_table,
public_fixtures_engine inventory and llvm_as part 8, and air_input's engine golden printouts
pass.
- engine_identity a_constexpr_sampler_is_the_set_1_element_its_pushed_index_names: sample_up and
the same kernel through a linear pixel sampler link and pass L3 on every profile and on
moltenvk-m3 without robustImageAccess2. Their push fields are the two texture IDs and
ConstexprSampler(c) of the normalized use, with no spec constant but LocalSize, no immutable
sampler and no ConstexprSampled fact; set 1 bindings 0, 1 and 2 are used; constexpr_sampler
gives a normalized device sampler. PixelSamplerScaling is recorded for the pixel kernel under
identity, and under the default domains, which hand that kernel the unnormalized sampler, it is
not.