Pooled class: tests and docs
The padding-unobserved device test settles the check and holds the answer to the making's (NotHostPages exactly where the texture aliases, else the shadow's cause); a new device test renders textures of the guests' cache shapes (64-aligned pitches, rows ending inside a 64-byte line) over declared buffers and checks that a pitched image appears only where the pooled class passed for reads and renders, that the CPU's texels read back through the texture, that a clear reaches the buffer's rows, and that the bytes after the last row keep the CPU's. The validation lane reads 48 verdicts. Docs: in_place.rs and in_place_check.rs module docs, FAST-PATHS row 41, API.md (placement answers, the shadow reasons), HOWTO's padding-unobserved paragraph, the runtime README, BufferDescriptor::padding_unobserved, TexturePlacement's NotHostPages and Pending (a pooled texture made before its verdicts stays a shadow). Verified: cargo fmt only; builds and the device runs follow. (cherry picked from commit ae31d0fd3841b136c692897cbdf425633e9344c3)
This commit is contained in:
1 parent
ada21454ee
commit
703eca0dba
10 files changed
+227
-32
No files matched your search
+8
-5
@@ -342,11 +342,14 @@ past a row, a signaling NaN's bits quieted) may write, where Metal leaves them a
|
||||
them. A consumer that owns every read of such a buffer's bytes (a cache it fills and reads back by
|
||||
rows of texels, say) may make it with `BufferDescriptor::with_padding_unobserved()`: a runtime
|
||||
extension, no Metal counterpart, refused over the caller's memory (`NoCopy` contents). A texture
|
||||
over it is then a linear image at its pitch wherever the device lays one out so, its subresources
|
||||
holding each row's bytes after its texels to its pitch (the last row's included) and nothing past
|
||||
the last row's pitch; those bytes and the bytes between slices may change whenever the texture is
|
||||
made or used, and no other byte does (`WorkCounts::unobserved_padding_aliases` counts such images;
|
||||
`Buffer::texture_placement` answers `NotHostPages` for it, and
|
||||
over it is then a linear image at its pitch wherever the device lays one out so, or else, where
|
||||
the device makes `DRM_FORMAT_MOD_LINEAR` images (`VK_EXT_image_drm_format_modifier`), one at the
|
||||
pitch where its in-place check passed for its pooled memory (`WorkCounts::pooled_pitched_images`;
|
||||
`HostPageTexturePolicy::Shadow` turns it off), its subresources holding each row's bytes after its
|
||||
texels to its pitch (the last row's included) and nothing past the last row's pitch; those bytes
|
||||
and the bytes between slices may change whenever the texture is made or used, and no other byte
|
||||
does (`WorkCounts::unobserved_padding_aliases` counts such images; `Buffer::texture_placement`
|
||||
answers `NotHostPages` for such a texture, else the shadow's cause, and
|
||||
`Shadow(TextureShadowReason::BytesBetweenRows)` without the declaration).
|
||||
|
||||
A blit that names a texture over a buffer runs on the buffers' bytes, a region per row where its
|
||||
|
||||
Reference in new issue
Block a user