From 830f2c6c79c12ec13221b386e660eeb540b4efcd Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 19 Nov 2026 00:32:48 -0800 Subject: [PATCH] conformance: the new runtime's side answers a heap's newTextureWithDescriptor: as the consumer's own The rt side left heap_texture at the trait default, so texture-pairs-heap-texture-getters answered Unavailable at its textures. The heap's newTextureWithDescriptor: places the texture where the heap's own suballocation puts it, which is the consumer's, as the side already answers an automatic heap's buffer: the runtime's Device::new_heap_texture binds a texture at an offset the consumer chose. The row now states that reason instead of the side's missing port. --- crates/metal2vulkan-conformance/src/rt_side.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan-conformance/src/rt_side.rs b/crates/metal2vulkan-conformance/src/rt_side.rs index 0383a7bb4..895b306dc 100644 --- a/crates/metal2vulkan-conformance/src/rt_side.rs +++ b/crates/metal2vulkan-conformance/src/rt_side.rs @@ -809,6 +809,18 @@ impl Side for RtSide<'_> { Err(heap_is_the_consumers()) } + /// A heap's `newTextureWithDescriptor:`, which places the texture where the heap's own + /// suballocation puts it: the consumer's own, as an automatic heap's buffer is. The runtime's + /// `Device::new_heap_texture` binds a texture at the offset the consumer chose. + fn heap_texture( + &mut self, + heap: Handle, + _spec: &crate::sparse_query::SparseTextureSpec, + ) -> Answer { + self.held_heap(heap)?; + Err(heap_is_the_consumers()) + } + fn heap_max_available_size(&mut self, _heap: Handle, _alignment: u64) -> Answer { Err(heap_is_the_consumers()) } @@ -1598,7 +1610,7 @@ mod answered { }; /// Each call the side answers, with a case that reaches it. - const CALLS: [(&str, &str); 17] = [ + const CALLS: [(&str, &str); 18] = [ ( "heap_buffer_size_and_align", crate::cases::device_queries::HEAP_BUFFERS, @@ -1643,6 +1655,10 @@ mod answered { "pipeline-facts-compute-plain", ), ("plane_texture", "buffer-tails-kernels"), + ( + "heap_texture", + crate::cases::texture_descriptor_pairs::HEAP_TEXTURES, + ), ]; /// The calls `value` records as unavailable, wherever in it they sit.