diff --git a/crates/metal2vulkan-runtime/README.md b/crates/metal2vulkan-runtime/README.md index d598f9647..6a615a277 100644 --- a/crates/metal2vulkan-runtime/README.md +++ b/crates/metal2vulkan-runtime/README.md @@ -3903,12 +3903,7 @@ cache is answered compile-required on both. argument whose minimum level or emulated filter the function specializes ("a sampler argument whose minimum level or emulated filter the function specializes"): no test yet; - other state of a bound texture or sampler beyond its resource ID ("state of a bound texture - or sampler beyond its resource ID (F)", `F` the `RuntimeFact`), among them an argument - buffer's texture that the function only queries (`HeapNumericType`): - `tests::engine_heap_groups`'s - `a_query_only_argument_buffer_texture_is_refused_naming_its_numeric_type` asserts the text - for a 2D texture and a cube array, and the golden table holds the refusal's class for - `engine/tail_cases`' `tail_heap_cube_queries`; + or sampler beyond its resource ID (F)", `F` the `RuntimeFact`): no test yet; - program-scope constant data past 64 KiB read through memory ("constant data of N bytes read through memory"): `tests::engine_identity`'s `a_constant_blob_past_the_modules_bound_is_refused_naming_its_size` asserts the text; diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 1246ea65c..19f5d9552 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -60,7 +60,7 @@ mod tests; /// unchanged version, and its bless records the version. Independent of the crate's version and of /// [`ARTIFACT_FORMAT_VERSION`]. The commit that bumps it says what changed; this comment keeps no /// history. -pub const SEMANTICS_VERSION: u32 = 2313; +pub const SEMANTICS_VERSION: u32 = 2314; /// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the /// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another diff --git a/crates/metal2vulkan/src/lower/texture/mod.rs b/crates/metal2vulkan/src/lower/texture/mod.rs index 66ae3982c..0ceac832e 100644 --- a/crates/metal2vulkan/src/lower/texture/mod.rs +++ b/crates/metal2vulkan/src/lower/texture/mod.rs @@ -12,7 +12,9 @@ //! once, from all of its uses, as one runtime array of the heap class its shape, texel class, and //! member access name, like a slot ([`ImageRef::Heap`]). A group that is only queried has no texel //! class and is declared `Float`, which its `RuntimeFact::HeapNumericType` states so the binder -//! reports a resident texture of another numeric type. An operation indexes that array with the +//! reports a resident texture of another numeric type; under the identity domains, where its +//! element is the texture its resource ID names, a query reads that element whatever its numeric +//! type (a query accesses no texel), and no fact is stated. An operation indexes that array with the //! handle, `NonUniform`, and behaves as the static null arm for the null handle (element 0, also //! every missed id): a read or query is 0, a write is dropped, `is_null` is `handle == 0`. The //! arrays need descriptor indexing (`runtimeDescriptorArray`, `descriptorBindingPartiallyBound`, diff --git a/crates/metal2vulkan/src/lower/texture/slot.rs b/crates/metal2vulkan/src/lower/texture/slot.rs index b75414dbb..2a59deb70 100644 --- a/crates/metal2vulkan/src/lower/texture/slot.rs +++ b/crates/metal2vulkan/src/lower/texture/slot.rs @@ -312,7 +312,7 @@ pub struct HeapPlan { /// The shape its operations spell (all agree). pub shape: Option, /// The texel class its reads and writes spell; `None` when only queries use it (declared - /// `Float`, with `RuntimeFact::HeapNumericType`). + /// `Float`, with `RuntimeFact::HeapNumericType` outside the identity domains). pub texel: Option, pub uses: Uses, /// The heap class and its declaration, set by [`finish`] for a group that is read, written, @@ -1318,8 +1318,12 @@ pub fn finish(cx: &mut SelectCx<'_>) -> Result<(), Error> { continue; }; let (class, decl) = declare_heap(cx, h, shape)?; - if h.texel.is_none() { - // Only queried: `Float` is a default, not the members' type. + // Only queried: `Float` is a default, not the members' type. Under the identity domains + // the group's element is the texture its resource ID names, whatever its numeric type, as + // a slot's is: a query reads the element's extent and its level, layer and sample counts, + // and accesses no texel (Vulkan's image query instructions), so no numeric type of the + // texture changes its answer. + if h.texel.is_none() && !crate::lower::access::identity(cx.profile) { facts.push(RuntimeFact::HeapNumericType { class }); } heap.push((*group, (class, decl)));