diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 36486cbcd..cf7ee346e 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 = 2368; +pub const SEMANTICS_VERSION: u32 = 2369; /// 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/access/blob.rs b/crates/metal2vulkan/src/lower/access/blob.rs index d3eb7fe61..eb899caea 100644 --- a/crates/metal2vulkan/src/lower/access/blob.rs +++ b/crates/metal2vulkan/src/lower/access/blob.rs @@ -55,11 +55,12 @@ pub enum BlobStrategy { Copy { of: LocalPtr, }, - /// `select c, t, f` of two blob pointers. + /// `select c, t, f` of two blob pointers, each a value or a constant's blob offset + /// ([`blob_ptr`]). Select { c: ValueId, - t: ValueId, - f: ValueId, + t: LocalPtr, + f: LocalPtr, }, Load(BlobLoad), } @@ -254,8 +255,8 @@ pub fn select( use_blob(cx)?; BlobStrategy::Select { c: operand(cx, *c)?, - t: operand(cx, *t)?, - f: operand(cx, *f)?, + t: blob_ptr(cx, *t)?, + f: blob_ptr(cx, *f)?, } } InstKind::Load { @@ -362,8 +363,8 @@ pub fn emit( BlobStrategy::Copy { of } => ptr_value(cx, fb, *of)?, BlobStrategy::Select { c, t, f } => { let c = cx.operand(fb, *c)?; - let t = cx.operand(fb, *t)?; - let f = cx.operand(fb, *f)?; + let t = ptr_value(cx, fb, *t)?; + let f = ptr_value(cx, fb, *f)?; fb.select(c, t, f)? } BlobStrategy::Load(l) => {