identity: kernels over buffers lower under the identity domains
Under PointerDomain::Identity with HandleDomain::Identity every buffer slot of a kernel is its
device address used directly. Each slot is the Psb form, its address read from its own push
field, PushField::SlotGuestBase(slot): gpuAddress plus the bind offset, which under the identity
domains is the Vulkan device address. No root table is read, and no access is contained, as Metal
contains no device-address access (psb::prepare_at). Selection admits, under the identity domains,
only the plans lowered so far (select::identity_admits): a kernel whose push fields are its slot
addresses and its dispatch region, all in the push window, with no descriptor and every slot
addressed. Anything else is still Unsupported{IdentityDomains}, not implemented, now refused there
rather than for every function at analysis. SEMANTICS_VERSION 2146: a refusal under the identity
domains became a module.
The new tests (src/tests/engine_identity.rs):
- a1_bool_from_float under the identity domains on lavapipe and moltenvk-m3 has no descriptor,
no root table and three SlotGuestBase fields. It passes L3, and it computes the program's
answer on the CPU interpreter, with its buffers above 4 GiB at bind offsets 32, 16 and 4. It
writes nothing past its output, with its region pushed.
- a2_dynamic_texel_offset, which samples a texture, compiles under the default domains and is
refused under the identity ones.
Verified:
- m3-max-41149 (msi, check commit eeecc4492b, the same tree but for the test's region bytes):
clippy -p metal2vulkan --all-targets --all-features, rustdoc -D warnings, and nextest -p
metal2vulkan --all-features, 3664 of 3665. The one failure was this test, which met the kernel's
DispatchRegion field and did not fill it.
- m3-max-41195 (msi, a5dbfd408f, this tree): clippy and rustdoc; tests::engine_identity and the
domain pair test, 3 of 3.
- m3-max-41150 (msi, eeecc4492b): clippy under --cfg m2v_gpu and --cfg m2v_cpu_icd.
This commit is contained in:
1 parent
702a965512
commit
46e3215e55
14 files changed
+346
-51
No files matched your search
+5
-3
@@ -109,9 +109,11 @@ compile does. `DevicePolicy::default()` is `DevicePolicy::UNTRUSTED`:
|
||||
`HandleDomain::Table`, the default). The identity domains (`PointerDomain::Identity` with
|
||||
`HandleDomain::Identity`, taken together) are the new runtime's form: pointers are device
|
||||
addresses used directly and a texture's or sampler's handle is its `gpuResourceID`
|
||||
([RESOURCE-ID.md](RESOURCE-ID.md)). They need `bufferDeviceAddress` and `shaderInt64`, and
|
||||
they lower no function yet: a compile under them is refused as
|
||||
`Unsupported{IdentityDomains}`.
|
||||
([RESOURCE-ID.md](RESOURCE-ID.md)). They need `bufferDeviceAddress` and `shaderInt64`. Under
|
||||
them a buffer slot is reached at its own device address (`gpuAddress` plus the bind offset),
|
||||
pushed as `PushField::SlotGuestBase`, with no root table, no descriptor and no containment, as
|
||||
Metal contains no device-address access. So far they lower a kernel that reaches memory only
|
||||
through its buffer slots; any other function is refused as `Unsupported{IdentityDomains}`.
|
||||
- **The model's linear sample of planes read in place** (`YCbCrInPlacePolicy::Model`, the
|
||||
default; changes emitted code). On an integrated GPU or a CPU device a function that only
|
||||
samples, gathers or sizes a `YCBCR8_420_2P` or `YCBCR10_420_2P` texture reads its planes' codes
|
||||
|
||||
Reference in new issue
Block a user