Intel's driver for the UHD 630 on Windows (101.2145) rounds a small
linear image's VkMemoryRequirements size up to its 4096-byte alignment:
BGRA8 73x8 at a pitch of 320 has a 2560-byte subresource and a 4096-byte
image, 16x16 1024 -> 4096, RGBA16F 88x8 6144 -> 8192. The in-place check
(linear_plan::aliases) bounded the image's size by the buffer's VkBuffer
bytes from the texture's first, so a texture over a padding-unobserved
Private buffer of exactly its rows was a shadow, and a buffer placed on
256 bytes failed the image's 4096 start too.
The room an image over a buffer's texels may take is now the buffer's
own placement from its byte 0 (Buffer::memory_room: bytes no other
resource is placed in), in texture.rs's two aliasing checks and the
two-plane YCbCr check. A buffer whose maker declares its padding
unobserved is placed on the device's linear images' memory alignment
(Device::linear_image_alignment: one probe image's alignment, a 64x8
R8G8B8A8_UNORM linear image, kept for the device), its start and size
whole units of it; the recycler's BufferMaking keys on that alignment,
and a device recovery's carry places such a buffer so again. Where the
alignment is 256 or less (RADV, lavapipe, MoltenVK), every placement met
it already and nothing changes. Cost: at most alignment - 1 bytes more
for each such buffer on the UHD 630, plus the start's padding.
Still a shadow: an image the driver sizes past its alignment's rounding,
R8 4096x1 over 4096 bytes taking 16384 on the UHD 630 (FAST-PATHS known
gaps), and on that driver textures over buffers that do not declare
their padding unobserved where the image is larger than the placement or
starts off 4096.
Tests: padding_unobserved's a_texture_whose_rows_fill_an_unobserved_buffer_is_in_place
makes a 73x8 BGRA8Unorm texture at the device's own linear pitch over a
Private padding-unobserved buffer of its rows alone and asserts the
placement lies on the alignment, the texture is the image over the
buffer, and no shadow is counted.
Docs: BufferDescriptor::padding_unobserved, the runtime README entry,
FAST-PATHS known gaps.
Checks: on the UHD 630 (Windows, m3-max-32630, at the same diff before
its rebase), padding_unobserved's new test passed: 73x8 at a pitch of 320
over 2560 bytes, 4096 of room on 4096, an image over the buffer, 0
shadowed. At cb7660c625: clippy plain, m2v_gpu and rustdoc 0
(m3-max-32602); lavapipe touched set 153/153 and m2v_cpu_icd clippy 0
(m3-max-32603).