Files
metal2vulkan/crates
Anees Iqbal 8db961145b rt: the linear texture alignment answer is the device's linear row rounding alone
minimum_linear_texture_alignment no longer requires the linear image's memory alignment
(VkMemoryRequirements::alignment) to divide the answer. The answer is the smallest power of two P
at which the device lays every probed width's rows at the row rounded up to P, the largest over
the usages, and Metal's 16 where no P explains a format's pitches. The in-place test is
unchanged: a texture is in place only where its place in the buffer's memory is a multiple of the
image's memory alignment too, and is copied (over a Managed buffer's device copy, refused)
elsewhere. Nothing changes on NVIDIA, AMD or lavapipe, whose linear images' memory alignment
equals their row rounding (probe jobs 43742-43744). On the UHD 630, whose linear rows round to 64
bytes and whose linear images' memory aligns to 4,096 (probe 43758), the answer goes from 16 (no
P held) to 64, so a guest that pads its rows to the answer gets the device's own pitch.

Tests: tests::over places its textures at the answer rounded up to the linear image's memory
alignment (a test-only Device::linear_memory_alignment), and checks at widths 1, 3, 17, 64, 65 and
100 that a texture whose pitch is its row rounded up to the answer is in place; it prints how many
of its five formats answer 16. README and the getter's doc state what the number is and that
offsets are honoured in place only at the image's memory alignment.
2026-11-17 20:17:09 -08:00
..