From 256c363847ba77f4e93b60ec34536d09e64b27a2 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 20 Nov 2026 15:57:26 -0800 Subject: [PATCH] Fix forward: runtime-floor states the floor's line rasterization, and Profile F may ask for a format where the formatless floor refuses The runtime's floor requires VK_EXT_line_rasterization with bresenhamLines (107dba0b33); the regeneration's RUNTIME_FLOOR block now states both, and runtime-floor.json is regenerated from it (scripts/regen-device-profiles, --only runtime-floor; check_device_profiles: 0 findings), so the runtime's the_floor_profile_states_exactly_the_floor holds. On runtime-floor, a function with more storage textures than the per-stage limit (13 against 4, kernel_block_read's br_rw) is refused on the formatless floor by the descriptor count, while the device without the formatless reads asks for the storage format first, before that check is reached. profile_f_functions_reach_every_buffer_through_a_descriptor accepts that pair. Verified by suite m3-max-60543 (msi) naming these two among its reds; rerun follows. --- .../profiles/runtime-floor.json | 6 +++++- .../metal2vulkan/src/tests/engine_profile_f.rs | 16 ++++++++++------ .../regen_device_profiles.py | 2 ++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/crates/metal2vulkan-validation/profiles/runtime-floor.json b/crates/metal2vulkan-validation/profiles/runtime-floor.json index 2e85dbb94..4d7bd1010 100644 --- a/crates/metal2vulkan-validation/profiles/runtime-floor.json +++ b/crates/metal2vulkan-validation/profiles/runtime-floor.json @@ -1121,7 +1121,8 @@ "extensions": { "VK_KHR_swapchain": 1, "VK_EXT_robustness2": 1, - "VK_EXT_calibrated_timestamps": 1 + "VK_EXT_calibrated_timestamps": 1, + "VK_EXT_line_rasterization": 1 }, "features": { "VkPhysicalDeviceFeatures": { @@ -1184,6 +1185,9 @@ "VkPhysicalDeviceRobustness2FeaturesEXT": { "nullDescriptor": true, "robustImageAccess2": true + }, + "VkPhysicalDeviceLineRasterizationFeaturesEXT": { + "bresenhamLines": true } }, "properties": { diff --git a/crates/metal2vulkan/src/tests/engine_profile_f.rs b/crates/metal2vulkan/src/tests/engine_profile_f.rs index 7c506091f..3328f5154 100644 --- a/crates/metal2vulkan/src/tests/engine_profile_f.rs +++ b/crates/metal2vulkan/src/tests/engine_profile_f.rs @@ -257,9 +257,9 @@ fn refused_for_a_fixed_extended_format( /// Every public fixture compiled for a Profile F device uses the static-root descriptor machinery /// only and passes L3; and the device without device addresses refuses exactly what the formatless /// floor accepts only through its formatless storage-image bits (asking for a storage format, or -/// naming formats' formatless access), or refuses as the formatless -/// floor does naming those bits too, or refuses a module-fixed extended format that the formatless -/// floor declares formatless. +/// naming formats' formatless access), or refuses as the formatless floor does naming those bits +/// too, or refuses a module-fixed extended format that the formatless floor declares formatless, +/// or asks for a storage format where the formatless floor refuses the function. #[test] fn profile_f_functions_reach_every_buffer_through_a_descriptor() { let profiles = profile_f(); @@ -294,10 +294,14 @@ fn profile_f_functions_reach_every_buffer_through_a_descriptor() { && !refused_also_for_formatless(&results[0], &results[1]) && !refused_for_a_fixed_extended_format(&results[1]) { + // The storage format is asked for before a refusal is reached: where the + // formatless floor refuses the function, the device without the formatless + // reads may ask for the format first. + let format_asked = floor.starts_with("NeedsInput{StorageTextureFormat"); assert!( - formatless == "ok" - && (floor.starts_with("NeedsInput{StorageTextureFormat") - || refused_for_formatless_access(&results[1])), + (formatless == "ok" + && (format_asked || refused_for_formatless_access(&results[1]))) + || (format_asked && formatless.starts_with("Unsupported{")), "{name} {entry}: {FORMATLESS_FLOOR} {formatless}, {PROFILE_F} {floor}" ); format_needed += 1; diff --git a/scripts/regen-device-profiles/regen_device_profiles.py b/scripts/regen-device-profiles/regen_device_profiles.py index eceddbcc2..047d84429 100755 --- a/scripts/regen-device-profiles/regen_device_profiles.py +++ b/scripts/regen-device-profiles/regen_device_profiles.py @@ -106,6 +106,7 @@ RUNTIME_FLOOR = { "VK_KHR_swapchain": 1, "VK_EXT_robustness2": 1, "VK_EXT_calibrated_timestamps": 1, + "VK_EXT_line_rasterization": 1, }, "features": { "VkPhysicalDeviceFeatures": {member: True for member in ( @@ -134,6 +135,7 @@ RUNTIME_FLOOR = { "shaderZeroInitializeWorkgroupMemory", "synchronization2", "dynamicRendering")}, "VkPhysicalDeviceRobustness2FeaturesEXT": {"nullDescriptor": True, "robustImageAccess2": True}, + "VkPhysicalDeviceLineRasterizationFeaturesEXT": {"bresenhamLines": True}, }, "properties": { "VkPhysicalDeviceProperties": {"limits": {