From 9d4d178a7fb1f4b8a7eb71a080ecbb3f25eb00a0 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 11 Nov 2026 06:50:35 -0800 Subject: [PATCH] ComputePipelineDescriptor::open_cl_mode_enabled: name the image behaviour Its doc comment now says what the mode does with images: the format queries read buffer 2's words 2t + 1 and 2t, and 1D images take the 2D (array) textures of height 1 Apple's OpenCL binds, at row 0. Doc only. --- crates/metal2vulkan/src/pipeline/descriptor.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan/src/pipeline/descriptor.rs b/crates/metal2vulkan/src/pipeline/descriptor.rs index 8d8476c80..bb2289bc8 100644 --- a/crates/metal2vulkan/src/pipeline/descriptor.rs +++ b/crates/metal2vulkan/src/pipeline/descriptor.rs @@ -699,7 +699,11 @@ pub struct ComputePipelineDescriptor { /// samplers keep theirs. OpenCL C's work-item functions read the dispatch: `get_global_id` /// adds the offset to the thread's position in the grid, `get_global_offset` and /// `get_work_dim` read buffer 0, and a dimension past 2 answers OpenCL's 0 or 1 (where the M3 - /// Max leaves a store of such a value unwritten). The pipeline's reflection lists the three + /// Max leaves a store of such a value unwritten). `get_image_channel_order` and + /// `get_image_channel_data_type` of the image at texture index `t` read words `2t + 1` and + /// `2t` of buffer 2. An `image1d_t` (`texture1d` in the AIR) and an `image1d_array_t` + /// (`texture1d_array`) take the 2D texture and the 2D array texture of height 1 that Apple's + /// OpenCL binds for them, read and written at row 0. The pipeline's reflection lists the three /// buffers after the kernel's arguments. The kernel compiles under it /// (`LoweringInputs::open_cl_mode`), so it is part of the key. Without it Metal refuses a /// pipeline of such a kernel ("Internal compiler error"); the crate compiles it as the AIR's