From b7c5a599206c126ab11fc09241151d00afe4fcbe Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 18 Nov 2026 15:08:35 -0800 Subject: [PATCH] rt tests: the layouts test's plain texture takes its own index The test of a texture over a buffer in place made its plain texture, the other side of its texture to texture copies, with shader-read usage and no index. rt refuses that ("a texture shaders read or write takes an index, and none was given"), so on every device the test panicked before it recorded any command: lavapipe under the layer (job 48345), and the iris, 3090 (both), RX 550, 780M, 2080, XTX and KosmicKrisp legs (48347 to 48359, 48346). The test of the same in-place texture's sentinels passed on each of them. It now grants two texture indices and gives the plain texture the second. --- crates/metal2vulkan-rt/src/tests/layouts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-rt/src/tests/layouts.rs b/crates/metal2vulkan-rt/src/tests/layouts.rs index 6e6f3b307..833812b1c 100644 --- a/crates/metal2vulkan-rt/src/tests/layouts.rs +++ b/crates/metal2vulkan-rt/src/tests/layouts.rs @@ -472,7 +472,7 @@ mod on_device { let buffer = (device.new_buffer(block.id, AT, LEN, Some(0))) .unwrap_or_else(|error| panic!("{name}: {error}")); let first = IndexClass::Texture.range().start; - (device.grant_indices(IndexClass::Texture, first, 1)).expect("a grant"); + (device.grant_indices(IndexClass::Texture, first, 2)).expect("a grant"); let mut d = TextureDescriptor::new(TextureType::Type2D, PixelFormat::RGBA8Unorm, WIDTH, HEIGHT); forget(); @@ -496,7 +496,7 @@ mod on_device { let mut plain_d = d; plain_d.usage = TextureUsage::SHADER_READ; plain_d.storage_mode = StorageMode::Shared; - let plain = (device.new_texture(&plain_d, None)) + let plain = (device.new_texture(&plain_d, Some(first + 1))) .unwrap_or_else(|error| panic!("{name}: {error}")); let other = (device.new_buffer(block.id, 0, ROW * u64::from(HEIGHT), None)) .unwrap_or_else(|error| panic!("{name}: {error}"));