The lowest level a slot reads counts no size query: it reads no texel

What: LevelReads::lowest_read counted a size query at a constant level as a read of that level.
A sample's lowering queries the level-0 size for offsets, pixel coordinates and bias axes
(lower/sampler/emit.rs), so every such slot stated lowest_read 0 and no read past an attached
level could read in place: the lane and runtime tests of the past-level reads counted the slots
first-level or reaching (m3-max-20154, at 70b6b737e7 on lavapipe). A size query reads no texel,
and the view a narrowed slot binds keeps the texture's first level as its own, so it answers the
same at any level the view holds; the query still raises named, which keeps that level in the
view. Fetches and gathers read texels and still count.

Tests: level_reads::tests::each_read_states_the_levels_it_reaches (a size query at level 3:
named 3, lowest_read none). Verified: built and run in the next job.
This commit is contained in:
Anees Iqbal committed 2026-11-12 02:46:14 -08:00
1 parent d971205216
commit 6a951995e1
4 files changed
+25 -15

No files matched your search

+2 -2
View File
@@ -1539,8 +1539,8 @@ view's first level (`StageModule::level_reads`, one `LevelReads` a slot): whethe
reach any level (`any`: a level the function computes, a level-count query used beyond the
containment of a constant level, a level-of-detail query, a sample through no sampler or with a
minimum level of detail, a storage access, or a use the analysis does not follow), the highest
constant level a fetch, size query or gather names (`named`) and the lowest one it reads
(`lowest_read`), and its samples by the sampler each reads through (`sampled`, with the highest
constant level a fetch, size query or gather names (`named`) and the lowest whose texels a fetch
or gather reads (`lowest_read`), and its samples by the sampler each reads through (`sampled`, with the highest
and the lowest constant level of detail). A sample's level is its sampler's to bound: ask
`LevelReads::highest_level` with `SampledLevels::level` of the sampler you bind
(`SamplerLevels::of` its `vk::SamplerDesc`, and `SamplerLevels::finite_texels` of the view's