Runtime: say what a decoded twin's CPU decode makes replace_region wait for
The cpu-block-decode notice said the call waits for the decode where a command buffer that may read the texture is submitted and not yet complete, or the texture is untracked. The call has waited for no GPU work since the decode moved to the device's decode thread (texture/twin_decode.rs): it waits only for room, while 256 MiB of written blocks wait for the thread (a 4:2:2 carrier's partial-row write also reads its rows back first), and the scheduler holds the first command buffer that may read the texture, every command buffer where the texture is untracked. The declaration's rustdoc, its announced cost and docs/API.md's catalogue entry now say that. A test ties the stated bound to the queue's QUEUED_BYTES (made pub(crate) for it), so the text follows the constant. Verified: tests::degradation::the_cpu_block_decode_cost_states_the_calls_ only_wait and tests::degradation_catalogue (the catalogue states the cost). (cherry picked from commit f128722f1b2197f52833080eca738fd498cf6ce5)
This commit is contained in:
1 parent
b1625c535c
commit
ab10b3cbcf
5 files changed
+25
-14
No files matched your search
+8
-7
@@ -2981,13 +2981,14 @@ bound.
|
||||
- `metal2vulkan-degrade-cpu-block-decode` (performance). `CpuBlockDecode`: A CPU copy into a texture
|
||||
with a decoded twin (`replace_region`) whose CPU copies go on the host or the staging queue: its
|
||||
region is decoded on the CPU, on the device's decode thread, and copied into the twin; the first
|
||||
command buffer that may read the texture waits at its submission for that, and the call itself
|
||||
where a command buffer that may read it is submitted and not yet complete (which then reads the
|
||||
copied texels, as Metal's does) or the texture is untracked. Cost: the written blocks decoded on
|
||||
the CPU, on the device's decode thread split over up to 8 threads, and their texels copied into
|
||||
the decoded twin on the host or the staging queue: the first command buffer that may read the
|
||||
texture waits at its submission for that, and the call waits for it where a command buffer that
|
||||
may read the texture is submitted and not yet complete, or the texture is untracked.
|
||||
command buffer that may read the texture waits at its submission for that (every command buffer,
|
||||
where the texture is untracked). The call itself waits for no GPU work, as Metal's does not: only
|
||||
for room, while 256 MiB of written blocks wait for the thread. Cost: the written blocks decoded
|
||||
on the CPU, on the device's decode thread split over up to 8 threads, and their texels copied
|
||||
into the decoded twin on the host or the staging queue: the first command buffer that may read
|
||||
the texture waits at its submission for that (every command buffer, where the texture is
|
||||
untracked), and the call waits only for room, while 256 MiB of written blocks wait for the
|
||||
thread.
|
||||
- `metal2vulkan-degrade-carried-decoded-twin` (performance). `CarriedDecodedTwin`: A texture of an ASTC
|
||||
LDR format (`ASTC_4x4_LDR` to `ASTC_12x12_LDR`, the sRGB forms too) made on a device without that
|
||||
ASTC format, of an ASTC HDR format (`ASTC_4x4_HDR` to `ASTC_12x12_HDR`) on a device without its
|
||||
|
||||
Reference in new issue
Block a user