From e5848db6ae2588dd68a61bf428e53b74420e39c3 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 19 Nov 2026 02:51:43 -0800 Subject: [PATCH] rt test: the in-place replace_region test's texture has no shader usage, so takes no index development fcd860a0ed's tip check m3-max-51271 (lavapipe, msi) failed every_device_reads_replace_region_bytes_in_place_once at its new_texture: the descriptor kept Metal's default ShaderRead usage, and a texture shaders reach takes an index (Refusal::TextureIndex { index: None }, which the same file's index test asserts). The refusal is right on every device, not lavapipe's alone; the test was wrong. Its texture now has no usage, as sampling.rs's texture without an index does; replace_region and get_bytes need none. Verified by the next build and legs. --- crates/metal2vulkan-rt/src/tests/texture.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/metal2vulkan-rt/src/tests/texture.rs b/crates/metal2vulkan-rt/src/tests/texture.rs index d4cc6e630..470e3c013 100644 --- a/crates/metal2vulkan-rt/src/tests/texture.rs +++ b/crates/metal2vulkan-rt/src/tests/texture.rs @@ -559,6 +559,8 @@ mod on_device { each_device("host_bytes", |name, _, device| { let mut d = descriptor(TextureType::Type2D, PixelFormat::RGBA8Unorm, [8, 4, 1]); d.storage_mode = StorageMode::Shared; + // No shader usage, so no index: a shader-read texture takes one. + d.usage = TextureUsage::empty(); let texture = (device.new_texture(&d, None)).unwrap_or_else(|error| panic!("{name}: {error}")); let region = Region {