diff --git a/crates/metal2vulkan/src/error/mod.rs b/crates/metal2vulkan/src/error/mod.rs index 11294e8ab..457d4665e 100644 --- a/crates/metal2vulkan/src/error/mod.rs +++ b/crates/metal2vulkan/src/error/mod.rs @@ -1099,7 +1099,8 @@ pub enum AccessCause { /// element that is neither a handle nor its word, a handle in memory other than device and /// constant memory, a handle parameter of no slot, or another instruction on a handle. HandleUse, - /// An index of a type other than an integer. + /// An index of a type other than an integer of 1 to 64 bits: a 0-bit integer, an integer + /// wider than 64 bits, or a type that is not an integer. IndexType, /// A constant initializer the translator does not write: one whose shape is not its type's, /// one of a type with no layout, or one holding a constant of no lowered form, of a private @@ -1168,7 +1169,9 @@ pub enum AccessCause { /// index a division by that size would not give. UnderAligned, /// An argument whose place the AIR's metadata does not fix as a constant: a buffer's, an - /// argument table's or a threadgroup argument's index, or a table's count. + /// argument table's or a threadgroup argument's index, or an argument table's count. A + /// threadgroup argument whose count is not a constant 1, a constant or not, is an + /// [`ArgumentTable`](AccessCause::ArgumentTable). UnfixedLocation, /// A volatile access of a form that has no volatile form: a payload word, a pointer or handle /// lookup, or another of the access family's forms. diff --git a/crates/metal2vulkan/src/spirv/ir/edit.rs b/crates/metal2vulkan/src/spirv/ir/edit.rs index 828ea756a..68bd0fd25 100644 --- a/crates/metal2vulkan/src/spirv/ir/edit.rs +++ b/crates/metal2vulkan/src/spirv/ir/edit.rs @@ -143,10 +143,10 @@ impl TypedModule { /// Replace each instruction of `copies` by `OpCopyObject` of its value, then remove the /// instructions at `insts`, the phis at `phis` (block, index), the declarations of the - /// constants `consts` and of the types `types`, and the functions `funcs`, each named once. A replaced instruction must be one - /// [`removable`](crate::spirv::dead::removable) names, with a result of the value's type, and - /// is not removed. Every removed instruction must have a result and be one - /// [`removable`](crate::spirv::dead::removable) names or a call of a function + /// constants `consts` and of the types `types`, and the functions `funcs`, each named once. A + /// replaced instruction must be one [`removable`](crate::spirv::dead::removable) names, with + /// a result of the value's type, and is not removed. Every removed instruction must have a + /// result and be one [`removable`](crate::spirv::dead::removable) names or a call of a function /// [`pure_functions`](crate::spirv::dead::pure_functions) names pure; every constant must be a /// declared one [`removable_const`](crate::spirv::dead::removable_const) names. A removed /// constant is no longer interned ([`Consts::forget`](crate::spirv::ir::Consts::forget)), so