From fe6ed10162b1a71677edd3e15fef2ba3a9293183 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sat, 21 Nov 2026 06:09:05 -0800 Subject: [PATCH] rt: the floor profile requires pipelineCreationCacheControl, and the module digest reads its page as 4-byte chunks Check m3-max-63418 on 2686094aaa: the runtime-floor profile's m2v_runtime_floor block, which the_floor_profile_states_exactly_the_floor holds equal to floor.rs, lacked the new pipelineCreationCacheControl row (added to RUNTIME_FLOOR in regen_device_profiles.py and to the block it writes; the device's own Vulkan 1.3 features already stated it; check_device_profiles 0 findings, the script's 41 unit tests pass), and clippy's chunks_exact_to_as_chunks asked for as_chunks_mut in the digest's page fill. The lavapipe rt suite otherwise read 573 of 574. --- crates/metal2vulkan-runtime/src/stage.rs | 4 ++-- crates/metal2vulkan-validation/profiles/runtime-floor.json | 3 ++- scripts/regen-device-profiles/regen_device_profiles.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/stage.rs b/crates/metal2vulkan-runtime/src/stage.rs index 3cb1caf37..ea1bc9a5a 100644 --- a/crates/metal2vulkan-runtime/src/stage.rs +++ b/crates/metal2vulkan-runtime/src/stage.rs @@ -261,8 +261,8 @@ fn words_digest(words: &[u32]) -> [u8; 32] { let mut h = Sha256::new(); let mut page = [0u8; 4096]; for chunk in words.chunks(page.len() / 4) { - for (bytes, word) in page.chunks_exact_mut(4).zip(chunk) { - bytes.copy_from_slice(&word.to_le_bytes()); + for (bytes, word) in page.as_chunks_mut::<4>().0.iter_mut().zip(chunk) { + *bytes = word.to_le_bytes(); } h.update(&page[..chunk.len() * 4]); } diff --git a/crates/metal2vulkan-validation/profiles/runtime-floor.json b/crates/metal2vulkan-validation/profiles/runtime-floor.json index b80fb84e3..109c57d87 100644 --- a/crates/metal2vulkan-validation/profiles/runtime-floor.json +++ b/crates/metal2vulkan-validation/profiles/runtime-floor.json @@ -1187,7 +1187,8 @@ "shaderTerminateInvocation": true, "shaderZeroInitializeWorkgroupMemory": true, "synchronization2": true, - "dynamicRendering": true + "dynamicRendering": true, + "pipelineCreationCacheControl": true }, "VkPhysicalDeviceRobustness2FeaturesEXT": { "nullDescriptor": true, diff --git a/scripts/regen-device-profiles/regen_device_profiles.py b/scripts/regen-device-profiles/regen_device_profiles.py index eead074dd..ea3db4ffa 100755 --- a/scripts/regen-device-profiles/regen_device_profiles.py +++ b/scripts/regen-device-profiles/regen_device_profiles.py @@ -135,7 +135,8 @@ RUNTIME_FLOOR = { "VkPhysicalDeviceVulkan13Features": {member: True for member in ( "subgroupSizeControl", "computeFullSubgroups", "robustImageAccess", "shaderDemoteToHelperInvocation", "shaderTerminateInvocation", - "shaderZeroInitializeWorkgroupMemory", "synchronization2", "dynamicRendering")}, + "shaderZeroInitializeWorkgroupMemory", "synchronization2", "dynamicRendering", + "pipelineCreationCacheControl")}, "VkPhysicalDeviceRobustness2FeaturesEXT": {"nullDescriptor": True, "robustImageAccess2": True}, "VkPhysicalDeviceLineRasterizationFeaturesEXT": {"bresenhamLines": True},