SEMANTICS 2128, RUNTIME 2398: Buffer views read at their bind offset where a pushed word lengthens every thread's payload
On ANV (Mesa 26.2.6) on the Iris Xe RPL-P, a compute function that reads a client push word gets a longer per-thread payload (the base workgroup id moves 17 registers further), and a light kernel runs about 2.2 times as long: 120.2 us against 55.7 us a dispatch on the same module with the push read removed (raw Vulkan chains, jobs m3-max-34063 and m3-max-34038). The 780M (RADV) shows no such gap (m3-max-34031). The runtime's storage views read their SlotBindOffset residual on every access, so every kernel paid it there. A measured DriverWorkaround row, PushReadsLengthenThreadPayload, on that driver and GPU: - the translator declares SpecKey::RangeAtBindOffset for storage views too on that profile (access plan's storage_at_bind; the pulled vertex fetch of a shared slot folds its residual under the same key), so a key at 1 reads no push word once the driver folds it; - the binder sets a storage view's key only at bind offset 0, where the runtime tells offset 0 apart at the slot (StageTable::zero_offset_views, class ZERO_OFFSET_CLASS), and only where instantiation's range starts there (starts_at_bind), so the bytes before a bind offset stay reachable through the range from the buffer's start at every other offset; - the runtime keeps the zero-offset slots beside the uniform ones (AtBindViews), leaving out a slot once it is bound at another offset, and reads views at their bind offsets on that profile (reads_views_at_bind), the uniform views' existing form included. Every other profile declares no new key and its modules are unchanged; its stage tables leave zero_offset_views 0, so its shapes and plans are as before. Also a FAST-PATHS known gap: on the Iris Xe, kernels over exportable or host-pointer-imported memory run about 2.2x (125.53 and 122.95 us against 55.73, m3-max-33760), cause unobserved; zero copy stays. Tests: engine_access (a storage view's module at key 1 reads no SlotBindOffset, at key 0 it does, answers on the interpreter; no key on the other profiles), the binder's offset-0 rule and class, the committed profiles' form choice, and a runtime device test of a storage view at offset 0 and past it. Verified in the lane: touched tests in msi jobs 34174/34198 (engine_access, bind::, fast_paths, api_signatures, the runtime pipeline and argument_table tests); lavapipe m2v_cpu_icd 21/21 (34190: uniform_bind_offsets and the new storage test, answers at offset 0, past it and at 0 again); clippy plain 0 (34198), m2v_cpu_icd and m2v_gpu 0 (34200); rustdoc 0 (34213). golden_hashes reads stale only for intel-irisxe-rplp-anv (re-keyed: 1788 cells, fingerprint 6d95bb254f9f9d66 -> 2f820bef4bfb9669); no cell under an unchanged key moved. The table is re-blessed on development.
This commit is contained in:
1 parent
244fa02286
commit
d3b1dbdbe0
27 files changed
+704
-141
No files matched your search
+12
-2
@@ -1459,9 +1459,19 @@ for dependency in &pipeline.dependencies {
|
||||
shape and one pipeline (the runtime leaves out each slot of a state once it finds one bound at
|
||||
an offset the alignment does not divide). A consumer that draws and dispatches every key at its
|
||||
residual form (each `RangeAtBindOffset` at 0, as the runtime does on every device whose driver
|
||||
is not measured to load such reads ahead of the shader) says so with
|
||||
is not measured to load such reads ahead of the shader, nor takes the workaround below) says so
|
||||
with
|
||||
`state.uniform_views_at_residual = true`: its uniform views then bind ranges their bind offsets
|
||||
share (below), as a bounded storage view's do.
|
||||
share (below), as a bounded storage view's do. On a profile that takes
|
||||
`DriverWorkaround::PushReadsLengthenThreadPayload` (ANV on the Iris Xe RPL-P, where a light kernel
|
||||
that reads a pushed word was measured at about 2.2 times the time of one that reads none) a
|
||||
storage view declares the key too, and takes the form that reads no residual only at bind offset 0
|
||||
of a slot whose table tells offset 0 apart (the slot's bit in its table's `zero_offset_views`;
|
||||
`interface.storage_view_buffers(stage)` lists the slots that can take it), its class then
|
||||
`bind::ZERO_OFFSET_CLASS`: leave out a slot bound at another offset, as the runtime does, so that
|
||||
the bytes before a bind offset stay reachable through the range from the buffer's start and its
|
||||
dispatches keep one shape. Elsewhere no storage view declares the key, and `zero_offset_views`
|
||||
changes nothing.
|
||||
- A two-plane YCbCr texture whose planes a function may read in place states them in its facts
|
||||
(`TextureFacts::ycbcr_in_place`, a `YCbCrInPlace` of its planes; the runtime states one on a
|
||||
device whose memory is the host's, `DeviceProfile::reads_ycbcr_planes_in_place`: an integrated
|
||||
|
||||
Reference in new issue
Block a user