From b1e2f06e9e26d9669c5870d82723fac288637a8e Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 01:17:49 -0800 Subject: [PATCH] Docs: a written texture over host pages is a shadow by width only outside 1, 2, 4, 8 and 16 bytes Two passages still said a shader's writes of 1- or 2-byte texels keep a texture over host pages a shadow: the shadowed-texture entry of docs/API.md's degrade-notice catalogue and the host-pages bullet of docs/FAST-PATHS.md's costs. The device's check now stores those widths too; a texture is a shadow by its width only for a width outside the ones it stores. Verified: docs only; grep finds no other passage that names 1- or 2-byte written texels as a shadow's cause. (cherry picked from commit 90bd51d7a55257a40e115c55da2a53c7bb0b4f80) --- docs/API.md | 5 +++-- docs/FAST-PATHS.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/API.md b/docs/API.md index ea164587a..830efa569 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1576,8 +1576,9 @@ bound. 32 MiB lies in), where an image bound to them would start `UNDEFINED` and Vulkan lets its layout transitions (its first move among them) read and write any byte bound to it, where Metal keeps every CPU write, and the device takes no image in place there: the policy keeps the exact form - (`HostPageTexturePolicy::Shadow`), a shader writes the texture's texels of 1 or 2 bytes, which - the device's check stores none of, the device's check that the operations of an access of the + (`HostPageTexturePolicy::Shadow`), a shader writes the texture's texels of a width the + device's check stores none of (none of 1, 2, 4, 8 and 16 bytes), the device's check that the + operations of an access of the texture (the first move; a render pass's load and store; a kernel's storage writes) keep every byte (but, for a kernel's writes of a texture over a buffer's rows whose padding is free, that padding: section 10, **Kernels**) over that kind of pages, for texels that share a line of the diff --git a/docs/FAST-PATHS.md b/docs/FAST-PATHS.md index 165c5b22e..a1323f89e 100644 --- a/docs/FAST-PATHS.md +++ b/docs/FAST-PATHS.md @@ -270,8 +270,9 @@ recorded here. (on the Radeon 780M 0.55 to 0.71 and 1.04, on the RX 7900 XTX 0.90 to 0.91 and 1.04 to 1.05). Other devices are not measured. - **A texture over a no-copy buffer's host pages, or over a host-visible buffer longer than 32 - MiB, that a shader writes of 1- or 2-byte texels (or whose class's check has not passed for an - access of its, or whose format, usage or pitch no image takes, or under + MiB, that a shader writes of texels of a width the check stores none of (none of 1, 2, 4, 8 and + 16 bytes; or whose class's check has not passed for an access of its, or whose format, usage or + pitch no image takes, or under `HostPageTexturePolicy::Shadow`), and a texture over a buffer of the runtime's memory whose rows lie with bytes between them,** is a shadow (`shadowed-texture`, its reason named): its texels copied in before each use and merged back after each write (only those inside the draws'