RUNTIME 2420: A storage twin's neutral shares the device's zero buffer: the plan says which buffer writes are read-only
What: a new public BindingPlan::read_only_buffer(&DescriptorWrite): true for a uniform buffer and for a uniform view's storage twin (DescriptorView::UniformWithStorageTwin, PlannedBuffer::twin), which no function stores through. The runtime asks it where it used to read the descriptor type alone (binding::descriptor's neutral arm, make_neutrals, binds_own_zeros), and makes the device's zero buffer a storage buffer too, so a twin bound to nothing binds it. Why: on the Iris Xe RPL-P profile (DriverWorkaround::PushReadsLengthenThreadPayload) RUNTIME 2413 gave a kernel's constant slot a storage twin. Left unbound, the plan writes the twin from the ZeroBuffer neutral at a STORAGE_BUFFER binding, which the runtime took for a writable binding: every dispatch took a fresh 64 KiB upload region, a dedicated VkBuffer allocated and zeroed, held until its command buffer completed. Round 5974320352's Iris leg: neutral_zeros_shared::dispatches_share_the_devices_one_zero_buffer, 8 dispatches made 8 VkBuffers and 16 made 16. Translation output and plans are unchanged (no SEMANTICS bump); the API addition is blessed in api_signatures.tsv, and docs/API.md section 5 says it. Test: engine_access::an_unbound_constant_slot_s_storage_twin_is_a_read_only_write plans buffer_end_byte_load_constant with nothing bound on intel-irisxe-rplp-anv (the twin's STORAGE_BUFFER write read-only, the written slot's not) and, as the negative control, on four other profiles (no twin; read-only exactly at uniform buffers). The device check is the neutral test itself on the Iris, which fails at the base. Also, test premises on the Iris profile (round 5974320352's iris:runtime reds): - a20c0a26d8: the compute creation test counts the forms its profile makes (1 + keyed storage views since RUNTIME 2410) and holds the pool only where completion is bounded (under Exact the second form runs on the pool). - 88b8d31a32: set 0 at offsets counts the pipeline binds (draws past offset 0 take the residual form) and the push after each where the driver forgets pushed descriptors after a pipeline bind. Verified in the lane (msi): m3-max-35051 clippy -D warnings -p metal2vulkan -p metal2vulkan-runtime --all-targets --all-features exit 0, translator tests 71/71 (api_signatures 3/3); m3-max-35053 lavapipe (cpuicd) deferred_calls, neutral_zeros_shared, set_zero_at_offsets, uniform_bind_offsets 43/43. Still to run: clippy gpucfg and cpuicd, rustdoc, ONE Iris run of the three tests. New Degradation kinds: none.
This commit is contained in:
1 parent
6434a3d134
commit
cceefacfa7
10 files changed
+198
-66
No files matched your search
+4
-1
@@ -1513,7 +1513,10 @@ for dependency in &pipeline.dependencies {
|
||||
buffer, offset and range, from the same bind offset: a plan writes both from the slot's own
|
||||
source (`WriteSource::Buffer`, `InlineBytes` or `Neutral`), an instance's `DescriptorRange`s
|
||||
give both bindings one range, and the plan's `uses` hold a `Storage` read of the slot beside the
|
||||
`Uniform` one. Where the
|
||||
`Uniform` one. No function stores through the twin: `BindingPlan::read_only_buffer` holds for
|
||||
both of the slot's writes, as for every uniform buffer's, so a slot bound to nothing may bind
|
||||
one zero buffer that every command shares at both (the runtime's, made as a uniform and a
|
||||
storage buffer); a write it does not hold for may be stored through. Where the
|
||||
slot's `RangeAtBindOffset` holds, the kernel reads the twin at its bind offset alone; elsewhere
|
||||
the uniform view at its residual, so the same specialization and range serve either. The key is
|
||||
a uniform view's (a bind offset the view base alignment divides, at a slot whose table tells it
|
||||
|
||||
Reference in new issue
Block a user