Merge current master and preserve mesh stage binding variants
Resolve the upstream texture-buffer, render-offset and typed-refusal interfaces. Keep mesh metadata when pass attachments or stage bindings change; independent object and mesh masks cover all four render stages. The added CPU Vulkan regression exercises attachment removal and unaligned object/mesh buffers with direct and indirect draws. Twelve CPU mesh tests pass with private Lavapipe 26.2.6. Full merged-tree gates follow on the isolated fork development branch.
This commit is contained in:
commit
ae1ea9f199
453 files changed
+69628
-13654
No files matched your search
+79
-39
@@ -42,22 +42,15 @@ jobs:
|
||||
set -euo pipefail
|
||||
sudo apt-get update
|
||||
# llvm: llvm-dis; spirv-tools: spirv-val + the product passthrough path's spirv-as.
|
||||
# lavapipe is the CPU Vulkan ICD for the `m2v_cpu_icd` execution tests and the explicit
|
||||
# `corpus-vulkan --device-type cpu` qualification on GPU-less Linux runners.
|
||||
# vulkan-validationlayers: every engine candidate and L4 run enables
|
||||
# VK_LAYER_KHRONOS_validation and refuses to run without it.
|
||||
sudo apt-get install -y llvm spirv-tools mesa-vulkan-drivers libvulkan1 vulkan-validationlayers
|
||||
# libvulkan1 is the loader alone: this host has no Vulkan driver, and the steps that run
|
||||
# on one (lavapipe) run in the lavapipe image below.
|
||||
sudo apt-get install -y llvm spirv-tools libvulkan1
|
||||
command -v llvm-dis
|
||||
command -v spirv-val
|
||||
command -v spirv-as
|
||||
# Ubuntu's llvm is the oldest LLVM the committed `.ll` fixtures are written for:
|
||||
# here the validation test that each assembles with it must run, not skip.
|
||||
echo "METAL2VULKAN_TEST_REQUIRE_PINNED_LLVM=1" >> "$GITHUB_ENV"
|
||||
# Fail setup early if the CPU-ICD steps would have no ICD.
|
||||
shopt -s nullglob
|
||||
icds=(/usr/share/vulkan/icd.d/*.json /etc/vulkan/icd.d/*.json)
|
||||
echo "Vulkan ICDs: ${icds[*]:-none}"
|
||||
test "${#icds[@]}" -gt 0
|
||||
|
||||
- name: Install LLVM + SPIR-V tools (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
@@ -167,6 +160,9 @@ jobs:
|
||||
- name: Private intra-doc links (no new breakage)
|
||||
env:
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
# The count below reads lines that begin `error: `. Under the workflow's
|
||||
# CARGO_TERM_COLOR=always each one begins with a colour code instead, so it counted none.
|
||||
CARGO_TERM_COLOR: never
|
||||
run: |
|
||||
set -euo pipefail
|
||||
log="$RUNNER_TEMP/private-doc-links.log"
|
||||
@@ -208,61 +204,105 @@ jobs:
|
||||
run: cargo package --workspace --exclude metal2vulkan-validation --exclude metal2vulkan-conformance --exclude metal2vulkan-devtools --exclude metal2vulkan-harness
|
||||
|
||||
# With the AIR front end's crate's own tests, and the dev-tools crate's:
|
||||
# its tool runner and L3 checks.
|
||||
# its tool runner and L3 checks. Every suite here runs to its end (--no-fail-fast), so one
|
||||
# red test does not hide the tests after it; the step's verdict is the same.
|
||||
- name: Test metal2vulkan
|
||||
run: cargo nextest run -p metal2vulkan -p metal2vulkan-air -p metal2vulkan-runtime -p metal2vulkan-devtools -p metal2vulkan-harness --all-features
|
||||
run: cargo nextest run --no-fail-fast -p metal2vulkan -p metal2vulkan-air -p metal2vulkan-runtime -p metal2vulkan-devtools -p metal2vulkan-harness --all-features
|
||||
|
||||
# GPU-free on every host: tests that open a device compile only under `--cfg m2v_gpu` or
|
||||
# `--cfg m2v_cpu_icd`, and no device-opening code runs without one of them.
|
||||
- name: Test validation suite
|
||||
run: cargo nextest run -p metal2vulkan-validation --all-features
|
||||
run: cargo nextest run --no-fail-fast -p metal2vulkan-validation --all-features
|
||||
|
||||
# The conformance suite's own machinery, with no device: a stub side stands in for a GPU, so
|
||||
# the transcript, the comparison, the justification rule, the verdicts, the recordings'
|
||||
# staleness and the report are all checked on every host.
|
||||
- name: Test the conformance suite
|
||||
run: cargo nextest run -p metal2vulkan-conformance --all-features
|
||||
run: cargo nextest run --no-fail-fast -p metal2vulkan-conformance --all-features
|
||||
|
||||
# nextest does not run doctests.
|
||||
- name: Doc tests
|
||||
run: cargo test --workspace --all-features --doc
|
||||
|
||||
# Device-executing validation tests, and the runtime's floor check, on lavapipe.
|
||||
# `DeviceType::Cpu` matches only a CPU physical device, and the runtime's device tests under
|
||||
# `m2v_cpu_icd` check only CPU devices, so this never reaches a GPU even on a runner that has
|
||||
# one. macOS CI runs no device tests.
|
||||
# The steps below that execute on a device run on lavapipe in the lavapipe image, and
|
||||
# nowhere else: Arch Linux's packages of one Arch Linux Archive date, which
|
||||
# scripts/lavapipe-image/pin pins with the bootstrap tarball's sha256, carrying the Mesa and
|
||||
# LLVM the conformance ledger's llvmpipe rows hold on (its `# llvmpipe:` line). The image's
|
||||
# downloads are cached keyed on the pin (its tarball's sha256, its date and its packages'
|
||||
# versions), and saved as soon as the build has them, so a run whose pin has not moved
|
||||
# downloads nothing, whatever the later steps answer.
|
||||
- name: Restore the lavapipe image's downloads (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
id: lavapipe-downloads
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.cache/m2v-lavapipe-image
|
||||
key: lavapipe-image-${{ hashFiles('scripts/lavapipe-image/pin') }}
|
||||
|
||||
# Prints the image's pin, its packages, its device's name and driver, and whether its
|
||||
# containers get /dev/udmabuf, and fails where the image differs from the pin or from the
|
||||
# ledger's `# llvmpipe:` line. A fetch that fails ends this step with the URL it failed on,
|
||||
# before any test runs. The limit fits a cold fetch at the slowest rate measured from the
|
||||
# archive, one connection at 57 KB/s: the 127 MB tarball and 135 MB of databases and
|
||||
# packages, 262 MB, take 77 minutes there.
|
||||
- name: Build the lavapipe image (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
timeout-minutes: 90
|
||||
run: scripts/lavapipe-image/lavapipe-image ensure
|
||||
|
||||
- name: Save the lavapipe image's downloads (Linux)
|
||||
if: runner.os == 'Linux' && steps.lavapipe-downloads.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ~/.cache/m2v-lavapipe-image
|
||||
key: lavapipe-image-${{ hashFiles('scripts/lavapipe-image/pin') }}
|
||||
|
||||
# The device tests of validation and the runtime, and the runtime's floor check, on lavapipe.
|
||||
# They are the tests the `--cfg m2v_cpu_icd` build holds and the plain builds above do not: a
|
||||
# test that opens a device compiles only under that cfg. The plain builds' tests ran on this
|
||||
# host above, the `.ll` fixtures' test with Ubuntu's LLVM among them. The tests are built
|
||||
# here, on the host, and only run in the image. Where its containers get no /dev/udmabuf,
|
||||
# the tests scripts/lavapipe-image/needs-udmabuf names are skipped, each named in the log. `DeviceType::Cpu` matches only a CPU physical
|
||||
# device, and the runtime's device tests under `m2v_cpu_icd` check only CPU devices. macOS CI
|
||||
# runs no device tests.
|
||||
- name: Test validation suite and the runtime on the CPU Vulkan ICD (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
env:
|
||||
RUSTFLAGS: -Dwarnings --cfg m2v_cpu_icd
|
||||
LP_NUM_THREADS: "1"
|
||||
run: cargo nextest run -p metal2vulkan-validation -p metal2vulkan-runtime --all-features
|
||||
run: |
|
||||
set -euo pipefail
|
||||
out=$RUNNER_TEMP/cpu-icd
|
||||
mkdir -p "$out"
|
||||
cargo nextest list -p metal2vulkan -p metal2vulkan-air -p metal2vulkan-runtime -p metal2vulkan-devtools -p metal2vulkan-harness --all-features --message-format json > "$out/plain-1.json"
|
||||
cargo nextest list -p metal2vulkan-validation --all-features --message-format json > "$out/plain-2.json"
|
||||
export RUSTFLAGS='-Dwarnings --cfg m2v_cpu_icd'
|
||||
cargo nextest list -p metal2vulkan-validation -p metal2vulkan-runtime --all-features --message-format json > "$out/cpu-icd.json"
|
||||
cargo nextest archive -p metal2vulkan-validation -p metal2vulkan-runtime --all-features --archive-file "$out/cpu-icd.tar.zst"
|
||||
python3 -I scripts/lavapipe-image/only_in.py "$out/cpu-icd.json" "$out/plain-1.json" "$out/plain-2.json" > "$out/device-tests"
|
||||
echo "$(wc -l < "$out/device-tests") device tests"
|
||||
scripts/lavapipe-image/lavapipe-image nextest "$out/cpu-icd.tar.zst" "$out/device-tests" --no-fail-fast
|
||||
|
||||
# The conformance suite's replay leg on lavapipe: it reads the committed recordings, runs the
|
||||
# runtime side and compares, with no Metal present. Its exit status is 0 only where the run
|
||||
# holds no surprise: no unrecorded case, no stale recording, and exactly the gaps
|
||||
# crates/metal2vulkan-conformance/known-gaps-rt.tsv expects on this venue. A refusal or a
|
||||
# divergence that ledger does not list fails here, and so does a row it lists that the run no
|
||||
# longer holds, so closing a gap forces the ledger edit. A venue that lacks a feature a case
|
||||
# needs does not spoil it.
|
||||
# The conformance suite's replay leg on lavapipe, in the image: it reads the committed
|
||||
# recordings, runs the runtime side and compares, with no Metal present. Its exit status is 0
|
||||
# only where the run holds no surprise: no unrecorded case, no stale recording, and exactly
|
||||
# the gaps crates/metal2vulkan-conformance/known-gaps-rt.tsv expects on this venue. A refusal
|
||||
# or a divergence that ledger does not list fails here, and so does a row it lists that the
|
||||
# run no longer holds, so closing a gap forces the ledger edit. A venue that lacks a feature
|
||||
# a case needs does not spoil it. Where the image's containers get no /dev/udmabuf, the
|
||||
# cases scripts/lavapipe-image/needs-udmabuf names are left out, each named in the log.
|
||||
- name: Replay the conformance suite on the CPU Vulkan ICD (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
env:
|
||||
LP_NUM_THREADS: "1"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cargo build -p metal2vulkan-conformance --bin conformance
|
||||
target/debug/conformance replay --cpu
|
||||
scripts/lavapipe-image/lavapipe-image replay target/debug/conformance
|
||||
|
||||
# Machine-specific semantic qualification remains explicit. Linux CI has lavapipe, so it can
|
||||
# execute the owned public cases with the engine, in both robustness legs, against their
|
||||
# exact committed Metal observations without a physical GPU. Rows written here are ephemeral
|
||||
# CI evidence, not committed environment slots (see the script's header).
|
||||
# Machine-specific semantic qualification remains explicit. On lavapipe in the image, it
|
||||
# executes the owned public cases with the engine, in both robustness legs, against their
|
||||
# exact committed Metal observations without a physical GPU. Rows written here (in the
|
||||
# corpus, the one directory the image may write) are ephemeral CI evidence, not committed
|
||||
# environment slots (see the script's header).
|
||||
- name: Qualify public cases on native Vulkan (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
env:
|
||||
LP_NUM_THREADS: "1"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cargo build -p metal2vulkan-validation --bins
|
||||
bash scripts/qualify-public-cases target/debug
|
||||
scripts/lavapipe-image/lavapipe-image run --write crates/metal2vulkan-validation/corpus -- bash scripts/qualify-public-cases target/debug
|
||||
@@ -58,11 +58,13 @@ order, and a lower one never overrides a higher one.
|
||||
limit and memory-type queries. Product code holds no vendor, device or driver ID, and no
|
||||
runtime policy switch. A test enforces this for `metal2vulkan-runtime`. One form means one form per
|
||||
Vulkan capability: where the floor cannot require a feature, that feature's query may choose a
|
||||
second form, for twelve only: 16-bit floats, storage-image reads without a format, 64-bit
|
||||
second form, for fourteen only: 16-bit floats, storage-image reads without a format, 64-bit
|
||||
atomics, 64-bit floats, SIMD groups (the subgroup size range with its stages and operations,
|
||||
and maximal reconvergence), unified memory (decided by
|
||||
Vulkan's physical device type alone: one copy of a Managed buffer on an integrated or CPU
|
||||
device, two elsewhere), the attachment feedback loop (a device without it reads a render
|
||||
device, two elsewhere, and a texture over a host-pointer import in place on an integrated or
|
||||
CPU device, after one counted copy pair at its making, and through its per-use counted copy
|
||||
elsewhere), the attachment feedback loop (a device without it reads a render
|
||||
target through a counted copy of that target, recorded as a known gap), run-time texel
|
||||
offsets (a device with the maintenance8 feature takes a run-time texel offset as the sampling
|
||||
or read instruction's own operand; a device without it branches over the offset's values, and
|
||||
@@ -85,8 +87,27 @@ order, and a lower one never overrides a higher one.
|
||||
device without them reaches them at their device addresses with each access checked in the
|
||||
shader, and that check's cost is recorded as a known gap, as is the check that stays by
|
||||
structure on a slot a wide pointer, a typed atomic or the stage-in fetch reaches, on a slot
|
||||
bound below its argument's alignment, and on every render stage), and Shared memory's host
|
||||
coherence (decided by the host-coherent flag of the memory type
|
||||
bound below its argument's alignment, and on every render stage), mixed passes over a linear
|
||||
plane (ruled 12-02; a device whose linear tiling offers a plane's format as a colour attachment
|
||||
renders a surface plane in place in every pass; a device that offers it only where every
|
||||
colour attachment of the pass is linear (the linear-colour-attachment feature) renders a plane
|
||||
in place in a pass of planes alone, and in a pass that mixes a plane with an attachment that is
|
||||
not one (another colour, a depth or stencil, a resolve) renders it through an optimal image of
|
||||
the runtime's with a counted copy into the plane at the pass's end and, where its load action
|
||||
is Load, a counted copy in at its begin; those copies and that image's memory are recorded as a
|
||||
known gap), texture buffer formats (ruled 12-02; for each format, does the device serve it
|
||||
natively for every access a texture buffer makes, as a uniform texel buffer, as a storage texel
|
||||
buffer, and as a storage write without a format? A device that does makes a texture buffer of
|
||||
it the format's own view; where any of the three is missing, that format's texture buffer is
|
||||
held as words, an `R32_UINT` view whose texels shaders convert, one answer per format per
|
||||
device; on a device that holds any format so, a stage that reaches a texture buffer declares a
|
||||
stage constant, false by default, under which every word arm is dead code at pipeline creation,
|
||||
and each of its `VkPipeline`s has a words twin specialized with it true, made in the same make,
|
||||
which a draw or dispatch runs where a texture buffer held as words is bound at a slot its stage
|
||||
reaches or, for a stage that reaches one through a handle, while one lives on the device; the
|
||||
twins' second compile and memory, and the words' cost, 7.3 times the own view's GPU time for an
|
||||
`R8Unorm` texture buffer written on an RTX 3090, are recorded as a known gap), and Shared
|
||||
memory's host coherence (decided by the host-coherent flag of the memory type
|
||||
Shared takes, the first host-visible, host-cached type a buffer can use, a host-coherent one
|
||||
first: a device whose type has it makes no flush or invalidate call; on a device whose type is
|
||||
the cached type without coherence, the Shared memory a submission's command buffers and Managed
|
||||
@@ -101,9 +122,12 @@ order, and a lower one never overrides a higher one.
|
||||
layouts, direct addresses (for a compute function's buffer arguments, bound buffers where
|
||||
rule 2's query takes them), nothing copied that Metal would not copy. Optimal images have two
|
||||
exceptions. A texture over a Shared buffer: a linear image on that buffer's memory, in the
|
||||
device's own layout, created so its first use keeps the bytes, with the alignment the guest
|
||||
reads from Metal's minimum linear texture alignment, and where a format query offers no linear
|
||||
image for the format and usage, a counted copy at commit. A plane texture of an exported
|
||||
device's own layout, created so its first use keeps the bytes, and where that memory is a
|
||||
host-pointer import on an integrated or CPU device (rule 2's unified memory), whose images
|
||||
must start undefined, a counted copy pair at the texture's making restores the bytes,
|
||||
with the alignment the guest reads from Metal's minimum linear texture alignment, and where a
|
||||
format query offers no linear image for the format and usage, a counted copy at commit. A
|
||||
plane texture of an exported
|
||||
surface: a linear image on the surface's own exported memory, at the pitch and plane starts the
|
||||
surface's export states, and where the device offers no such image or cannot meet the layout
|
||||
the consumer asked for, the copy form of the same call, counted and recorded as a known gap.
|
||||
@@ -146,9 +170,13 @@ as a known gap.
|
||||
|
||||
- **Structure over names.** Decide lowering from IR structure (types, address spaces, access
|
||||
chains, AIR's metadata ABI), never from a function, type, variable or shader name. Dispatching on
|
||||
the stable `air.*` and `llvm.*` intrinsic families is allowed; prefer a structural test when one
|
||||
exists. A name-keyed branch that passes one shader while failing identically shaped others is a
|
||||
defect. No behavior keyed to an app, a shader hash or a corpus census.
|
||||
the stable `air.*` and `llvm.*` intrinsic families is allowed; the same holds for the bodiless
|
||||
runtime-library routines Metal's compiler links by symbol (the `___metal_*` maths routines and
|
||||
the `__tensorops_impl_*` family), where the declaration has no body and the symbol is the only
|
||||
thing that says what the routine is; an unknown member of such a family is a typed refusal.
|
||||
Prefer a structural test when one exists. A name-keyed branch that passes one shader while
|
||||
failing identically shaped others is a defect. No behavior keyed to an app, a shader hash or a
|
||||
corpus census.
|
||||
- **Honest FALLBACK.** Unsupported input returns a typed `Err` (the command line prints
|
||||
`FALLBACK`). Never emit wrong-but-valid SPIR-V to silence a gate.
|
||||
- **Scope.** The runtime has a floor: one Vulkan version plus a fixed extension list
|
||||
@@ -319,6 +347,12 @@ cargo test --workspace --all-features --doc
|
||||
(`scripts/api-docs`), packaging, the suites, doctests, and on Linux clippy of the published
|
||||
crates and devtools for `x86_64-pc-windows-gnullvm` and `x86_64-pc-windows-msvc`, the device
|
||||
tests and public case qualification on lavapipe.
|
||||
- On Linux, CI's steps that execute on a device (the `m2v_cpu_icd` device tests, the conformance
|
||||
replay and public case qualification) run on lavapipe in the image `scripts/lavapipe-image`
|
||||
builds from `scripts/lavapipe-image/pin` (the Arch Linux bootstrap tarball's sha256, one Arch
|
||||
Linux Archive date and each package's exact version), and when the conformance ledger's llvmpipe
|
||||
rows are re-recorded on another lavapipe, the pin and the ledger's `# llvmpipe:` line move in the
|
||||
same commit.
|
||||
|
||||
When chasing a hang, read the whole nextest output; do not pipe it through `head` or `grep`.
|
||||
|
||||
|
||||
@@ -68,6 +68,11 @@ limits only with `--cfg m2v_gpu_hazards` too ([docs/VALIDATION.md](docs/VALIDATI
|
||||
validation layer under `metal2vulkan-runtime`'s device tests"). On a machine that has no layer,
|
||||
`METAL2VULKAN_TEST_UNVALIDATED=1` runs them without it, and the run says so.
|
||||
|
||||
CI runs the device tests, the conformance replay and public case qualification on lavapipe in the
|
||||
container image `scripts/lavapipe-image` builds from one Arch Linux Archive date, pinned by
|
||||
`scripts/lavapipe-image/pin`, and re-recording the conformance ledger's llvmpipe rows on another
|
||||
lavapipe moves that pin and the ledger's `# llvmpipe:` line in the same commit.
|
||||
|
||||
To build the command:
|
||||
|
||||
```sh
|
||||
|
||||
@@ -27,7 +27,9 @@ What the translator promises:
|
||||
- **Typed refusals.** Input the device cannot run exactly fails with an error that names the Metal
|
||||
feature and what would make it work. It never returns a module that computes something else.
|
||||
- **Recorded differences.** Where a pipeline gives a near-equivalent of Metal's answer, its
|
||||
artifact records a precision note, and the runtime announces it once with a stable code.
|
||||
artifact records a precision note. The runtime records each state's notes when the state is
|
||||
made and exposes them, each with a stable code (`PrecisionNote::code`); the caller announces
|
||||
them.
|
||||
- **The GPU's native arithmetic.** Where the device has a native form (its maths, rounding,
|
||||
conversions and sampler), that form gives the answer, its difference from Metal's recorded.
|
||||
- **Bounded work.** Every compile runs under a deadline, a cancellation token and deterministic
|
||||
@@ -88,7 +90,13 @@ metal2vulkan kernel.ll kernel.spv --profile device.json --emit-meta kernel.json
|
||||
- Without `--function` it compiles the library's only kernel or vertex function. A kernel with
|
||||
`--color-format` compiles as a tile pipeline. A post-tessellation vertex function adds
|
||||
`.tesc.spv` and `.tese.spv` modules; on a device without `tessellationShader` it answers
|
||||
`FALLBACK`, naming the feature.
|
||||
`FALLBACK`, naming the feature. `--tessellation FILE` sets its tessellation state (the JSON form
|
||||
of `TessellationDescriptor`: its maximum factor, partition mode, factor format, step function,
|
||||
winding, control-point index type and factor scale, for example
|
||||
`{"max_tessellation_factor": 64, "partition_mode": "Pow2", "factor_format": "Half",
|
||||
"factor_step_function": "Constant", "output_winding_order": "CounterClockwise",
|
||||
"control_point_index_type": "UInt32", "factor_scale_enabled": false}`); without it the pipeline
|
||||
has no tessellation state of its own, which is Metal's default state.
|
||||
- A vertex function that returns no value, with no `--fragment`, compiles with rasterization
|
||||
disabled, the one pipeline Metal makes of it.
|
||||
- A compile that needs a pipeline input fails naming it and the option that supplies it:
|
||||
|
||||
@@ -1711,6 +1711,72 @@ fn a_public_fixture_survives_mutation() {
|
||||
mutate(stream_of(&bytes));
|
||||
}
|
||||
|
||||
/// Metal's runtime routines are taken by their symbol only on a declaration, which has no body to
|
||||
/// say what it is: a module that declares `___metal_frexp_float_pthreadint32` calls the math
|
||||
/// family's `frexp`, and one that defines a function of that name calls its own definition.
|
||||
#[test]
|
||||
fn a_defined_function_named_as_a_runtime_routine_is_the_modules_own() {
|
||||
let Some(tool) = llvm_as() else {
|
||||
eprintln!("SKIP a_defined_function_named_as_a_runtime_routine_is_the_modules_own: llvm-as not found");
|
||||
return;
|
||||
};
|
||||
let scratch = Scratch::new();
|
||||
let kernel = "define void @k(ptr addrspace(1) %out) {\n %e = alloca i32\n %r = call float @___metal_frexp_float_pthreadint32(float 1.0, ptr %e)\n store float %r, ptr addrspace(1) %out\n ret void\n}\n";
|
||||
let decoded = |routine: &str, stem: &str| -> ModuleTables {
|
||||
let ll = scratch.0.join(format!("{stem}.ll"));
|
||||
std::fs::write(&ll, format!("{routine}\n{kernel}")).unwrap();
|
||||
let out = scratch.0.join(format!("{stem}.bc"));
|
||||
let bytes = assemble(&tool, &[ll.as_os_str()], &out)
|
||||
.unwrap_or_else(|| panic!("llvm-as rejected the {stem} module"));
|
||||
decode(stream_of(&bytes)).unwrap_or_else(|e| panic!("{stem}: {e}"))
|
||||
};
|
||||
let callee = |t: &ModuleTables| -> crate::ir::Callee {
|
||||
let p = &t.parts;
|
||||
let k = p
|
||||
.funcs
|
||||
.values()
|
||||
.find(|f| p.symbols.get(f.name) == Some(&b"k"[..]))
|
||||
.expect("the kernel");
|
||||
let body = k.body.as_ref().expect("the kernel's body");
|
||||
body.insts
|
||||
.values()
|
||||
.find_map(|i| match &i.kind {
|
||||
crate::ir::InstKind::Call(c) => Some(c.callee.clone()),
|
||||
_ => None,
|
||||
})
|
||||
.expect("the kernel's call")
|
||||
};
|
||||
let declared = decoded(
|
||||
"declare float @___metal_frexp_float_pthreadint32(float, ptr)",
|
||||
"declared",
|
||||
);
|
||||
let c = callee(&declared);
|
||||
assert!(
|
||||
matches!(
|
||||
&c,
|
||||
crate::ir::Callee::Air {
|
||||
op: crate::intrinsics::AirIntrinsic::Math(m),
|
||||
..
|
||||
} if m.f == crate::intrinsics::MathFn::Frexp
|
||||
),
|
||||
"{c:?}"
|
||||
);
|
||||
let defined = decoded(
|
||||
"define float @___metal_frexp_float_pthreadint32(float %x, ptr %e) {\n store i32 9, ptr %e\n ret float 2.5\n}",
|
||||
"defined",
|
||||
);
|
||||
let c = callee(&defined);
|
||||
let crate::ir::Callee::Direct(f) = c else {
|
||||
panic!("{c:?}");
|
||||
};
|
||||
let f = defined.parts.funcs.get(f).expect("the callee");
|
||||
assert!(f.body.is_some(), "the callee is the module's definition");
|
||||
assert_eq!(
|
||||
defined.parts.symbols.get(f.name),
|
||||
Some(&b"___metal_frexp_float_pthreadint32"[..])
|
||||
);
|
||||
}
|
||||
|
||||
/// Whether `xcrun metal-as` exists. Tests that need it skip visibly when it does not, and fail
|
||||
/// when it exists but rejects a committed fixture.
|
||||
fn have_metal_as() -> bool {
|
||||
|
||||
@@ -806,7 +806,8 @@ pub fn specialize_dynamic(
|
||||
// The AIR 2.7 simdgroup-matrix block loads and stores in their AIR 2.8 form.
|
||||
let body = legacy_matrix::expand(body, &mut parts, m)?;
|
||||
// Metal runtime routines: each `frexp` and `ilogb` call becomes the routine's measured answer
|
||||
// in plain AIR.
|
||||
// in plain AIR, each OpenCL C `mad` call its multiply and addition, and each `mul24` and
|
||||
// `mad24` call the 32-bit product of its operands' low 24 bits (and the addition).
|
||||
let body = routine::expand(body, &mut parts, m)?;
|
||||
// Aggregate loads and stores of buffer and threadgroup memory as their members' accesses.
|
||||
let body = aggregates::expand(body, &mut parts, func, m)?;
|
||||
@@ -1488,6 +1489,10 @@ fn post_check(
|
||||
.and_then(|f| parts.symbols.get(f.name))
|
||||
.unwrap_or(b"?")
|
||||
};
|
||||
let section = |f: FuncId| match parts.funcs.get(f).and_then(|f| f.section) {
|
||||
Some(crate::ir::Section::Other(s)) => parts.symbols.get(s),
|
||||
_ => None,
|
||||
};
|
||||
let diag = |bytes: &[u8]| DiagName::new(String::from_utf8_lossy(bytes));
|
||||
// A call to the declaration `f` this module does not define.
|
||||
let undefined =
|
||||
@@ -1503,9 +1508,22 @@ fn post_check(
|
||||
Some(Stub::Resolved { .. }) => {
|
||||
Err(invariant("a call to a resolved stub survived linking"))
|
||||
}
|
||||
// A dynamic-library import, or a declaration no library can define.
|
||||
// A dynamic-library import, or a declaration no library can define: an
|
||||
// unknown member of a family of Metal's runtime-library routines, which
|
||||
// Metal supplies, is refused as its family, and any other needs linking.
|
||||
None => match stubs.import_refusal(Item::Func(f), symbol(f)) {
|
||||
Some(e) => Err(e),
|
||||
None if intrinsics::is_routine_family(symbol(f)) => {
|
||||
let kind =
|
||||
InputErrorKind::Intrinsic(IntrinsicError::UnknownIntrinsic {
|
||||
name: diag(symbol(f)),
|
||||
});
|
||||
Err(InputError::new(kind, at.clone()).into())
|
||||
}
|
||||
None if crate::tensor_ops::in_family(symbol(f), section(f)) => {
|
||||
Ok(Unsupported::not_implemented(Feature::Tensors)
|
||||
.naming(diag(symbol(f))))
|
||||
}
|
||||
None => Ok(Unsupported::not_implemented(Feature::Linking)
|
||||
.naming(diag(symbol(f)))),
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Metal runtime routines as plain AIR.
|
||||
//! Metal runtime routines, OpenCL C's `mad`, and `mul24` and `mad24`, as plain AIR.
|
||||
//!
|
||||
//! Apple's compiler emits MSL's `frexp` and `ilogb` as calls to routines its backend defines at
|
||||
//! pipeline creation, `___metal_frexp_<T>_pthread<I>(T x, thread I *e)` and
|
||||
@@ -30,10 +30,25 @@
|
||||
//!
|
||||
//! Runtime-compiled source keeps `float` denormals (`frexp(0x1p-149) = (0.5, -148)`): what it
|
||||
//! compiles to is not this routine, which AIR the translator receives calls by name.
|
||||
//!
|
||||
//! **OpenCL C's `mad`.** [`expand`] also replaces each `air.mad` call ([`MathFn::Mad`]) by its
|
||||
//! product, an `fmul` of `a` and `b`, and the `fadd` of that product and `c`, in `T`'s shape and
|
||||
//! with no fast-math flags, whatever the call's own: each is rounded on its own and neither is
|
||||
//! fused, as the M3 Max answers `mad` (`intrinsics::math`'s module doc). Lowering takes them as it
|
||||
//! takes any such pair.
|
||||
//!
|
||||
//! **`mul24` and `mad24`.** [`expand`] replaces each `air.mul24` and `air.mad24` call
|
||||
//! ([`MathFn::Mul24`], [`MathFn::Mad24`]) by the 32-bit `mul` of its operands' low 24 bits, each
|
||||
//! zero-extended (`and` with `0xffffff`) for `u` or sign-extended (`shl` and then `ashr` by 8) for
|
||||
//! `s`, and for `mad24` the 32-bit `add` of that product and `c`, in `T`'s shape, each wrapping (no
|
||||
//! `nsw` or `nuw`). That is the specification's wording, "only the low 24 bits perform the
|
||||
//! multiplication" (MSL section 6.4, Table 6.2), and the M3 Max's answer for every operand
|
||||
//! measured, inside the range where the specification defines the product and outside it
|
||||
//! (`intrinsics::math`'s module doc).
|
||||
|
||||
use crate::budget::Meter;
|
||||
use crate::error::Error;
|
||||
use crate::intrinsics::{AirIntrinsic, Elem, Math, MathFn};
|
||||
use crate::intrinsics::{AirIntrinsic, Elem, Math, MathFn, Sign};
|
||||
use crate::ir::{
|
||||
BinOp, Block, Body, Call, Callee, CastOp, Const, FastMath, Idx, Inst, InstId, InstKind,
|
||||
IntFlags, IntPredicate, ModuleParts, Type, TypeId, Value,
|
||||
@@ -41,10 +56,36 @@ use crate::ir::{
|
||||
|
||||
use super::rewrite::invariant;
|
||||
|
||||
/// What a call [`expand`] replaces computes.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
enum Kind {
|
||||
Frexp,
|
||||
Ilogb,
|
||||
Mad,
|
||||
/// `mul24`, `signed` for `s`.
|
||||
Mul24 {
|
||||
signed: bool,
|
||||
},
|
||||
/// `mad24`, `signed` for `s`.
|
||||
Mad24 {
|
||||
signed: bool,
|
||||
},
|
||||
}
|
||||
|
||||
impl Kind {
|
||||
/// The call's operand count.
|
||||
fn arity(self) -> usize {
|
||||
match self {
|
||||
Kind::Frexp | Kind::Ilogb | Kind::Mul24 { .. } => 2,
|
||||
Kind::Mad | Kind::Mad24 { .. } => 3,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The routine a call is, and its value type's lanes and element.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
struct Routine {
|
||||
frexp: bool,
|
||||
kind: Kind,
|
||||
half: bool,
|
||||
lanes: u32,
|
||||
}
|
||||
@@ -61,19 +102,28 @@ fn routine(kind: &InstKind) -> Option<(Routine, &Call)> {
|
||||
else {
|
||||
return None;
|
||||
};
|
||||
let frexp = match f {
|
||||
MathFn::Frexp => true,
|
||||
MathFn::Ilogb => false,
|
||||
let kind = match f {
|
||||
MathFn::Frexp => Kind::Frexp,
|
||||
MathFn::Ilogb => Kind::Ilogb,
|
||||
MathFn::Mad => Kind::Mad,
|
||||
MathFn::Mul24(s) => Kind::Mul24 {
|
||||
signed: s == Sign::Signed,
|
||||
},
|
||||
MathFn::Mad24(s) => Kind::Mad24 {
|
||||
signed: s == Sign::Signed,
|
||||
},
|
||||
_ => return None,
|
||||
};
|
||||
let half = match ty.elem {
|
||||
Elem::F16 => true,
|
||||
Elem::F32 => false,
|
||||
let half = match (kind, ty.elem) {
|
||||
(Kind::Mul24 { .. } | Kind::Mad24 { .. }, Elem::I32) => false,
|
||||
(Kind::Mul24 { .. } | Kind::Mad24 { .. }, _) => return None,
|
||||
(_, Elem::F16) => true,
|
||||
(_, Elem::F32) => false,
|
||||
_ => return None,
|
||||
};
|
||||
Some((
|
||||
Routine {
|
||||
frexp,
|
||||
kind,
|
||||
half,
|
||||
lanes: ty.lanes,
|
||||
},
|
||||
@@ -267,12 +317,72 @@ impl Sink<'_> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `mad(a, b, c)`: the product, then the sum, each with no fast-math flags; the last
|
||||
/// instruction is the sum.
|
||||
fn mad(&mut self, r: Routine, [a, b, c]: [Value; 3], m: &mut Meter) -> Result<(), Error> {
|
||||
let ty = self.shaped(if r.half { Type::Half } else { Type::Float }, m)?;
|
||||
let product = self.push(
|
||||
ty,
|
||||
InstKind::BinOp {
|
||||
op: BinOp::FMul,
|
||||
flags: IntFlags::NONE,
|
||||
fmf: FastMath::NONE,
|
||||
a,
|
||||
b,
|
||||
},
|
||||
m,
|
||||
)?;
|
||||
self.push(
|
||||
ty,
|
||||
InstKind::BinOp {
|
||||
op: BinOp::FAdd,
|
||||
flags: IntFlags::NONE,
|
||||
fmf: FastMath::NONE,
|
||||
a: product,
|
||||
b: c,
|
||||
},
|
||||
m,
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `x`'s low 24 bits as an `i32`: zero-extended, or sign-extended where `signed`.
|
||||
fn low24(&mut self, x: Value, signed: bool, m: &mut Meter) -> Result<Value, Error> {
|
||||
if !signed {
|
||||
return self.bin_k(BinOp::And, x, 0x00ff_ffff, m);
|
||||
}
|
||||
let high = self.bin_k(BinOp::Shl, x, 8, m)?;
|
||||
self.bin_k(BinOp::AShr, high, 8, m)
|
||||
}
|
||||
|
||||
/// `mul24(a, b)`, and `mad24(a, b, c)` where `c` is given: the 32-bit product of the
|
||||
/// operands' low 24 bits, then its 32-bit sum with `c`, each wrapping; the last instruction is
|
||||
/// the result (the module docs).
|
||||
fn int24(
|
||||
&mut self,
|
||||
signed: bool,
|
||||
[a, b]: [Value; 2],
|
||||
c: Option<Value>,
|
||||
m: &mut Meter,
|
||||
) -> Result<(), Error> {
|
||||
let a = self.low24(a, signed, m)?;
|
||||
let b = self.low24(b, signed, m)?;
|
||||
let product = self.bin(BinOp::Mul, a, b, m)?;
|
||||
if let Some(c) = c {
|
||||
self.bin(BinOp::Add, product, c, m)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The instructions of call `r` with operands `args`; the last is the call's result.
|
||||
fn emit(&mut self, r: Routine, args: &[Value], m: &mut Meter) -> Result<(), Error> {
|
||||
match (r.frexp, args) {
|
||||
(true, [x, p]) => self.frexp(r, *x, *p, m),
|
||||
(false, [x, _mode]) => self.ilogb(r, *x, m),
|
||||
_ => Err(invariant("a runtime routine's call without its operands")),
|
||||
match (r.kind, args) {
|
||||
(Kind::Frexp, [x, p]) => self.frexp(r, *x, *p, m),
|
||||
(Kind::Ilogb, [x, _mode]) => self.ilogb(r, *x, m),
|
||||
(Kind::Mad, [a, b, c]) => self.mad(r, [*a, *b, *c], m),
|
||||
(Kind::Mul24 { signed }, [a, b]) => self.int24(signed, [*a, *b], None, m),
|
||||
(Kind::Mad24 { signed }, [a, b, c]) => self.int24(signed, [*a, *b], Some(*c), m),
|
||||
_ => Err(invariant("a replaced call without its operands")),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,14 +395,18 @@ fn routine_len(r: Routine, parts: &mut ModuleParts, m: &mut Meter) -> Result<u32
|
||||
parts,
|
||||
lanes: r.lanes,
|
||||
};
|
||||
let any = Value::Inst(InstId::new(0));
|
||||
s.emit(r, &[any, any], m)?;
|
||||
let any = [Value::Inst(InstId::new(0)); 3];
|
||||
let args = any
|
||||
.get(..r.kind.arity())
|
||||
.ok_or_else(|| invariant("a routine of more operands than three"))?;
|
||||
s.emit(r, args, m)?;
|
||||
let len = scratch.insts.len();
|
||||
scratch.release(m);
|
||||
u32::try_from(len).map_err(|_| invariant("routine length"))
|
||||
}
|
||||
|
||||
/// Replace every `frexp` and `ilogb` routine call of `body` by its answer (the module docs).
|
||||
/// Replace every `frexp` and `ilogb` routine call and every `mad`, `mul24` and `mad24` call of
|
||||
/// `body` by its answer (the module docs).
|
||||
pub(super) fn expand(body: Body, parts: &mut ModuleParts, m: &mut Meter) -> Result<Body, Error> {
|
||||
if !body.insts.iter().any(|(_, i)| routine(&i.kind).is_some()) {
|
||||
return Ok(body);
|
||||
|
||||
@@ -3476,7 +3476,8 @@ fn surviving_calls_are_refused_by_family_naming_the_callee() {
|
||||
assert_eq!(u.location, Some(at.clone()));
|
||||
assert_eq!(u.symbol, Some(DiagName::new("air.some_future_op")));
|
||||
|
||||
// An undefined external function (the shape of the tensor-ops library calls) needs linking.
|
||||
// An undefined external function needs linking, one named as the tensor-ops library's included
|
||||
// where it is not in that library's section, `air.externally_defined`.
|
||||
let u = refusal(specialize_call(|m, fty| {
|
||||
Callee::Direct(m.declare("__tensorops_impl_matmul2d_op_cooperative_tensor_init", fty))
|
||||
}));
|
||||
@@ -3502,6 +3503,73 @@ fn surviving_calls_are_refused_by_family_naming_the_callee() {
|
||||
assert_eq!(u.symbol, None);
|
||||
}
|
||||
|
||||
/// Marks `d` as declared in `air.externally_defined`, the tensor-ops library's section.
|
||||
fn externally_defined(m: &mut ModuleBuilder, d: FuncId) {
|
||||
let s = m.sym("air.externally_defined");
|
||||
m.func_mut(d).unwrap().section = Some(Section::Other(s));
|
||||
}
|
||||
|
||||
/// A body-less declaration of a family of Metal's runtime-library routines that nothing models is
|
||||
/// refused at its call as its family, naming it: a `___metal_*` routine the math family does not
|
||||
/// model is an unknown intrinsic, and a `__tensorops_impl_*` function in `air.externally_defined`
|
||||
/// outside the `matmul2d` ABI is tensors, as an unmodeled function of that ABI is (the `matmul2d`
|
||||
/// lowering's refusal). Outside the section a `__tensorops_impl_*` name is no member, and needs
|
||||
/// linking like any other undefined function.
|
||||
#[test]
|
||||
fn an_unknown_runtime_library_routine_is_refused_as_its_family() {
|
||||
let at = Location::function(DiagName::new("k"), Some(0), Some(0));
|
||||
let declared = |name: &'static str, external: bool| {
|
||||
refusal(specialize_call(move |m, fty| {
|
||||
let d = m.declare(name, fty);
|
||||
if external {
|
||||
externally_defined(m, d);
|
||||
}
|
||||
Callee::Direct(d)
|
||||
}))
|
||||
};
|
||||
for (name, external, feature) in [
|
||||
("___metal_ldexp_float", false, Feature::UnknownIntrinsic),
|
||||
(
|
||||
"___metal_frexp_float_pthreadv2int32",
|
||||
false,
|
||||
Feature::UnknownIntrinsic,
|
||||
),
|
||||
("__tensorops_impl_conv2d_op_run", true, Feature::Tensors),
|
||||
("__tensorops_impl_conv2d_op_run", false, Feature::Linking),
|
||||
] {
|
||||
let u = declared(name, external);
|
||||
assert_eq!(u.feature, feature, "{name} external {external}");
|
||||
assert_eq!(u.location, Some(at.clone()), "{name}");
|
||||
assert_eq!(u.symbol, Some(DiagName::new(name)), "{name}");
|
||||
}
|
||||
let u = declared("__tensorops_impl_matmul2d_op_cooperative_tensor_copy", true);
|
||||
assert_eq!(u.feature, Feature::Tensors);
|
||||
assert_eq!(u.location, Some(at));
|
||||
}
|
||||
|
||||
/// A function of the tensor-ops library is taken by its symbol only where the module declares it
|
||||
/// without a body: one the module defines under the same name, in the same section, is the
|
||||
/// module's own and is inlined like any other, where the body-less declaration is the `matmul2d`
|
||||
/// ABI's (here refused as tensors, called without its operands).
|
||||
#[test]
|
||||
fn a_defined_function_named_as_a_tensor_op_is_the_modules_own() {
|
||||
let name = "__tensorops_impl_matmul2d_op_cooperative_tensor_init";
|
||||
let u = refusal(specialize_call(|m, fty| {
|
||||
let d = m.declare(name, fty);
|
||||
externally_defined(m, d);
|
||||
Callee::Direct(d)
|
||||
}));
|
||||
assert_eq!(u.feature, Feature::Tensors);
|
||||
let defined = specialize_call(|m, fty| {
|
||||
let mut f = m.define(name, fty);
|
||||
f.ret(None);
|
||||
let d = f.finish();
|
||||
externally_defined(m, d);
|
||||
Callee::Direct(d)
|
||||
});
|
||||
assert!(defined.is_ok(), "{:?}", defined.err());
|
||||
}
|
||||
|
||||
/// The decoder keeps a call through a function's own constant address indirect when the call's
|
||||
/// function type is not the function's. Such a call is classified by that function, not as a
|
||||
/// dynamic call: a defined function whose parameters cannot receive the call's arguments is invalid
|
||||
|
||||
@@ -1101,16 +1101,28 @@ fn committed_air_fixtures_parse_and_link() {
|
||||
return;
|
||||
}
|
||||
let out = std::env::temp_dir().join(format!("m2v-container-{}.metallib", std::process::id()));
|
||||
let status = std::process::Command::new("xcrun")
|
||||
let linked = std::process::Command::new("xcrun")
|
||||
.args(["-sdk", "macosx", "metallib"])
|
||||
.args(&airs)
|
||||
.arg("-o")
|
||||
.arg(&out)
|
||||
.status()
|
||||
.output()
|
||||
.unwrap();
|
||||
let bytes = std::fs::read(&out);
|
||||
let _ = std::fs::remove_file(&out);
|
||||
assert!(status.success());
|
||||
let stderr = String::from_utf8_lossy(&linked.stderr);
|
||||
// The fixtures are compiled by the SDK `scripts/regen-air-fixtures` ran on; an older SDK's
|
||||
// linker refuses their newer AIR version ("air version set to 2.9.0 ..., but expecting 2.8").
|
||||
// That linker cannot link them at all, so the half that compares with Apple's link is skipped
|
||||
// there; the parse half above has run.
|
||||
if !linked.status.success()
|
||||
&& stderr.contains("air version set to")
|
||||
&& stderr.contains("but expecting")
|
||||
{
|
||||
eprintln!("SKIPPED metallib half: this SDK's metallib links an older AIR version than the fixtures': {}", stderr.trim());
|
||||
return;
|
||||
}
|
||||
assert!(linked.status.success(), "xcrun metallib: {stderr}");
|
||||
let bytes = bytes.unwrap();
|
||||
let lib = metallib(&bytes);
|
||||
assert_eq!(lib.functions.len(), entries);
|
||||
|
||||
@@ -789,6 +789,11 @@ const OBSERVED: &[(&str, &str)] = &[
|
||||
("air.native_exp10.v3f32", "v3f32 (v3f32)"),
|
||||
("air.half_cos.v4f32", "v4f32 (v4f32)"),
|
||||
("air.half_powr.v4f32", "v4f32 (v4f32, v4f32)"),
|
||||
// OpenCL C's `mad(a, b, c)` of `float`, `float4` and `half` (Apple's OpenCL compiler in Metal's
|
||||
// OpenCL mode, macOS 27.0.1, AIR 2.9).
|
||||
("air.mad.f32", "f32 (f32, f32, f32)"),
|
||||
("air.mad.v4f32", "v4f32 (v4f32, v4f32, v4f32)"),
|
||||
("air.mad.f16", "f16 (f16, f16, f16)"),
|
||||
// OpenCL C's vector data functions (the same compilers).
|
||||
("air.vload.global.v3i32", "v3i32 (i64, p1)"),
|
||||
("air.vload.constant.v16i8", "v16i8 (i64, p2)"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! The math family: `air.[fast_]<function>[.<s|u>].<type>`, and OpenCL C's
|
||||
//! `air.{native,half}_<function>.<type>`.
|
||||
//! `air.{native,half}_<function>.<type>` and `air.mad.<type>`.
|
||||
//!
|
||||
//! One declarative table ([`TABLE`]) lists every function stem with its domain and operand
|
||||
//! shape. A float function takes an optional `fast_` prefix and no sign token; a sign-sensitive
|
||||
@@ -15,6 +15,27 @@
|
||||
//! 27.0.1) and `0x1.4p+3` on a Radeon Pro 5300M (macOS 26.7.1). Each reads as the function at
|
||||
//! [`Precision::Fast`], the device's fast form.
|
||||
//!
|
||||
//! It spells OpenCL C's `mad(a, b, c)` `air.mad.<type>`, `T (T, T, T)`, for the types
|
||||
//! [`MAD_TYPES`] lists: `float`, `float4` and `half`, measured over our own kernels in Metal's
|
||||
//! OpenCL mode (`newLibraryWithSource` with `sourceLanguage` 1, macOS 27.0.1, AIR 2.9; `fma` is
|
||||
//! `air.fma`). OpenCL C leaves how `mad` rounds its product to the implementation; the M3 Max's GPU
|
||||
//! rounds the product and then the sum, run through the OpenCL framework (macOS 27.0.1): at
|
||||
//! `a = b = 1 + 2^-12`, `c = -(1 + 2^-11)` `mad` answers 0 where `fma` answers `2^-24`, on `float`
|
||||
//! and on each lane of `float4`, and of `half` at `a = b = 1 + 2^-6`, `c = -(1 + 2^-5)` 0 where
|
||||
//! `fma` answers `2^-12`. It reads as [`MathFn::Mad`], that multiply and addition.
|
||||
//!
|
||||
//! MSL's and OpenCL C's `mul24` and `mad24` of a 32-bit `int` or `uint` (MSL section 6.4,
|
||||
//! Table 6.2) are `air.mul24.<s|u>.<T>(T, T)` and `air.mad24.<s|u>.<T>(T, T, T)`, `T` `i32` or a
|
||||
//! vector of it; Apple's compiler spells MSL's at 1 to 4 lanes (MSL on macOS reserves the 8- and
|
||||
//! 16-lane types). The specification multiplies "only the low 24 bits" of the two 32-bit operands
|
||||
//! and returns "the 32-bit integer result", and calls the product implementation-defined for
|
||||
//! operands outside `[0, 2^24 - 1]` unsigned and `[-2^23, 2^23 - 1]` signed. The M3 Max (macOS
|
||||
//! 27.0.1) answers outside that range too as the product of the operands' low 24 bits, zero-extended
|
||||
//! for `u` and sign-extended for `s`, the 32-bit sum with `z` for `mad24` (validation cases
|
||||
//! `int24-products-in-range` and `int24-products-outside-24-bits`). They read as [`MathFn::Mul24`]
|
||||
//! and [`MathFn::Mad24`], which canonicalization replaces by that product in plain AIR. A width
|
||||
//! other than 32 bits stays undecoded.
|
||||
//!
|
||||
//! Two functions reach AIR as calls to Metal runtime routines instead, declarations Apple's
|
||||
//! compiler emits and its backend defines at pipeline creation: `frexp` as
|
||||
//! `___metal_frexp_<T>_pthread<I>(T, thread I*)` (AIR 2.9 spells the same operation
|
||||
@@ -48,6 +69,17 @@ pub(super) const OPENCL_STEMS: &[&str] = &[
|
||||
"cos", "exp", "exp10", "exp2", "log", "log10", "log2", "powr", "rsqrt", "sin", "sqrt", "tan",
|
||||
];
|
||||
|
||||
/// The types of OpenCL C's `mad` that Apple's OpenCL compiler is measured to spell, as
|
||||
/// `air.mad.<type>`: `float`, `float4` and `half` (module doc). Any other type stays undecoded.
|
||||
pub(super) const MAD_TYPES: &[NumTy] = &[
|
||||
NumTy::scalar(Elem::F32),
|
||||
NumTy {
|
||||
elem: Elem::F32,
|
||||
lanes: 4,
|
||||
},
|
||||
NumTy::scalar(Elem::F16),
|
||||
];
|
||||
|
||||
/// A math function. Integer functions whose result depends on signedness carry the [`Sign`] the
|
||||
/// name spells; `Clz`/`Ctz` carry their `is_zero_undef` immediate.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
@@ -137,6 +169,11 @@ pub enum MathFn {
|
||||
// Float, three operands.
|
||||
/// `air.fma`: `a * b + c`, rounded once.
|
||||
Fma,
|
||||
/// `air.mad`: OpenCL C's `mad(a, b, c)`, `a * b + c` rounded twice, the product and then the
|
||||
/// sum, as the M3 Max answers it; spelled for `float`, `float4` and `half` alone, as Apple's
|
||||
/// OpenCL compiler is measured to spell it. Canonicalization replaces each call by that
|
||||
/// multiply and addition in plain AIR.
|
||||
Mad,
|
||||
/// `air.mix`: `x + (y - x) * a`.
|
||||
Mix,
|
||||
/// `air.clamp` with a float type: `x` clamped to `[min, max]`.
|
||||
@@ -181,6 +218,11 @@ pub enum MathFn {
|
||||
MadHi(Sign),
|
||||
/// `air.mad_sat.<s|u>`: `a * b + c`, saturated.
|
||||
MadSat(Sign),
|
||||
/// `air.mul24.<s|u>` of `i32` lanes: the 32-bit product of the operands' low 24 bits,
|
||||
/// zero-extended (`u`) or sign-extended (`s`) (module doc).
|
||||
Mul24(Sign),
|
||||
/// `air.mad24.<s|u>` of `i32` lanes: `mul24(a, b) + c` in 32 bits (module doc).
|
||||
Mad24(Sign),
|
||||
/// `air.add_sat.<s|u>`: `x + y`, saturated.
|
||||
AddSat(Sign),
|
||||
/// `air.sub_sat.<s|u>`: `x - y`, saturated.
|
||||
@@ -332,6 +374,8 @@ pub(super) const TABLE: &[(&str, Domain, Shape)] = {
|
||||
("mul_hi", S(M::MulHi), Same(2)),
|
||||
("mad_hi", S(M::MadHi), Same(3)),
|
||||
("mad_sat", S(M::MadSat), Same(3)),
|
||||
("mul24", S(M::Mul24), Same(2)),
|
||||
("mad24", S(M::Mad24), Same(3)),
|
||||
("add_sat", S(M::AddSat), Same(2)),
|
||||
("sub_sat", S(M::SubSat), Same(2)),
|
||||
("hadd", S(M::HAdd), Same(2)),
|
||||
@@ -348,10 +392,19 @@ pub(super) const TABLE: &[(&str, Domain, Shape)] = {
|
||||
};
|
||||
|
||||
impl Math {
|
||||
/// Parse the part of a name after `air.`: `[fast_]stem.[s|u.]type`, or
|
||||
/// `{native,half}_stem.type` of a stem [`OPENCL_STEMS`] lists and a `float` type. `None` is not
|
||||
/// a math name (another family's, or an unknown one).
|
||||
/// Parse the part of a name after `air.`: `[fast_]stem.[s|u.]type`,
|
||||
/// `{native,half}_stem.type` of a stem [`OPENCL_STEMS`] lists and a `float` type, or
|
||||
/// `mad.type` of a type [`MAD_TYPES`] lists. `None` is not a math name (another family's, or an
|
||||
/// unknown one).
|
||||
pub(super) fn parse(rest: &str) -> Option<Math> {
|
||||
if let Some(ty) = rest.strip_prefix("mad.") {
|
||||
let ty = NumTy::parse(ty)?;
|
||||
return MAD_TYPES.contains(&ty).then_some(Math {
|
||||
f: MathFn::Mad,
|
||||
precision: Precision::Precise,
|
||||
ty,
|
||||
});
|
||||
}
|
||||
let opencl = ["native_", "half_"]
|
||||
.iter()
|
||||
.find_map(|p| rest.strip_prefix(p));
|
||||
@@ -399,6 +452,9 @@ impl Math {
|
||||
if f == MathFn::Dot && !ty.is_vector() {
|
||||
return None;
|
||||
}
|
||||
if matches!(f, MathFn::Mul24(_) | MathFn::Mad24(_)) && ty.elem != Elem::I32 {
|
||||
return None;
|
||||
}
|
||||
Some(Math { f, precision, ty })
|
||||
}
|
||||
|
||||
@@ -455,6 +511,7 @@ impl Math {
|
||||
match self.f {
|
||||
MathFn::Frexp => return Shape::Frexp,
|
||||
MathFn::Ilogb => return Shape::Ilogb,
|
||||
MathFn::Mad => return Shape::Same(3),
|
||||
_ => {}
|
||||
}
|
||||
TABLE
|
||||
|
||||
@@ -418,13 +418,24 @@ pub enum DeclClass {
|
||||
Mismatch,
|
||||
}
|
||||
|
||||
/// The symbol prefix of Metal's runtime routines: functions Metal's compiler declares without a
|
||||
/// body and Metal supplies, so the symbol is all that says which routine one is.
|
||||
const ROUTINE_PREFIX: &[u8] = b"___metal_";
|
||||
|
||||
/// The Metal runtime routine a declaration named `name` is, when the math family models it:
|
||||
/// `___metal_frexp_*` or `___metal_ilogb_*`.
|
||||
fn routine(name: &[u8]) -> Option<Math> {
|
||||
let rest = name.strip_prefix(b"___metal_")?;
|
||||
let rest = name.strip_prefix(ROUTINE_PREFIX)?;
|
||||
Math::parse_routine(std::str::from_utf8(rest).ok()?)
|
||||
}
|
||||
|
||||
/// Whether a declaration named `name` is of the family of Metal's runtime routines, modeled or
|
||||
/// not. A call that survives to a body-less one the math family does not model is an unknown
|
||||
/// intrinsic: Metal defines it, and nothing here says what it does.
|
||||
pub(crate) fn is_routine_family(name: &[u8]) -> bool {
|
||||
name.starts_with(ROUTINE_PREFIX)
|
||||
}
|
||||
|
||||
/// Whether a declaration named `name` is an intrinsic: its name has the `air.` or the `llvm.`
|
||||
/// prefix of the stable ABI, or it is a Metal runtime routine the math family models (`frexp`,
|
||||
/// `ilogb`). Any other declaration is an ordinary function.
|
||||
|
||||
@@ -159,6 +159,11 @@ fn every_math_entry_decodes_and_checks() {
|
||||
if f == MathFn::Dot && !ty.is_vector() {
|
||||
continue;
|
||||
}
|
||||
// `mul24` and `mad24` are of 32-bit lanes alone
|
||||
// (`mul24_and_mad24_decode_on_32_bit_lanes_alone`).
|
||||
if matches!(f, MathFn::Mul24(_) | MathFn::Mad24(_)) && ty.elem != Elem::I32 {
|
||||
continue;
|
||||
}
|
||||
let name = format!("{prefix}.{}", token(ty));
|
||||
let AirIntrinsic::Math(m) = air(&name) else {
|
||||
panic!("{name}");
|
||||
@@ -1234,6 +1239,86 @@ fn opencl_native_and_half_functions_read_as_the_fast_form() {
|
||||
}
|
||||
}
|
||||
|
||||
/// OpenCL C's `mad` decodes in the types Apple's OpenCL compiler is measured to spell it, `float`,
|
||||
/// `float4` and `half`, as the precise `Mad`; any other type or spelling stays unknown.
|
||||
#[test]
|
||||
fn opencl_mad_decodes_in_its_measured_types_alone() {
|
||||
for (name, elem, lanes) in [
|
||||
("air.mad.f32", Elem::F32, 1),
|
||||
("air.mad.v4f32", Elem::F32, 4),
|
||||
("air.mad.f16", Elem::F16, 1),
|
||||
] {
|
||||
let AirIntrinsic::Math(m) = air(name) else {
|
||||
panic!("{name}");
|
||||
};
|
||||
assert_eq!(
|
||||
(m.f, m.precision, m.ty),
|
||||
(MathFn::Mad, Precision::Precise, NumTy { elem, lanes }),
|
||||
"{name}"
|
||||
);
|
||||
}
|
||||
for name in [
|
||||
"air.mad.v2f32", // not measured
|
||||
"air.mad.v3f32", // not measured
|
||||
"air.mad.v8f32", // not measured
|
||||
"air.mad.v4f16", // not measured
|
||||
"air.mad.bf16", // not measured
|
||||
"air.mad.i32", // float types only
|
||||
"air.fast_mad.f32", // no prefix
|
||||
"air.native_mad.f32", // no prefix
|
||||
"air.mad.s.f32", // no sign token
|
||||
"air.mad.f32.extra", // trailing token
|
||||
] {
|
||||
assert_eq!(classify_self(name), DeclClass::Unknown, "{name}");
|
||||
}
|
||||
}
|
||||
|
||||
/// `mul24` and `mad24` decode in the sixteen names Apple's compiler spells (both signs, `i32` and
|
||||
/// 2 to 4 of its lanes) as `Mul24` and `Mad24`; a width other than 32 bits, a float, or a
|
||||
/// spelling without a sign stays unknown.
|
||||
#[test]
|
||||
fn mul24_and_mad24_decode_on_32_bit_lanes_alone() {
|
||||
for (stem, sign) in [
|
||||
("mul24.s", Sign::Signed),
|
||||
("mul24.u", Sign::Unsigned),
|
||||
("mad24.s", Sign::Signed),
|
||||
("mad24.u", Sign::Unsigned),
|
||||
] {
|
||||
for (ty, lanes) in [("i32", 1), ("v2i32", 2), ("v3i32", 3), ("v4i32", 4)] {
|
||||
let name = format!("air.{stem}.{ty}");
|
||||
let AirIntrinsic::Math(m) = air(&name) else {
|
||||
panic!("{name}");
|
||||
};
|
||||
let f = match stem.starts_with("mul") {
|
||||
true => MathFn::Mul24(sign),
|
||||
false => MathFn::Mad24(sign),
|
||||
};
|
||||
assert_eq!(
|
||||
(m.f, m.precision, m.ty),
|
||||
(
|
||||
f,
|
||||
Precision::Precise,
|
||||
NumTy {
|
||||
elem: Elem::I32,
|
||||
lanes
|
||||
}
|
||||
),
|
||||
"{name}"
|
||||
);
|
||||
}
|
||||
}
|
||||
for name in [
|
||||
"air.mul24.u.i16", // 32-bit lanes only
|
||||
"air.mad24.s.i64", // 32-bit lanes only
|
||||
"air.mul24.s.v2i8", // 32-bit lanes only
|
||||
"air.mul24.f32", // integer types only
|
||||
"air.mul24.i32", // a sign token is required
|
||||
"air.fast_mul24.u.i32", // no prefix
|
||||
] {
|
||||
assert_eq!(classify_self(name), DeclClass::Unknown, "{name}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn opencl_vector_data_functions_decode_with_their_strides() {
|
||||
use AddrSpace::{Constant as C, Device as G, Thread as P, Threadgroup as L};
|
||||
|
||||
@@ -41,6 +41,18 @@ pub const SECTION: &[u8] = b"air.externally_defined";
|
||||
/// The symbol prefix of the `matmul2d` ABI.
|
||||
pub const PREFIX: &[u8] = b"__tensorops_impl_matmul2d_op_";
|
||||
|
||||
/// The symbol prefix of every function of the tensor-ops implementation headers, the `matmul2d`
|
||||
/// ABI's among them.
|
||||
const FAMILY: &[u8] = b"__tensorops_impl_";
|
||||
|
||||
/// Whether a declaration named `symbol` in `section` is of the tensor-ops implementation's family:
|
||||
/// named under `__tensorops_impl_` in [`SECTION`]. Metal supplies each body-less one when it creates
|
||||
/// the pipeline, so a call that survives to one [`MatMul2dFn::of_declaration`] does not model is
|
||||
/// refused as tensors.
|
||||
pub(crate) fn in_family(symbol: &[u8], section: Option<&[u8]>) -> bool {
|
||||
section == Some(SECTION) && symbol.starts_with(FAMILY)
|
||||
}
|
||||
|
||||
/// `__tensor_ops_datatype_invalid`: the scale type a `_v2` run passes for a tensor operand without
|
||||
/// scale factors (`tensor_plane_scales`).
|
||||
pub(crate) const NO_SCALE: u64 = 0;
|
||||
|
||||
@@ -112,7 +112,7 @@ another's: a pipeline the runtime refuses on MoltenVK for a structural reason ca
|
||||
lavapipe, and a global row would then fail the lavapipe run for existing. The field is held, without
|
||||
case, against the venue's own description — its device name, for a CPU implementation the host's
|
||||
widest vector instruction set (`llvmpipe (LLVM 23.1.4, 256 bits) on x86-64 AVX-512`, which its
|
||||
compiler targets and its answers follow), then its driver and API version — so a row can name one
|
||||
compiler targets), then its driver and API version — so a row can name one
|
||||
device (`Apple M3 Max`), one implementation (`llvmpipe`), one host's (`on x86-64 AVX2`) or a family
|
||||
of them, and a venue that joins later needs no new vocabulary. `*` means every venue, and it is the
|
||||
**stronger** claim rather than the looser one: the row is then held on every venue the run selected
|
||||
@@ -134,7 +134,12 @@ replaying one case does not read every other row as fixed, and a run on one venu
|
||||
another venue's rows as fixed.
|
||||
|
||||
A row's identity is its case, the verdict it expects, the site and the answer there, so a gap that
|
||||
changed into another gap at the same site is a new gap and not the old one.
|
||||
changed into another gap at the same site is a new gap and not the old one. Where the hosts a venue
|
||||
covers answer a site differently by a property the venue does not state, the row lists each answer
|
||||
recorded there with ` | ` between them, and its gap names the run each came from: llvmpipe of one
|
||||
Mesa and LLVM stores the `x3` sites of `fetch-ordered-*-srgb` at 6304 elements on one x86-64
|
||||
AVX-512 host and at 6496 on others. Such a row covers each answer it lists and no other, and is
|
||||
held while the run answers any of them.
|
||||
|
||||
For a divergence the answer says **how much** moved — how many of the site's leaves differ, and the
|
||||
largest difference where the values are numbers — and never where the walk first noticed. Two
|
||||
@@ -331,6 +336,7 @@ one.
|
||||
| `color_write_masks` | Which channels of a texel a draw changes under a write mask of none, some and all of them | run on Metal |
|
||||
| `blend_sweeps` | Every settable `MTLBlendFactor` in each of the four slots, every `MTLBlendOperation` against six factor pairs and against each other, all sixteen write masks with the blend on and off, blending enabled against disabled, the blend colour at and outside its range, and the `Source1` factors through a second fragment output | run on Metal |
|
||||
| `fresh_contents` | What a new buffer or texture reads before anything writes it, and after memory that was written was released | run on Metal |
|
||||
| `managed_naming` | Which commit takes a Managed buffer's named range to a second copy: a compute slot, `useResource:`, a vertex slot, a blit source and a reach through the address alone, each against a write after the name | carried; an AMD Radeon Pro 5300M's table, as the oracle keeps one copy |
|
||||
| `argument_encoders` | What an argument encoder says of a layout, which word of an argument buffer each argument landed in, and what the kernel then sampled through it | run on Metal |
|
||||
| `function_bindings` | What a kernel's reflection says each argument is: the binding, its subprotocol's fields, and an argument buffer's struct type member by member | run on Metal |
|
||||
| `indirect_commands` | What an indirect command buffer's CPU-encoded compute and render commands ran: both dispatch kinds, ordinary and indexed draws, the resets, the barriers, an attribute stride, a stage-in region, and the descriptor properties no execution needs | run on Metal |
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
# both directions, per venue. A call the side does not answer yet is a refusal of `Unavailable`
|
||||
# naming the call ([`rt_side`](src/rt_side.rs)), and a row here until the side answers it.
|
||||
#
|
||||
# llvmpipe: Mesa 26.2.4, LLVM 23.1.1, Vulkan loader 1.4.363.0, validation layers 1.4.363.0.
|
||||
# The rows of venue llvmpipe hold on lavapipe of that Mesa release with that LLVM. CI runs them in
|
||||
# the image scripts/lavapipe-image/pin pins, and its leg fails where the image's packages differ
|
||||
# from the pin, or where the pin, or the device's name and driver, name another version than this
|
||||
# line does. These are upstream versions: the image is Arch Linux's build (mesa 1:26.2.4-1), and
|
||||
# the rows were recorded on another distribution's build of the same release (3:26.2.4-1).
|
||||
#
|
||||
# A row whose venue's hosts answer its site differently, by a property the venue does not state,
|
||||
# lists each answer recorded there with ` | ` between them, and its gap names the run each came from.
|
||||
#
|
||||
# case venue expects site our answer waiting on
|
||||
a2c-on-1-alpha-50 llvmpipe divergent case/drawn/texel 4 elements differ (U8), the largest difference 191 The device's own answer (rule 1): alpha-to-coverage at one sample. Metal's covers the pixel only above an alpha of 1/2, so the draw's 0.5 covers nothing and the destination stays (Metal 255); lavapipe's covers it, by a 2x2 ordered dither, and stores the fragment (ours 64, its 0.25 as a code). Vulkan specifies no algorithm for converting alpha to coverage. Note `device-alpha-coverage`.
|
||||
border-swizzles-a8unorm NVIDIA divergent case/bgra/black/words 2 elements differ (U32), the largest difference 1065353216 The device's own answer (rule 1), a known gap of the runtime (its README, Known gaps of textures): a runtime sampler of an opaque-black border, clamp to border on `s` and `t`, sampled past the texture's edge; the RTX 3090 reads the border's alpha as 1, where Metal reads `A8Unorm`'s one channel from the border colour's red, 0 (the `bgra` swizzle moves no channel); the 780M and llvmpipe read Metal's 0. The runtime holds `A8Unorm` in `R8_UNORM` read through a view that moves red to alpha, `(0, 0, 0, r)`, on every device (it uses Vulkan 1.3 and does not enable `VK_KHR_maintenance5`, so `A8_UNORM` is not exposed), and the device reads the border through that mapping only with `borderColorSwizzleFromImage`, which the 3090's driver does not report. A sampler in the arrays meets every view, so no create info names the view's mapping. The first differing element is at [image 0, row 1, 11] (U32, byte 124): Metal 0 (0x0), ours 1065353216 (0x3f800000). Note `swizzled-opaque-black-border`.
|
||||
@@ -238,7 +248,7 @@ border-swizzles-rgba8unorm llvmpipe divergent case/rgba/zero-s-border-t-white/wo
|
||||
border-swizzles-rgba8unorm llvmpipe divergent case/rgba/zero-white/words 3 elements differ (U32), the largest difference 1 The device's own answer (rule 1): a sample of an 8-bit unorm texel (red 0x40, green 0x80, blue 0xC0 and alpha 0x20) through a swizzled view, the border read through the view's mapping (the device reports `borderColorSwizzleFromImage`): the device converts an 8-bit code by the reciprocal product, so a code's value is one `f32` ulp high (the first differing element is Metal 0x3F40C0C1 against our 0x3F40C0C2, and the site's largest difference is that ulp). Note `device-texel-conversion`. Open: nothing.
|
||||
border-swizzles-rgba8unorm llvmpipe divergent case/rgba/zero/words 3 elements differ (U32), the largest difference 1 The device's own answer (rule 1): a sample of an 8-bit unorm texel (red 0x40, green 0x80, blue 0xC0 and alpha 0x20) through a swizzled view, the border read through the view's mapping (the device reports `borderColorSwizzleFromImage`): the device converts an 8-bit code by the reciprocal product, so a code's value is one `f32` ulp high (the first differing element is Metal 0x3F40C0C1 against our 0x3F40C0C2, and the site's largest difference is that ulp). Note `device-texel-conversion`. Open: nothing.
|
||||
buffer-blit-empty-ranges * refused case/work Err({refused: Error::Refused("a copy of 0 bytes at 64 leaves a buffer of 16 bytes"), step: 1 (0x1)}) An accepted difference: Metal documents the copy as invalid, and rt refuses it typed. Apple's copy(from:sourceOffset:to:destinationOffset:size:) page gives destinationOffset as "A byte offset within destinationBuffer", and 64 lies past a buffer of 16 bytes; MTLBlitCommandEncoder.h states only "Basic memory copy between buffers." The M3 Max (macOS 27.0.1) skipped the empty copy with its API validation off, and its validation layer stops it: "size(0) must not be 0." and "(destinationOffset + size)(64) must be <= [destinationBuffer length](16)."
|
||||
buffer-blit-overlapping-copies * refused case/work Err({refused: Error::Refused("a copy of 4000 bytes from 1 to 7 reads bytes it writes"), step: 0 (0x0)}) An accepted difference: Metal documents the copy as invalid, and rt refuses it typed. Apple's copy(from:sourceOffset:to:destinationOffset:size:) page: "You can pass the same buffer to the sourceBuffer and destinationBuffer parameters if size is less than the distance between sourceOffset and destinationOffset.", and this copy's size, 4000, is more than its offsets' distance, 6; MTLBlitCommandEncoder.h states only "Basic memory copy between buffers." rt refuses a copy whose source and destination share bytes (Refusal::BufferCopyOverlap), which vkCmdCopyBuffer forbids. The M3 Max (macOS 27.0.1) moved the bytes as memmove does, its API validation layer on as well.
|
||||
buffer-blit-overlapping-copies * refused case/work Err({refused: Error::Refused("a copy of 4000 bytes from 1 to 7 reads bytes it writes"), step: 0 (0x0)}) An accepted difference: Metal documents the copy as invalid, and rt refuses it typed. Apple's copy(from:sourceOffset:to:destinationOffset:size:) page: "You can pass the same buffer to the sourceBuffer and destinationBuffer parameters if size is less than the distance between sourceOffset and destinationOffset.", and this copy's size, 4000, is more than its offsets' distance, 6; MTLBlitCommandEncoder.h states only "Basic memory copy between buffers." rt refuses one buffer's ranges that share bytes (Refusal::BufferCopyOverlap, basis metal-documented); two buffers that alias copy as memmove does. The M3 Max (macOS 27.0.1) moved the bytes as memmove does, its API validation layer on as well.
|
||||
buffer-depth-samples-d16-54-2 RX 550 refused case/work Err({refused: Error::Unsupported("bytes are not copied to or from this texture of Depth16Unorm"), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no blit with a blit option). Known gap (rt README, Known gaps of textures): no bytes are copied between a buffer and a multisample texture (Gap::TextureBytes).
|
||||
buffer-depth-samples-s8-54-2 RX 550 refused case/work Err({refused: Error::Unsupported("bytes are not copied to or from this texture of Stencil8"), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no blit with a blit option). Known gap (rt README, Known gaps of textures): no bytes are copied between a buffer and a multisample texture (Gap::TextureBytes).
|
||||
buffer-tails-blits * refused case/work Err({refused: Error::Refused("a texture at offset 4096, rows 64 bytes apart, does not lie in whole texels inside a buffer of 20000 bytes"), resource: 1 (0x1)}) An accepted difference: Metal documents the texture as the buffer's storage, which these rows run past, and rt refuses it typed. Apple's makeTexture(descriptor:offset:bytesPerRow:) page: the call "Creates a texture that shares its storage with the buffer"; MTLBuffer.h: "Create a 2D texture or texture buffer that shares storage with this buffer." The M3 Max (macOS 27.0.1) made the texture with its API validation off, its texels past the length in the buffer's allocation, and its validation layer stops it: "Length required by texture offset, bytes per row, height and array length(20480) exceed buffer capacity(20000)."
|
||||
@@ -575,14 +585,14 @@ fetch-ordered-bgra8unorm-red-alpha RADV divergent case/x3/texels 7136 elements d
|
||||
fetch-ordered-bgra8unorm-red-alpha UHD Graphics 630 divergent case/x1/texels 4064 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0x33 against our 0x32, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-red-alpha UHD Graphics 630 divergent case/x2/texels 6112 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0x1a against our 0x19, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-red-alpha UHD Graphics 630 divergent case/x3/texels 7136 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0xd against our 0xc, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb 256 bits) on x86-64 AVX2 divergent case/x3 6304 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb 256 bits) on x86-64 AVX2 divergent case/x3-depth 6304 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb Iris(R) Xe divergent case/x1 3712 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb Iris(R) Xe divergent case/x2 5840 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb Iris(R) Xe divergent case/x3 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb Iris(R) Xe divergent case/x3-depth 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb llvmpipe divergent case/x1 3456 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x2 against our 0x3, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb llvmpipe divergent case/x2 5360 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0xf against our 0xe, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb llvmpipe divergent case/x3 6304 elements differ (U8), the largest difference 2 | 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing. The count is 6304 or 6496 by a property of the host finer than its widest vector set, which the venue does not state: 6304 on AVX2 hosts (the lavapipe leg of m3-max-55331 to m3-max-55337 recorded it at x3 and of m3-max-55569 to m3-max-55574 at x3-depth; m3-max-56427 at Mesa 26.2.4 and LLVM 23.1.1) and on an AVX-512 runner of CI's image (CI run 46984549568); 6496 on AVX-512 hosts (m3-max-56238 and m3-max-56342 at LLVM 23.1.4; CI runs 46969176610 and 46974578786 at Mesa 26.2.4 and LLVM 23.1.1).
|
||||
fetch-ordered-bgra8unorm-srgb llvmpipe divergent case/x3-depth 6304 elements differ (U8), the largest difference 2 | 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing. The count is 6304 or 6496 by a property of the host finer than its widest vector set, which the venue does not state: 6304 on AVX2 hosts (the lavapipe leg of m3-max-55331 to m3-max-55337 recorded it at x3 and of m3-max-55569 to m3-max-55574 at x3-depth; m3-max-56427 at Mesa 26.2.4 and LLVM 23.1.1) and on an AVX-512 runner of CI's image (CI run 46984549568); 6496 on AVX-512 hosts (m3-max-56238 and m3-max-56342 at LLVM 23.1.4; CI runs 46969176610 and 46974578786 at Mesa 26.2.4 and LLVM 23.1.1).
|
||||
fetch-ordered-bgra8unorm-srgb NVIDIA divergent case/x1 3872 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x6b against our 0x6c, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb NVIDIA divergent case/x2 5856 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x32 against our 0x33, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb NVIDIA divergent case/x3 6992 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x22 against our 0x23, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
@@ -593,9 +603,7 @@ fetch-ordered-bgra8unorm-srgb RADV divergent case/x3 6976 elements differ (U8),
|
||||
fetch-ordered-bgra8unorm-srgb RADV divergent case/x3-depth 6976 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb UHD Graphics 630 divergent case/x1 3712 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb UHD Graphics 630 divergent case/x2 5840 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb 256 bits) on x86-64 AVX-512 divergent case/x3 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb UHD Graphics 630 divergent case/x3 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb 256 bits) on x86-64 AVX-512 divergent case/x3-depth 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-srgb UHD Graphics 630 divergent case/x3-depth 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-unknown-usage Iris(R) Xe divergent case/x1/texels 8128 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0x1 against our 0x0, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-bgra8unorm-unknown-usage Iris(R) Xe divergent case/x2/texels 12224 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0x1 against our 0x0, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
@@ -657,14 +665,14 @@ fetch-ordered-rgba8unorm-red-alpha RADV divergent case/x3/texels 7136 elements d
|
||||
fetch-ordered-rgba8unorm-red-alpha UHD Graphics 630 divergent case/x1/texels 4064 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0x1 against our 0x0, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-red-alpha UHD Graphics 630 divergent case/x2/texels 6112 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0x1 against our 0x0, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-red-alpha UHD Graphics 630 divergent case/x3/texels 7136 elements differ (U8), the largest difference 1 The device's own answer (rule 1): a fragment function's colour write into an 8-bit unorm attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times, so every odd code meets a tie): the first differing element is Metal 0x1 against our 0x0, a code apart. Metal rounds the halved code to nearest; Vulkan's conversion of the colour to a normalized code returns either of the two nearest codes, and the device's conversion into the attachment is the answer. The case announces `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb 256 bits) on x86-64 AVX2 divergent case/x3 6304 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb 256 bits) on x86-64 AVX2 divergent case/x3-depth 6304 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb Iris(R) Xe divergent case/x1 3712 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb Iris(R) Xe divergent case/x2 5840 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb Iris(R) Xe divergent case/x3 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb Iris(R) Xe divergent case/x3-depth 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb llvmpipe divergent case/x1 3456 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x2 against our 0x3, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb llvmpipe divergent case/x2 5360 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0xf against our 0xe, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb llvmpipe divergent case/x3 6304 elements differ (U8), the largest difference 2 | 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing. The count is 6304 or 6496 by a property of the host finer than its widest vector set, which the venue does not state: 6304 on AVX2 hosts (the lavapipe leg of m3-max-55331 to m3-max-55337 recorded it at x3 and of m3-max-55569 to m3-max-55574 at x3-depth; m3-max-56427 at Mesa 26.2.4 and LLVM 23.1.1) and on an AVX-512 runner of CI's image (CI run 46984549568); 6496 on AVX-512 hosts (m3-max-56238 and m3-max-56342 at LLVM 23.1.4; CI runs 46969176610 and 46974578786 at Mesa 26.2.4 and LLVM 23.1.1).
|
||||
fetch-ordered-rgba8unorm-srgb llvmpipe divergent case/x3-depth 6304 elements differ (U8), the largest difference 2 | 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing. The count is 6304 or 6496 by a property of the host finer than its widest vector set, which the venue does not state: 6304 on AVX2 hosts (the lavapipe leg of m3-max-55331 to m3-max-55337 recorded it at x3 and of m3-max-55569 to m3-max-55574 at x3-depth; m3-max-56427 at Mesa 26.2.4 and LLVM 23.1.1) and on an AVX-512 runner of CI's image (CI run 46984549568); 6496 on AVX-512 hosts (m3-max-56238 and m3-max-56342 at LLVM 23.1.4; CI runs 46969176610 and 46974578786 at Mesa 26.2.4 and LLVM 23.1.1).
|
||||
fetch-ordered-rgba8unorm-srgb NVIDIA divergent case/x1 3872 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x6b against our 0x6c, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb NVIDIA divergent case/x2 5856 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x32 against our 0x33, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb NVIDIA divergent case/x3 6992 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x22 against our 0x23, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
@@ -675,9 +683,7 @@ fetch-ordered-rgba8unorm-srgb RADV divergent case/x3 6976 elements differ (U8),
|
||||
fetch-ordered-rgba8unorm-srgb RADV divergent case/x3-depth 6976 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb UHD Graphics 630 divergent case/x1 3712 elements differ (U8), the largest difference 1 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 1 code(s). The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb UHD Graphics 630 divergent case/x2 5840 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb 256 bits) on x86-64 AVX-512 divergent case/x3 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb UHD Graphics 630 divergent case/x3 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table: the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb 256 bits) on x86-64 AVX-512 divergent case/x3-depth 6496 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x8 against our 0x7, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
fetch-ordered-rgba8unorm-srgb UHD Graphics 630 divergent case/x3-depth 7552 elements differ (U8), the largest difference 2 The device's own answers (rule 1): a fragment function's colour write into an 8-bit sRGB attachment it also fetches (the `x1` to `x3` sites fetch, halve and store it once to three times): the fetch reads the code through the attachment's sRGB view, the device's decode, and the device encodes the halved colour by its own conversion, where Metal decodes and encodes through its own table (`x3-depth` is `x3` again beside a depth and stencil attachment whose `Always` test drops nothing): the first differing element is Metal 0x1 against our 0x0, and the site's largest difference is 2 code(s), two after a later draw reads an earlier one's code. The case announces `srgb-texel-decode` and `device-color-conversion`. Open: nothing.
|
||||
format-copies-d16-to-r16 * refused case/work Err({refused: Error::Refused("a copy from Depth16Unorm to R16Unorm is between two formats or two sample counts, which Metal refuses"), step: 2 (0x2)}) An accepted difference: Metal documents the copy as invalid, and rt refuses it typed. Apple's copy(from:sourceSlice:sourceLevel:sourceOrigin:sourceSize:to:destinationSlice:destinationLevel:destinationOrigin:) page asks of the destination texture: "The pixel format is the same as sourceTexture." and "The sample count is the same as sourceTexture."; MTLBlitCommandEncoder.h gives that call only "Copy a rectangle of pixels between textures." and states "The source and destination pixel format must be identical." for the whole-surface copies. The M3 Max (macOS 27.0.1) copied the bytes with its API validation off, and its validation layer stops the call: "Copy From Texture Validation [sourceTexture pixelFormat](MTLPixelFormatDepth16Unorm) must equal [destinationTexture pixelFormat](MTLPixelFormatR16Unorm)".
|
||||
format-copies-d16-to-rg8 * refused case/work Err({refused: Error::Refused("a copy from Depth16Unorm to RG8Unorm is between two formats or two sample counts, which Metal refuses"), step: 2 (0x2)}) An accepted difference: Metal documents the copy as invalid, and rt refuses it typed. Apple's copy(from:sourceSlice:sourceLevel:sourceOrigin:sourceSize:to:destinationSlice:destinationLevel:destinationOrigin:) page asks of the destination texture: "The pixel format is the same as sourceTexture." and "The sample count is the same as sourceTexture."; MTLBlitCommandEncoder.h gives that call only "Copy a rectangle of pixels between textures." and states "The source and destination pixel format must be identical." for the whole-surface copies. The M3 Max (macOS 27.0.1) copied the bytes with its API validation off, and its validation layer stops the call: "Copy From Texture Validation [sourceTexture pixelFormat](MTLPixelFormatDepth16Unorm) must equal [destinationTexture pixelFormat](MTLPixelFormatRG8Unorm)".
|
||||
@@ -708,33 +714,30 @@ half-storage-writes-rg16f-write llvmpipe divergent case/stored 4094 elements dif
|
||||
half-storage-writes-rgba16f-held llvmpipe divergent case/stored 8188 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a `half` NaN written to a 16-bit float storage texture an argument buffer holds. Metal stores 0x7e00 at the first differing element; the device stores 0xfe00. Note `device-nan-encoding`.
|
||||
half-storage-writes-rgba16f-read-write llvmpipe divergent case/stored 8188 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a `half` NaN written to a 16-bit float storage texture. Metal stores the canonical 0x7e00; the device's store keeps the NaN's sign (0xfe00). Note `device-nan-encoding`.
|
||||
half-storage-writes-rgba16f-write llvmpipe divergent case/stored 8188 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a `half` NaN written to a 16-bit float storage texture. Metal stores the canonical 0x7e00; the device's store keeps the NaN's sign (0xfe00). Note `device-nan-encoding`.
|
||||
half-texel-nans-r16f llvmpipe divergent case/words/nearest-sample 215 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` nearest sample. Metal hands back the texel's own code (0x7c01 at the first differing element); lavapipe's sample keeps the payload and sets the quiet bit (0x7e01). Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-r16f llvmpipe divergent case/words/read 215 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal hands back the texel's own code (0x7c01 at the first differing element); lavapipe's fetch keeps the payload and sets the quiet bit (0x7e01), as nearest-sample does. Notes `half-texel-conversion` and `native-half-conversion`. lavapipe's fetch answers a NaN by descriptor: this site has answered as nearest-sample and, in an earlier whole-set run with the texture at another element of set 1's sampled-texture array, as read-through-sample (0x7e00, the payload dropped). The runtime reads with `OpImageFetch` of a sampled float image, then `OpFConvert` to `half` (Mesa's SPIR-V dump of its modules).
|
||||
half-texel-nans-r16f llvmpipe divergent case/words/nearest-sample 472 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` nearest sample. Metal hands back the texel's own code (0x7c01 at the first differing element); lavapipe's sample, narrowed to `half` under the 16-bit float controls, answers the quiet NaN of its sign with the payload dropped (0x7e00), as its `read()` of a sample-access texture does. Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-r16f llvmpipe divergent case/words/read 472 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal hands back the texel's own code (0x7c01 at the first differing element); lavapipe's fetch, narrowed to `half` under the 16-bit float controls, answers the quiet NaN of its sign with the payload dropped (0x7e00), as its `read()` of a sample-access texture does. Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-r16f llvmpipe divergent case/words/read-through-sample 472 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a sample-access texture. Metal hands back the texel's own code (0x7c01 at the first differing element); lavapipe's fetch drops the payload, answering the quiet NaN of its sign (0x7e00). Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-r16f llvmpipe divergent case/words/widened 515 elements differ (U32), the largest difference 2151669760 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening keeps the NaN's sign and payload (0x7fc02000 at the first differing element). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-r32f llvmpipe divergent case/words/nearest-sample 555 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` nearest sample. Metal answers the canonical 0x7e00; lavapipe's sample narrows it with every payload bit set (0x7fff). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-r32f llvmpipe divergent case/words/read 597 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch narrows it with every payload bit set (0x7fff), as nearest-sample does. Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`. lavapipe's fetch answers a NaN by descriptor: this site has answered as nearest-sample and, in an earlier whole-set run with the texture at another element of set 1's sampled-texture array, as read-through-sample: the same pattern as half-texel-nans-r16f's `read` row; not dumped for this format.
|
||||
half-texel-nans-r16f llvmpipe divergent case/words/widened 257 elements differ (U32), the largest difference 2147483648 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening, under the 16-bit float controls, answers 0xffc00000 at the first differing element (the sign bit set). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-r32f llvmpipe divergent case/words/nearest-sample 256 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` nearest sample. Metal answers the canonical 0x7e00; lavapipe's sample, narrowed to `half` under the 16-bit float controls, answers it with the sign bit set (0xfe00 at the first differing element, as its `read()` of a sample-access texture answers there). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-r32f llvmpipe divergent case/words/read 214 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch, narrowed to `half` under the 16-bit float controls, answers it with the sign bit set (0xfe00 at the first differing element, as its `read()` of a sample-access texture answers there). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-r32f llvmpipe divergent case/words/read-through-sample 214 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a sample-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch narrows it keeping its sign (0xfe00). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-r32f llvmpipe divergent case/words/widened 768 elements differ (U32), the largest difference 2151677951 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening keeps the NaN's sign and payload (0x7f800001 at the first differing element). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg11b10f llvmpipe divergent case/words/nearest-sample 1024 elements differ (U16), the largest difference 496 The device's own answer (rule 1): a small float texel's NaN through a `half` nearest sample. Metal answers the canonical 0x7e00; lavapipe's decode keeps the payload (0x7e10). Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rg11b10f llvmpipe divergent case/words/read 1024 elements differ (U16), the largest difference 496 The device's own answer (rule 1): a small float texel's NaN through a `half` `read()` of a read-access texture. Metal answers the canonical 0x7e00; lavapipe's decode keeps the payload (0x7e10), as nearest-sample does. Notes `half-texel-conversion` and `native-half-conversion`. lavapipe's fetch answers a NaN by descriptor: this site has answered as nearest-sample and, in an earlier whole-set run with the texture at another element of set 1's sampled-texture array, as read-through-sample: the same pattern as half-texel-nans-r16f's `read` row; not dumped for this format.
|
||||
half-texel-nans-rg11b10f llvmpipe divergent case/words/widened 1024 elements differ (U32), the largest difference 4063232 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening keeps the NaN's sign and payload (0x7f820000 at the first differing element). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg16f llvmpipe divergent case/words/nearest-sample 428 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` nearest sample. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's sample keeps the payload and sets the quiet bit (0x7f55). Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rg16f llvmpipe divergent case/words/read 428 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's fetch keeps the payload and sets the quiet bit (0x7f55), as nearest-sample does. Notes `half-texel-conversion` and `native-half-conversion`. lavapipe's fetch answers a NaN by descriptor: this site has answered as nearest-sample and, in an earlier whole-set run with the texture at another element of set 1's sampled-texture array, as read-through-sample: the same pattern as half-texel-nans-r16f's `read` row; not dumped for this format.
|
||||
half-texel-nans-r32f llvmpipe divergent case/words/widened 214 elements differ (U32), the largest difference 2147483648 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening, under the 16-bit float controls, answers 0xffc00000 at the first differing element (the sign bit set). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg16f llvmpipe divergent case/words/nearest-sample 940 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` nearest sample. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's sample, narrowed to `half` under the 16-bit float controls, answers the quiet NaN of its sign with the payload dropped (0x7e00), as its `read()` of a sample-access texture does. Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rg16f llvmpipe divergent case/words/read 940 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's fetch, narrowed to `half` under the 16-bit float controls, answers the quiet NaN of its sign with the payload dropped (0x7e00), as its `read()` of a sample-access texture does. Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rg16f llvmpipe divergent case/words/read-through-sample 940 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a sample-access texture. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's fetch drops the payload, answering the quiet NaN of its sign (0x7e00). Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rg16f llvmpipe divergent case/words/widened 1026 elements differ (U32), the largest difference 2151669760 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening keeps the NaN's sign and payload (0x7feaa000 at the first differing element). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg32f llvmpipe divergent case/words/nearest-sample 1109 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` nearest sample. Metal answers the canonical 0x7e00; lavapipe's sample narrows it with every payload bit set (0x7fff). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg32f llvmpipe divergent case/words/read 1194 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch narrows it with every payload bit set (0x7fff), as nearest-sample does. Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`. lavapipe's fetch answers a NaN by descriptor: this site has answered as nearest-sample and, in an earlier whole-set run with the texture at another element of set 1's sampled-texture array, as read-through-sample: the same pattern as half-texel-nans-r16f's `read` row; not dumped for this format.
|
||||
half-texel-nans-rg16f llvmpipe divergent case/words/widened 514 elements differ (U32), the largest difference 2147483648 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening, under the 16-bit float controls, answers 0xffc00000 at the first differing element (the sign bit set). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg32f llvmpipe divergent case/words/nearest-sample 511 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` nearest sample. Metal answers the canonical 0x7e00; lavapipe's sample, narrowed to `half` under the 16-bit float controls, answers it with the sign bit set (0xfe00 at the first differing element, as its `read()` of a sample-access texture answers there). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg32f llvmpipe divergent case/words/read 426 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch, narrowed to `half` under the 16-bit float controls, answers it with the sign bit set (0xfe00 at the first differing element, as its `read()` of a sample-access texture answers there). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg32f llvmpipe divergent case/words/read-through-sample 426 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a sample-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch narrows it keeping its sign (0xfe00). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rg32f llvmpipe divergent case/words/widened 1535 elements differ (U32), the largest difference 2151677951 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening keeps the NaN's sign and payload (0x7fffffff at the first differing element). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba16f llvmpipe divergent case/words/nearest-sample 852 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` nearest sample. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's sample keeps the payload and sets the quiet bit (0x7f55). Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rgba16f llvmpipe divergent case/words/read 852 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's fetch keeps the payload and sets the quiet bit (0x7f55), as nearest-sample does. Notes `half-texel-conversion` and `native-half-conversion`. lavapipe's fetch answers a NaN by descriptor: this site has answered as nearest-sample and, in an earlier whole-set run with the texture at another element of set 1's sampled-texture array, as read-through-sample: the same pattern as half-texel-nans-r16f's `read` row; not dumped for this format.
|
||||
half-texel-nans-rg32f llvmpipe divergent case/words/widened 426 elements differ (U32), the largest difference 2147483648 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening, under the 16-bit float controls, answers 0xffc00000 at the first differing element (the sign bit set). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba16f llvmpipe divergent case/words/nearest-sample 1874 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` nearest sample. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's sample, narrowed to `half` under the 16-bit float controls, answers the quiet NaN of its sign with the payload dropped (0x7e00), as its `read()` of a sample-access texture does. Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rgba16f llvmpipe divergent case/words/read 1874 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's fetch, narrowed to `half` under the 16-bit float controls, answers the quiet NaN of its sign with the payload dropped (0x7e00), as its `read()` of a sample-access texture does. Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rgba16f llvmpipe divergent case/words/read-through-sample 1874 elements differ (U16), the largest difference 511 The device's own answer (rule 1): a 16-bit float texel's NaN through a `half` `read()` of a sample-access texture. Metal hands back the texel's own code (0x7d55 at the first differing element); lavapipe's fetch drops the payload, answering the quiet NaN of its sign (0x7e00). Notes `half-texel-conversion` and `native-half-conversion`.
|
||||
half-texel-nans-rgba16f llvmpipe divergent case/words/widened 2045 elements differ (U32), the largest difference 2151669760 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening keeps the NaN's sign and payload (0x7feaa000 at the first differing element). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba32f llvmpipe divergent case/words/nearest-sample 2217 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` nearest sample. Metal answers the canonical 0x7e00; lavapipe's sample narrows it with every payload bit set (0x7fff). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba32f llvmpipe divergent case/words/read 2388 elements differ (U16), the largest difference 33279 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch narrows it with every payload bit set (0x7fff), as nearest-sample does. Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`. lavapipe's fetch answers a NaN by descriptor: this site has answered as nearest-sample and, in an earlier whole-set run with the texture at another element of set 1's sampled-texture array, as read-through-sample: the same pattern as half-texel-nans-r16f's `read` row; not dumped for this format.
|
||||
half-texel-nans-rgba16f llvmpipe divergent case/words/widened 1022 elements differ (U32), the largest difference 2147483648 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening, under the 16-bit float controls, answers 0xffc00000 at the first differing element (the sign bit set). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba32f llvmpipe divergent case/words/nearest-sample 1022 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` nearest sample. Metal answers the canonical 0x7e00; lavapipe's sample, narrowed to `half` under the 16-bit float controls, answers it with the sign bit set (0xfe00 at the first differing element, as its `read()` of a sample-access texture answers there). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba32f llvmpipe divergent case/words/read 851 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a read-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch, narrowed to `half` under the 16-bit float controls, answers it with the sign bit set (0xfe00 at the first differing element, as its `read()` of a sample-access texture answers there). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba32f llvmpipe divergent case/words/read-through-sample 851 elements differ (U16), the largest difference 32768 The device's own answer (rule 1): a 32-bit float texel's NaN through a `half` `read()` of a sample-access texture. Metal answers the canonical 0x7e00; lavapipe's fetch narrows it keeping its sign (0xfe00). Notes `half-texel-conversion`, `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba32f llvmpipe divergent case/words/widened 3070 elements differ (U32), the largest difference 2151677951 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening keeps the NaN's sign and payload (0x7fffffff at the first differing element). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-texel-nans-rgba32f llvmpipe divergent case/words/widened 851 elements differ (U32), the largest difference 2147483648 The device's own answer (rule 1): the shader's `float` widening of the `half` this case read. Metal widens every `half` NaN to its canonical 0x7fc00000; the device's widening, under the 16-bit float controls, answers 0xffc00000 at the first differing element (the sign bit set). Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
half-write-nans-r16f llvmpipe divergent case/stored 8 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a written `half` texel's NaN. Metal stores its own code (0x7c01); the device's store sets the quiet bit (0x7e01). Note `device-nan-encoding`.
|
||||
half-write-nans-r32f llvmpipe divergent case/stored 15 elements differ (U32), the largest difference 2151669760 The device's own answer (rule 1): a written `half` texel's NaN. Metal stores the canonical 0x7fc00000; the device's store keeps the NaN's payload (0x7fc02000). Note `device-nan-encoding`.
|
||||
half-write-nans-rg16f llvmpipe divergent case/stored 16 elements differ (U16), the largest difference 512 The device's own answer (rule 1): a written `half` texel's NaN. Metal stores its own code (0x7c01); the device's store sets the quiet bit (0x7e01). Note `device-nan-encoding`.
|
||||
@@ -1325,7 +1328,6 @@ pass-sequence-aspect-actions NVIDIA refused case/pipeline Err(Error::Unsupported
|
||||
pass-sequence-aspect-actions Iris(R) Xe refused case/pipeline Err(Error::Unsupported("a render pipeline state with DepthStencilFormats is not built")) refused: no stream uses it yet (states-only play 11-19, m3-max-56371-56373, 56375, player 44668b439f: 32 streams, every render and compute pipeline state made). rt builds no render pipeline state with DepthStencilFormats (Gap::RenderPipeline; rt README, Known gaps of render pipeline states).
|
||||
pass-sequence-aspect-actions UHD Graphics 630 refused case/pipeline Err(Error::Unsupported("a render pipeline state with DepthStencilFormats is not built")) refused: no stream uses it yet (states-only play 11-19, m3-max-56371-56373, 56375, player 44668b439f: 32 streams, every render and compute pipeline state made). rt builds no render pipeline state with DepthStencilFormats (Gap::RenderPipeline; rt README, Known gaps of render pipeline states).
|
||||
pass-sequence-aspect-actions Apple M3 Max refused case/pipeline Err(Error::Unsupported("a render pipeline state with DepthStencilFormats is not built")) refused: no stream uses it yet (states-only play 11-19, m3-max-56371-56373, 56375, player 44668b439f: 32 streams, every render and compute pipeline state made). rt builds no render pipeline state with DepthStencilFormats (Gap::RenderPipeline; rt README, Known gaps of render pipeline states).
|
||||
pass-start-barrier-new-texture-chain RX 550 refused case/pieces/2-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pipeline-options-compute-binding-info-and-undefined-bit * refused case/outcome Err(TheConsumers("metal2vulkan-runtime builds no pipeline reflection and acts on no MTLPipelineOption (FailOnBinaryArchiveMiss, ArgumentInfo, BufferTypeInfo, BindingInfo): its consumer builds reflection from the library's AIR")) refused: the consumer's own (MTLComputePipelineReflection, MTLRenderPipelineReflection, MTLPipelineOptionFailOnBinaryArchiveMiss, MTLPipelineOptionArgumentInfo, MTLPipelineOptionBufferTypeInfo, MTLPipelineOptionBindingInfo). rt builds no reflection and acts on no pipeline option; its consumer builds reflection from the library's AIR.
|
||||
pipeline-options-compute-undefined-bit-3 * refused case/outcome Err(TheConsumers("metal2vulkan-runtime builds no pipeline reflection and acts on no MTLPipelineOption (FailOnBinaryArchiveMiss, ArgumentInfo, BufferTypeInfo, BindingInfo): its consumer builds reflection from the library's AIR")) refused: the consumer's own (MTLComputePipelineReflection, MTLRenderPipelineReflection, MTLPipelineOptionFailOnBinaryArchiveMiss, MTLPipelineOptionArgumentInfo, MTLPipelineOptionBufferTypeInfo, MTLPipelineOptionBindingInfo). rt builds no reflection and acts on no pipeline option; its consumer builds reflection from the library's AIR.
|
||||
pipeline-options-compute-undefined-bit-31 * refused case/outcome Err(TheConsumers("metal2vulkan-runtime builds no pipeline reflection and acts on no MTLPipelineOption (FailOnBinaryArchiveMiss, ArgumentInfo, BufferTypeInfo, BindingInfo): its consumer builds reflection from the library's AIR")) refused: the consumer's own (MTLComputePipelineReflection, MTLRenderPipelineReflection, MTLPipelineOptionFailOnBinaryArchiveMiss, MTLPipelineOptionArgumentInfo, MTLPipelineOptionBufferTypeInfo, MTLPipelineOptionBindingInfo). rt builds no reflection and acts on no pipeline option; its consumer builds reflection from the library's AIR.
|
||||
@@ -2332,36 +2334,36 @@ command-buffer-facts * refused case/facts/resource-state-encoder-opened Err(Unav
|
||||
handler-waits-completed-until-completed * divergent case/addCompletedHandler/waitUntilCompleted Metal did not return from this call, and we answered it: Ok An accepted difference: Apple documents waitUntilCompleted as "Blocks the current thread until the GPU finishes executing the command buffer and all of its completion handlers." Called from the command buffer's own completed handler, Metal never returns; rt answers at once because the buffer is complete.
|
||||
indirect-private-type-getters * refused case/type/0/direct Err(Unavailable({call: "indirect_draw_read_back"})) The rt side does not port `indirect_draw_read_back` yet: it waits on the side's indirect command buffers (`newIndirectCommandBufferWithDescriptor:`), which it answers Unavailable.
|
||||
read-write-tier-descriptors * divergent case/promised-and-refused 0 in both, extra {"MTLPixelFormatR16Float/tier2/TextureBuffer", "MTLPixelFormatR16Sint/tier2/TextureBuffer", "MTLPixelFormatR16Uint/tier2/TextureBuffer", "MTLPixelFormatR32Float/tier1/TextureBuffer", "MTLPixelFormatR32Sint/tier1/TextureBuffer", "MTLPixelFormatR32Uint/tier1/TextureBuffer", "MTLPixelFormatR8Sint/tier2/TextureBuffer", "MTLPixelFormatR8Uint/tier2/TextureBuffer", "MTLPixelFormatR8Unorm/tier2/TextureBuffer", "MTLPixelFormatRGBA16Float/tier2/TextureBuffer", "MTLPixelFormatRGBA16Sint/tier2/TextureBuffer", "MTLPixelFormatRGBA16Uint/tier2/TextureBuffer", "MTLPixelFormatRGBA32Float/tier2/TextureBuffer", "MTLPixelFormatRGBA32Sint/tier2/TextureBuffer", "MTLPixelFormatRGBA32Uint/tier2/TextureBuffer", "MTLPixelFormatRGBA8Sint/tier2/TextureBuffer", "MTLPixelFormatRGBA8Uint/tier2/TextureBuffer", "MTLPixelFormatRGBA8Unorm/tier2/TextureBuffer"} refused: no stream uses it yet (texture-buffer census 11-19, m3-max-52875/52876/52897/52898/52953: 26 streams, no texture-buffer or cube array descriptor, texture or view). The tier's formats as a texture buffer (`Gap::TextureBuffer`), which rt does not build and no replay stream makes or views.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatA8Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatBGR10A2Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatBGRA8Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatBGRA8Unorm_sRGB/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Float/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Snorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR32Float/tier1/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR32Sint/tier1/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR32Uint/tier1/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Snorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Unorm/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG11B10Float/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG16Float/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG32Float/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG8Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Float/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA32Float/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA32Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA32Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Unorm/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Unorm_sRGB/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatA8Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatBGR10A2Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatBGRA8Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatBGRA8Unorm_sRGB/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Float/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Snorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR16Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR32Float/tier1/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR32Sint/tier1/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR32Uint/tier1/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Snorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatR8Unorm/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG11B10Float/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG16Float/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG32Float/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRG8Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Float/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA16Unorm/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA32Float/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA32Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA32Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Sint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Uint/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Unorm/tier2/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors * refused case/MTLPixelFormatRGBA8Unorm_sRGB/beyond/TextureBuffer Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
read-write-tier-descriptors 780M refused case/MTLPixelFormatASTC_4x4_sRGB/Cube Err(Error::Unsupported("no texture of ASTC4x4SRGB is made on this device for the usage")) The device's own answer (rule 2): its format query offers no ASTC 4x4 sRGB image for the usage, so rt makes no texture of the format (`Gap::TextureFormat`).
|
||||
read-write-tier-descriptors 780M refused case/MTLPixelFormatASTC_4x4_sRGB/Type2D Err(Error::Unsupported("no texture of ASTC4x4SRGB is made on this device for the usage")) The device's own answer (rule 2): its format query offers no ASTC 4x4 sRGB image for the usage, so rt makes no texture of the format (`Gap::TextureFormat`).
|
||||
read-write-tier-descriptors 780M refused case/MTLPixelFormatASTC_4x4_sRGB/Type2DArray Err(Error::Unsupported("no texture of ASTC4x4SRGB is made on this device for the usage")) The device's own answer (rule 2): its format query offers no ASTC 4x4 sRGB image for the usage, so rt makes no texture of the format (`Gap::TextureFormat`).
|
||||
@@ -2464,10 +2466,6 @@ tessellation-partition-steps * refused case/MTLTessellationPartitionModeInteger/
|
||||
tessellation-partition-steps * refused case/MTLTessellationPartitionModeInteger/MTLTessellationFactorStepFunctionPerInstance/pipeline Err(Error::Unsupported("a render pipeline state with Tessellation is not built")) Refused until built: a post-tessellation pipeline state with a per-instance factor step function or an enabled factor scale (`Gap::RenderPipeline` of `Tessellation`), whose instance stride and scale no draw pushes. Recorded replay streams draw patches (plain `drawPatches`, no patch index buffer; census m3-max-50694, 50695 and 50696).
|
||||
tessellation-partition-steps * refused case/MTLTessellationPartitionModePow2/MTLTessellationFactorStepFunctionPerInstance Err(Error::Unsupported("a render pipeline state with Tessellation is not built")) Refused until built: a post-tessellation pipeline state with a per-instance factor step function or an enabled factor scale (`Gap::RenderPipeline` of `Tessellation`), whose instance stride and scale no draw pushes. Recorded replay streams draw patches (plain `drawPatches`, no patch index buffer; census m3-max-50694, 50695 and 50696).
|
||||
tessellation-partition-steps * refused case/MTLTessellationPartitionModePow2/MTLTessellationFactorStepFunctionPerInstance/pipeline Err(Error::Unsupported("a render pipeline state with Tessellation is not built")) Refused until built: a post-tessellation pipeline state with a per-instance factor step function or an enabled factor scale (`Gap::RenderPipeline` of `Tessellation`), whose instance stride and scale no draw pushes. Recorded replay streams draw patches (plain `drawPatches`, no patch index buffer; census m3-max-50694, 50695 and 50696).
|
||||
tessellation-patch-indices * refused case/MTLTessellationControlPointIndexTypeUInt16 Err(Error::Translation("the translator made no pipeline: unsupported: Tessellation; needs NotImplemented")) Refused until built: a control-point index type (`tessellationControlPointIndexType`), which the translator's address form of the control stage does not read (`Tessellation`, not implemented). Recorded replay streams draw patches (plain `drawPatches`, no patch index buffer; census m3-max-50694, 50695 and 50696).
|
||||
tessellation-patch-indices * refused case/MTLTessellationControlPointIndexTypeUInt16/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: Tessellation; needs NotImplemented")) Refused until built: a control-point index type (`tessellationControlPointIndexType`), which the translator's address form of the control stage does not read (`Tessellation`, not implemented). Recorded replay streams draw patches (plain `drawPatches`, no patch index buffer; census m3-max-50694, 50695 and 50696).
|
||||
tessellation-patch-indices * refused case/MTLTessellationControlPointIndexTypeUInt32 Err(Error::Translation("the translator made no pipeline: unsupported: Tessellation; needs NotImplemented")) Refused until built: a control-point index type (`tessellationControlPointIndexType`), which the translator's address form of the control stage does not read (`Tessellation`, not implemented). Recorded replay streams draw patches (plain `drawPatches`, no patch index buffer; census m3-max-50694, 50695 and 50696).
|
||||
tessellation-patch-indices * refused case/MTLTessellationControlPointIndexTypeUInt32/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: Tessellation; needs NotImplemented")) Refused until built: a control-point index type (`tessellationControlPointIndexType`), which the translator's address form of the control stage does not read (`Tessellation`, not implemented). Recorded replay streams draw patches (plain `drawPatches`, no patch index buffer; census m3-max-50694, 50695 and 50696).
|
||||
texel-swizzles-r32float * refused case/bgr1/texture/source Err(Error::Unsupported("a swizzled texture buffer of R32Float is not built")) refused: a known gap of the runtime (its README, Known gaps of textures): a texture buffer with a swizzle other than each channel's own (`Gap::TextureBufferSwizzle`); Metal applies it to the reads, and neither a buffer view nor a `gpuResourceID` carries one. Open: the swizzle in the shader's read of a texture buffer.
|
||||
texel-swizzles-r32uint * refused case/red-zero/texture/source Err(Error::Unsupported("a swizzled texture buffer of R32Uint is not built")) refused: a known gap of the runtime (its README, Known gaps of textures): a texture buffer with a swizzle other than each channel's own (`Gap::TextureBufferSwizzle`); Metal applies it to the reads, and neither a buffer view nor a `gpuResourceID` carries one. Open: the swizzle in the shader's read of a texture buffer.
|
||||
texel-swizzles-rg32float * refused case/bgr1/texture/source Err(Error::Unsupported("a swizzled texture buffer of RG32Float is not built")) refused: a known gap of the runtime (its README, Known gaps of textures): a texture buffer with a swizzle other than each channel's own (`Gap::TextureBufferSwizzle`); Metal applies it to the reads, and neither a buffer view nor a `gpuResourceID` carries one. Open: the swizzle in the shader's read of a texture buffer.
|
||||
@@ -2680,8 +2678,7 @@ blend-interaction-format-srgb8 NVIDIA divergent case/blended/one-one-subtract 14
|
||||
blend-interaction-format-srgb8 780M divergent case/blended/one-one-subtract 23 elements differ (U8), the largest difference 1 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this venue's. Two of the device's own answers meet in it: the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table, and metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings), and `metal2vulkan-runtime` leaves the blend to the device's fixed-function unit, which blends and stores by its own arithmetic. Under the native-arithmetic contract both are the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out.
|
||||
blend-interaction-format-srgb8 RX 7900 XTX divergent case/blended/one-one-subtract 23 elements differ (U8), the largest difference 1 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this venue's. Two of the device's own answers meet in it: the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table, and metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings), and `metal2vulkan-runtime` leaves the blend to the device's fixed-function unit, which blends and stores by its own arithmetic. Under the native-arithmetic contract both are the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out.
|
||||
blend-interaction-format-srgb8 Iris(R) Xe divergent case/blended/one-one-subtract 42 elements differ (U8), the largest difference 3 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this venue's. Two of the device's own answers meet in it: the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table, and metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings), and `metal2vulkan-runtime` leaves the blend to the device's fixed-function unit, which blends and stores by its own arithmetic. Under the native-arithmetic contract both are the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out.
|
||||
blend-interaction-format-srgb8 256 bits) on x86-64 AVX2 divergent case/blended/one-one-subtract 81 elements differ (U8), the largest difference 3 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this venue's. Two of the device's own answers meet in it: the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table, and metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings), and `metal2vulkan-runtime` leaves the blend to the device's fixed-function unit, which blends and stores by its own arithmetic. Under the native-arithmetic contract both are the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out. The count follows the host's vector ISA, not its LLVM: 81 on AVX2 (LLVM 23.1.1, and LLVM 23.1.4 in m3-max-63645), 78 on AVX-512 (the row `on x86-64 AVX-512`).
|
||||
blend-interaction-format-srgb8 on x86-64 AVX-512 divergent case/blended/one-one-subtract 78 elements differ (U8), the largest difference 3 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this venue's. Two of the device's own answers meet in it: the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table, and metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings), and `metal2vulkan-runtime` leaves the blend to the device's fixed-function unit, which blends and stores by its own arithmetic. Under the native-arithmetic contract both are the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out.
|
||||
blend-interaction-format-srgb8 llvmpipe divergent case/blended/one-one-subtract 81 elements differ (U8), the largest difference 3 | 78 elements differ (U8), the largest difference 3 Metal's stored sRGB code and ours differ at this site, and the row's count and bound are this venue's. Two of the device's own answers meet in it: the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table, and metal's compiler folds the attachment's blend and its format conversion into the fragment function under fast math (measured on an Apple M3 Max, macOS 27.0.1, from the `half-output-blends-*` family's recordings), and `metal2vulkan-runtime` leaves the blend to the device's fixed-function unit, which blends and stores by its own arithmetic. Under the native-arithmetic contract both are the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out. The count is 81 or 78 by a property of the host finer than its widest vector set, which the venue does not state: 81 on AVX2 hosts (m3-max-50686 and m3-max-56427 at Mesa 26.2.4 and LLVM 23.1.1, m3-max-63645 at LLVM 23.1.4) and on an AVX-512 runner of CI's image (CI run 46984549568); 78 on AVX-512 hosts (m3-max-56238 and m3-max-56342 at LLVM 23.1.4; CI runs 46969176610 and 46974578786 at Mesa 26.2.4 and LLVM 23.1.1).
|
||||
blend-interaction-format-srgb8 Iris(R) Xe divergent case/blended/one-zero-add 256 elements differ (U8), the largest difference 1 Metal's stored sRGB code and ours are a code apart at this site, which writes the colour unblended (`off`) or blends it by one and zero (`one-zero-add`): the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table. Under the native-arithmetic contract the device's encode is the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, where near a tie the device may store the other code, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out.
|
||||
blend-interaction-format-srgb8 llvmpipe (LLVM 23.1.1, 256 bits) divergent case/blended/one-zero-add 256 elements differ (U8), the largest difference 1 Metal's stored sRGB code and ours are a code apart at this site, which writes the colour unblended (`off`) or blends it by one and zero (`one-zero-add`): the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table. Under the native-arithmetic contract the device's encode is the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, where near a tie the device may store the other code, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out.
|
||||
blend-interaction-format-srgb8 llvmpipe (LLVM 23.1.4, 256 bits) divergent case/blended/one-zero-add 256 elements differ (U8), the largest difference 1 Metal's stored sRGB code and ours are a code apart at this site, which writes the colour unblended (`off`) or blends it by one and zero (`one-zero-add`): the device encodes the colour into sRGB by its own approximation, where Metal encodes through its twelve-bit table. Under the native-arithmetic contract the device's encode is the answer: `device-color-conversion`, which the run announces, records the device's conversion into the attachment, blended or not, where near a tie the device may store the other code, and validation derives no tolerance from it. Open: nothing in the product; reproducing Metal's bits on the device is the emulation the native-arithmetic contract rules out.
|
||||
@@ -5651,14 +5648,14 @@ heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/Cube/64x64x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/Cube/64x64x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/Cube/64x64x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of YCBCR84202P is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatYCBCR8_420_2P). rt makes no texture of MTLPixelFormatYCBCR8_420_2P for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatYCBCR8_420_2P/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of YCBCR84202P is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatYCBCR8_420_2P). rt makes no texture of MTLPixelFormatYCBCR8_420_2P for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/Type1D/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/Type1D/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-formats-without-textures * refused case/MTLPixelFormatRGBA16Float_XR/Type1D/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Unsupported("no texture of RGBA16FloatXR is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Float_XR). rt makes no texture of MTLPixelFormatRGBA16Float_XR for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
@@ -5819,18 +5816,18 @@ heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/Cube/16x16x1
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/Cube/16x16x1/levels-1/samples-1/slices-1/usage-0x4/private/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/Cube/16x16x1/levels-1/samples-1/slices-1/usage-0x4/shared/makes-texture Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/Cube/16x16x1/levels-1/samples-1/slices-1/usage-0x4/shared/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/shared/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/shared/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/private/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x3/shared/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/private/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/private/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/TextureBuffer/16x1x1/levels-1/samples-1/slices-1/usage-0x4/shared/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/Type1D/16x1x1/levels-1/samples-1/slices-1/usage-0x1/private/makes-texture Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/Type1D/16x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
heap-sizes-unspecialized * refused case/MTLPixelFormatUnspecialized/Type1D/16x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Unsupported("no texture of Unspecialized is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatUnspecialized). rt makes no texture of MTLPixelFormatUnspecialized for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
@@ -5915,9 +5912,9 @@ indirect-mesh-commands-object-threadgroup-lengths * refused case/pipeline Err(Un
|
||||
indirect-render-commands-drawn * refused case/command-buffer Err(Unavailable({call: "indirect_command_buffer"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no indirect command buffer). The rt side of the suite answers `indirect_command_buffer` Unavailable: it does not port rt's `Device::new_indirect_command_buffer` yet.
|
||||
indirect-render-commands-executed * refused case/command-buffer Err(Unavailable({call: "indirect_command_buffer"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no indirect command buffer). The rt side of the suite answers `indirect_command_buffer` Unavailable: it does not port rt's `Device::new_indirect_command_buffer` yet.
|
||||
indirect-render-commands-inherited-state * refused case/own-state/command-buffer Err(Unavailable({call: "indirect_command_buffer"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no indirect command buffer). The rt side of the suite answers `indirect_command_buffer` Unavailable: it does not port rt's `Device::new_indirect_command_buffer` yet.
|
||||
indirect-render-commands-patch-draws * refused case/pipeline:indexed Err(Error::Translation("the translator made no pipeline: unsupported: Tessellation; needs NotImplemented")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, every pipeline descriptor's supportIndirectCommandBuffers NO). The translator makes no pipeline for the case's indexed patch pipeline (Tessellation, NotImplemented: a FALLBACK); its plain pipeline is made.
|
||||
indirect-render-commands-patch-draws * refused case/command-buffer Err(Unavailable({call: "indirect_command_buffer"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no indirect command buffer). The rt side of the suite answers `indirect_command_buffer` Unavailable: it does not port rt's `Device::new_indirect_command_buffer` yet.
|
||||
indirect-render-commands-under-the-pass-state * refused case/command-buffer Err(Unavailable({call: "indirect_command_buffer"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no indirect command buffer). The rt side of the suite answers `indirect_command_buffer` Unavailable: it does not port rt's `Device::new_indirect_command_buffer` yet.
|
||||
indirect-render-commands-vertex-stride * refused case/pipeline Err(Error::Unsupported("a render pipeline state with DrawInput is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, every pipeline descriptor's supportIndirectCommandBuffers NO). A state made for indirect command buffers fetches every [[stage_in]] attribute in the shader, at its layout's stride, and this row's layout is MTLBufferLayoutStrideDynamic: the stride each bind sets (setVertexBuffer:offset:attributeStride:atIndex:, a command's included) is a push field the encoder does not fill, so rt refuses the state at its making (Gap::RenderPipeline, RenderPipelineKind::DrawInput; rt README, Known gaps of indirect command buffers).
|
||||
indirect-render-commands-vertex-stride * refused case/pipeline Err(Error::Unsupported("a render pipeline state with DrawInput { cause: DynamicStride } is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, every pipeline descriptor's supportIndirectCommandBuffers NO). A state made for indirect command buffers fetches every [[stage_in]] attribute in the shader, at its layout's stride, and this row's layout is MTLBufferLayoutStrideDynamic: the stride each bind sets (setVertexBuffer:offset:attributeStride:atIndex:, a command's included) is a push field the encoder does not fill, so rt refuses the state at its making (Gap::RenderPipeline, RenderPipelineKind::DrawInput; rt README, Known gaps of indirect command buffers).
|
||||
library-from-data * refused case/program Err(Unavailable({call: "archives"})) refused: the consumer's own (MTLBinaryArchive, binaryArchives). The consumer keeps its binary archives in its own bundle: the device's archive holds only each added function's lookup key, and serializing and loading use the bundle's own file format, so rt is never asked.
|
||||
mesh-commands-own-state * refused case/object-pipeline Err(Unavailable({call: "mesh_pipeline_for_commands"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no mesh pipeline, mesh draw or vertex amplification query). The rt side of the suite answers `mesh_pipeline_for_commands` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
mesh-commands-unordered-draws * refused case/writer-pipeline Err(Unavailable({call: "mesh_pipeline_for_commands"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no mesh pipeline, mesh draw or vertex amplification query). The rt side of the suite answers `mesh_pipeline_for_commands` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
@@ -5986,20 +5983,6 @@ padded-blend-rgb10a2-srgb-add-float * refused case/pipeline Err(Error::Translati
|
||||
padded-blend-rgb10a2-srgb-dual-half * refused case/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: FramebufferFetch; needs NotImplemented at metadata of entry xrb_dual_half, color attachment 0")) refused: no stream uses it yet (rt play-report census 11-19: 158 rt reports across the matrix streams, no render pipeline refused for framebuffer fetch). The translator refuses the pipeline: its fragment function computes the blend into a padded extended-range attachment over its own read of the attachment (FramebufferFetch, not implemented), a form not built on any device (rt README, Known gaps of pipeline states); it is built on the runtime's own fetch form when a guest meets it.
|
||||
padded-blend-rgb10a2-srgb-premul-half * refused case/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: FramebufferFetch; needs NotImplemented at metadata of entry rt6_fill_rgba16float, color attachment 0")) refused: no stream uses it yet (rt play-report census 11-19: 158 rt reports across the matrix streams, no render pipeline refused for framebuffer fetch). The translator refuses the pipeline: its fragment function computes the blend into a padded extended-range attachment over its own read of the attachment (FramebufferFetch, not implemented), a form not built on any device (rt README, Known gaps of pipeline states); it is built on the runtime's own fetch form when a guest meets it.
|
||||
padded-blend-rgb10a2-srgb-premul-rgb-half * refused case/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: FramebufferFetch; needs NotImplemented at metadata of entry rt6_fill_rgba16float, color attachment 0")) refused: no stream uses it yet (rt play-report census 11-19: 158 rt reports across the matrix streams, no render pipeline refused for framebuffer fetch). The translator refuses the pipeline: its fragment function computes the blend into a padded extended-range attachment over its own read of the attachment (FramebufferFetch, not implemented), a form not built on any device (rt README, Known gaps of pipeline states); it is built on the runtime's own fetch form when a guest meets it.
|
||||
pass-start-barrier-new-texture-chain Iris(R) Xe refused case/pieces/2-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-new-texture-chain llvmpipe refused case/pieces/2-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-new-texture-chain 780M refused case/pieces/2-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-new-texture-chain RX 7900 XTX refused case/pieces/2-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-barrier-read Iris(R) Xe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-barrier-read llvmpipe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-barrier-sample Iris(R) Xe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-barrier-sample llvmpipe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-draw-barrier-read Iris(R) Xe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-draw-barrier-read llvmpipe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-read llvmpipe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-read Iris(R) Xe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-sample llvmpipe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pass-start-barrier-over-buffer-sample Iris(R) Xe refused case/pieces/1-renderCommandEncoder Err(Error::Unsupported("a draw with AttachmentRead is not built")) rt's own gap, not the device's: the pass reads, at its own pixels, its target, a texture over a buffer, and where the device's linear image lies at the buffer's pitch that texture is a linear image on the buffer's memory (rule 3's form), which rt gives no attachment read, neither the feedback usage nor a shadow (texture.rs: only an image a texture's own plan makes takes them), so the draw is Gap::Draw (AttachmentRead). Expected from the code and the venues' pattern, not shown by a counter: the 32-texel targets (128-byte rows) refuse on lavapipe and the Iris Xe and are read on the Radeon 780M, the 896-texel one (3,584-byte rows) refuses on all three, and the RTX 3090 reads both (53452, 53559).
|
||||
pipeline-facts-compute-described * refused case/state Err(Error::Unsupported("indirect command buffers of ComputeCommands are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, every pipeline descriptor's supportIndirectCommandBuffers NO). Gap::IndirectCommandBuffers, IndirectCommandsKind::ComputeCommands: a compute pipeline state for indirect command buffers is refused on every device; compute commands are not built (the runtime README, Known gaps of indirect command buffers).
|
||||
pipeline-facts-compute-imageblock * refused case/facts/imageblock_memory_length Err(Error::Unsupported("the state's imageblock length is not measured against Metal's")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no imageblock). Gap::ImageblockLength: rt makes and dispatches the state of a kernel that reaches an explicit imageblock, at the size its encoder sets, and Metal's rule for such a state's imageblockMemoryLengthForDimensions: is not measured: this recording answers one extent of one kernel, which settles no rule.
|
||||
pipeline-functions-cleared * refused case/facts Err(Unavailable({call: "render_pipeline_functions_descriptor_facts"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no render pipeline functions descriptor and no binary function linking). The rt side of the suite answers `render_pipeline_functions_descriptor_facts` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
@@ -6339,62 +6322,48 @@ sample-fills-whole-2 AMD Radeon 780M refused case/work Err({refused: Unavailable
|
||||
sample-fills-whole-2 RX 7900 XTX refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
sample-fills-whole-2 NVIDIA refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
sample-fills-whole-2 Iris(R) Xe refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
sample-positions-custom-left * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-custom-mixed * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-custom-right * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-fewer-left-of-the-middle * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-fewer-right-of-a-far-edge * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-fewer-right-of-the-middle * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-high * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-off-grid * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-off-grid-low * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-option-under-resolve * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "storeActionOptions"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, storeActionOptions 0 wherever one is set). The rt side of the suite answers `storeActionOptions` Unavailable: rt's render pass descriptor has no field for store action options (the rt README, Known gaps of render encoders).
|
||||
sample-positions-option-under-store-and-resolve * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "storeActionOptions"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, storeActionOptions 0 wherever one is set). The rt side of the suite answers `storeActionOptions` Unavailable: rt's render pass descriptor has no field for store action options (the rt README, Known gaps of render encoders).
|
||||
sample-positions-rounded-0-53125 * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-rounded-0-55 * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-rounded-0-5624 * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-rounded-0-5625 * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-rounded-0-99 * refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-custom-2x Iris(R) Xe refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-default-2x Iris(R) Xe divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A resolve of an 8-bit unorm channel, a code apart. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, whose rounding is the device's: the static note `PrecisionNote::DeviceRoundedResolve` (rule 1), whose recorded bound holds every unorm channel within one code of Metal's, which covers this site. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x Iris(R) Xe divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A resolve of an 8-bit unorm channel, a code apart. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, whose rounding is the device's: the static note `PrecisionNote::DeviceRoundedResolve` (rule 1), whose recorded bound holds every unorm channel within one code of Metal's, which covers this site. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-custom-2x RADV refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-default-2x RADV divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A resolve of an 8-bit unorm channel, a code apart. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, whose rounding is the device's: the static note `PrecisionNote::DeviceRoundedResolve` (rule 1), whose recorded bound holds every unorm channel within one code of Metal's, which covers this site. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x RADV divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A resolve of an 8-bit unorm channel, a code apart. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, whose rounding is the device's: the static note `PrecisionNote::DeviceRoundedResolve` (rule 1), whose recorded bound holds every unorm channel within one code of Metal's, which covers this site. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-custom-2x NVIDIA refused case/calls/0-renderCommandEncoder Err(Unavailable({call: "setSamplePositions:count:"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no setSamplePositions:count:). The rt side of the suite answers `setSamplePositions:count:` Unavailable: rt's render pass descriptor has no sample positions, and no replay stream sets them.
|
||||
sample-positions-default-2x NVIDIA divergent case/resolved 2 elements differ (U8), the largest difference 1 A resolve of an 8-bit unorm channel, a code apart. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, whose rounding is the device's: the static note `PrecisionNote::DeviceRoundedResolve` (rule 1), whose recorded bound holds every unorm channel within one code of Metal's, which covers this site. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x NVIDIA divergent case/resolved 2 elements differ (U8), the largest difference 1 A resolve of an 8-bit unorm channel, a code apart. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, whose rounding is the device's: the static note `PrecisionNote::DeviceRoundedResolve` (rule 1), whose recorded bound holds every unorm channel within one code of Metal's, which covers this site. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x llvmpipe divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A resolve of an 8-bit unorm channel, a code apart. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, whose rounding is the device's: the static note `PrecisionNote::DeviceRoundedResolve` (rule 1), whose recorded bound holds every unorm channel within one code of Metal's, which covers this site. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-2x Iris(R) Xe divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A tie, and only a tie: the pass covers half the samples (1 of 2, 2 of 4) with red 1/255 and alpha 1, so each channel's average lies exactly halfway between two codes, and the site differs only by how that half rounds. Metal's rounding of a tie is the GPU's own: the Apple M3 Max this row was recorded on rounds it up (red 1, alpha 128), an AMD Radeon Pro 5300M under macOS 26.7.1 to the even code (red 0, alpha 128; job m3-max-82284), so no answer there is Metal's for every guest. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, and this device's rounding of the tie stands (rule 1, the static note `PrecisionNote::DeviceRoundedResolve`); neither Mac's rounding is emulated. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x Iris(R) Xe divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A tie, and only a tie: the pass covers half the samples (1 of 2, 2 of 4) with red 1/255 and alpha 1, so each channel's average lies exactly halfway between two codes, and the site differs only by how that half rounds. Metal's rounding of a tie is the GPU's own: the Apple M3 Max this row was recorded on rounds it up (red 1, alpha 128), an AMD Radeon Pro 5300M under macOS 26.7.1 to the even code (red 0, alpha 128; job m3-max-82284), so no answer there is Metal's for every guest. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, and this device's rounding of the tie stands (rule 1, the static note `PrecisionNote::DeviceRoundedResolve`); neither Mac's rounding is emulated. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-2x RADV divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A tie, and only a tie: the pass covers half the samples (1 of 2, 2 of 4) with red 1/255 and alpha 1, so each channel's average lies exactly halfway between two codes, and the site differs only by how that half rounds. Metal's rounding of a tie is the GPU's own: the Apple M3 Max this row was recorded on rounds it up (red 1, alpha 128), an AMD Radeon Pro 5300M under macOS 26.7.1 to the even code (red 0, alpha 128; job m3-max-82284), so no answer there is Metal's for every guest. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, and this device's rounding of the tie stands (rule 1, the static note `PrecisionNote::DeviceRoundedResolve`); neither Mac's rounding is emulated. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x RADV divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A tie, and only a tie: the pass covers half the samples (1 of 2, 2 of 4) with red 1/255 and alpha 1, so each channel's average lies exactly halfway between two codes, and the site differs only by how that half rounds. Metal's rounding of a tie is the GPU's own: the Apple M3 Max this row was recorded on rounds it up (red 1, alpha 128), an AMD Radeon Pro 5300M under macOS 26.7.1 to the even code (red 0, alpha 128; job m3-max-82284), so no answer there is Metal's for every guest. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, and this device's rounding of the tie stands (rule 1, the static note `PrecisionNote::DeviceRoundedResolve`); neither Mac's rounding is emulated. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-2x NVIDIA divergent case/resolved 2 elements differ (U8), the largest difference 1 A tie, and only a tie: the pass covers half the samples (1 of 2, 2 of 4) with red 1/255 and alpha 1, so each channel's average lies exactly halfway between two codes, and the site differs only by how that half rounds. Metal's rounding of a tie is the GPU's own: the Apple M3 Max this row was recorded on rounds it up (red 1, alpha 128), an AMD Radeon Pro 5300M under macOS 26.7.1 to the even code (red 0, alpha 128; job m3-max-82284), so no answer there is Metal's for every guest. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, and this device's rounding of the tie stands (rule 1, the static note `PrecisionNote::DeviceRoundedResolve`); neither Mac's rounding is emulated. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x NVIDIA divergent case/resolved 2 elements differ (U8), the largest difference 1 A tie, and only a tie: the pass covers half the samples (1 of 2, 2 of 4) with red 1/255 and alpha 1, so each channel's average lies exactly halfway between two codes, and the site differs only by how that half rounds. Metal's rounding of a tie is the GPU's own: the Apple M3 Max this row was recorded on rounds it up (red 1, alpha 128), an AMD Radeon Pro 5300M under macOS 26.7.1 to the even code (red 0, alpha 128; job m3-max-82284), so no answer there is Metal's for every guest. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, and this device's rounding of the tie stands (rule 1, the static note `PrecisionNote::DeviceRoundedResolve`); neither Mac's rounding is emulated. Validation derives no tolerance from it. Open: nothing.
|
||||
sample-positions-default-4x llvmpipe divergent case/resolved 1 element differs (U8): Metal 1 (0x1), ours 0 (0x0) A tie, and only a tie: the pass covers half the samples (1 of 2, 2 of 4) with red 1/255 and alpha 1, so each channel's average lies exactly halfway between two codes, and the site differs only by how that half rounds. Metal's rounding of a tie is the GPU's own: the Apple M3 Max this row was recorded on rounds it up (red 1, alpha 128), an AMD Radeon Pro 5300M under macOS 26.7.1 to the even code (red 0, alpha 128; job m3-max-82284), so no answer there is Metal's for every guest. rt resolves by Vulkan's `AVERAGE` resolve in the pass's own rendering, and this device's rounding of the tie stands (rule 1, the static note `PrecisionNote::DeviceRoundedResolve`); neither Mac's rounding is emulated. Validation derives no tolerance from it. Open: nothing.
|
||||
sampler-cubic-filter * refused case/cubic/sampler Err(Error::Unsupported("cubic sampler filters are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no sampler descriptor with a cubic filter). rt refuses it (cubic sampler filters are not built), and no replay stream asks it.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA16Float_XR/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA16Float_XR/Type2DMultisample/8x8x1/levels-1/samples-4/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA16Float_XR/Type2DMultisample/8x8x1/levels-1/samples-8/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/managed/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/shared/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/managed/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/shared/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/managed/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/shared/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/managed/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/shared/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/managed/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/shared/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/managed/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/shared/made Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource-after-handle Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, again once its handle is made and a texture opened from it, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource-after-handle Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, again once its handle is made and a texture opened from it, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-extended-range-samples * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Error::Unsupported("no texture of R10UnormX6 is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatR10Unorm_X6). rt makes no texture of MTLPixelFormatR10Unorm_X6 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade), and the shared creator makes the texture newTextureWithDescriptor: makes.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR10Unorm_X6_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Error::Unsupported("no texture of R10UnormX6SRGB is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatR10Unorm_X6_sRGB). rt makes no texture of MTLPixelFormatR10Unorm_X6_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade), and the shared creator makes the texture newTextureWithDescriptor: makes.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource-after-handle Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, again once its handle is made and a texture opened from it, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatR16Uint/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Error::Unsupported("no texture of RG10UnormX12 is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRG10Unorm_X12). rt makes no texture of MTLPixelFormatRG10Unorm_X12 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade), and the shared creator makes the texture newTextureWithDescriptor: makes.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRG10Unorm_X12_sRGB/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/made Err(Error::Unsupported("no texture of RG10UnormX12SRGB is made on this device for the usage")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRG10Unorm_X12_sRGB). rt makes no texture of MTLPixelFormatRG10Unorm_X12_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade), and the shared creator makes the texture newTextureWithDescriptor: makes.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/resource-after-handle Err(TheConsumers("metal2vulkan-runtime keeps no label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset or isAliasable of a resource: its consumer keeps what it made each with and where it placed it")) refused: the consumer's own (label, device, cpuCacheMode, hazardTrackingMode, resourceOptions, heap, heapOffset, isAliasable). The case reads the eight here of the texture the shared creator made, again once its handle is made and a texture opened from it, and storageMode with them, so the site's storageMode is not compared either.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-creator-padded-format-storage * refused case/MTLPixelFormatRGBA8Unorm/Type2D/8x8x1/levels-1/samples-1/slices-1/usage-0x1/private/texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
shared-event-handle-round-trip * refused case/handle-round-trip Err(Unavailable({call: "shared_event_handle_round_trip"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared event handle). The rt side of the suite answers `shared_event_handle_round_trip` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
shared-exponent-reads llvmpipe refused case/fpv_srgb_read_write/dispatch Err(Error::Unsupported("texture slot 0, which a function writes or reads as storage, bound to a RGB9E5Float texture with no storage element on this device, or one it cannot read without a format, is not built")) The device's own answer (rule 2): this device's format queries offer no storage image of MTLPixelFormatRGB9E5Float, so rt binds no such texture to a read_write or write slot.
|
||||
shared-exponent-reads NVIDIA refused case/fpv_srgb_read_write/dispatch Err(Error::Unsupported("texture slot 0, which a function writes or reads as storage, bound to a RGB9E5Float texture with no storage element on this device, or one it cannot read without a format, is not built")) The device's own answer (rule 2): this device's format queries offer no storage image of MTLPixelFormatRGB9E5Float, so rt binds no such texture to a read_write or write slot.
|
||||
@@ -6718,8 +6687,8 @@ texture-fills-42 * refused case/work Err({refused: Unavailable({call: "fillTextu
|
||||
texture-fills-43 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-53 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-55 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-550 * refused case/work Err({refused: Error::Unsupported("a heap texture of RGB10A82PXR10 is not placed in this heap on this device"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-551 * refused case/work Err({refused: Error::Unsupported("a heap texture of RGB10A82PXR10SRGB is not placed in this heap on this device"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10_sRGB). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-550 * refused case/work Err({refused: Error::Unsupported("no texture of RGB10A82PXR10 is made on this device for the usage"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-551 * refused case/work Err({refused: Error::Unsupported("no texture of RGB10A82PXR10SRGB is made on this device for the usage"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10_sRGB). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-60 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-65 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-70 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
@@ -6730,14 +6699,12 @@ texture-fills-90 * refused case/work Err({refused: Unavailable({call: "fillTextu
|
||||
texture-fills-92 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-93 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-94 * refused case/work Err({refused: Unavailable({call: "fillTexture:level:slice:region:bytes:length:"}), step: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no fillTexture call). The rt side of the suite answers `fillTexture:level:slice:region:bytes:length:` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-fills-heap-run-550-b5 * refused case/work Err({refused: Error::Unsupported("a heap texture of RGB10A82PXR10 is not placed in this heap on this device"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-heap-run-551-b5 * refused case/work Err({refused: Error::Unsupported("a heap texture of RGB10A82PXR10SRGB is not placed in this heap on this device"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10_sRGB). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-heap-run-550-b5 * refused case/work Err({refused: Error::Unsupported("no texture of RGB10A82PXR10 is made on this device for the usage"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-heap-run-551-b5 * refused case/work Err({refused: Error::Unsupported("no texture of RGB10A82PXR10SRGB is made on this device for the usage"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10_sRGB). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-own-two-plane-550 * refused case/work Err({refused: Error::Unsupported("no texture of RGB10A82PXR10 is made on this device for the usage"), resource: 0 (0x0)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-fills-own-two-plane-551 * refused case/work Err({refused: Error::Unsupported("no texture of RGB10A82PXR10SRGB is made on this device for the usage"), resource: 0 (0x0)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10_sRGB). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/plain-contents/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/plain-contents/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/plain-contents/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x4/memoryless/plain-contents/size-and-align Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x4/memoryless/plain-contents/texture Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-plain-contents * refused case/MTLPixelFormatRGBA8Unorm/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x4/memoryless/size-and-align Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
@@ -6752,14 +6719,10 @@ texture-pairs-storage-crossings * refused case/MTLPixelFormatDepth32Float/Type2D
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatDepth32Float/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x4/memoryless/texture Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Cube/64x64x1/levels-7/samples-1/slices-1/usage-0x1/memoryless/size-and-align Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Cube/64x64x1/levels-7/samples-1/slices-1/usage-0x1/memoryless/texture Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/managed/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/managed/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/managed/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x0/memoryless/size-and-align Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x0/memoryless/texture Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x1/memoryless/size-and-align Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
@@ -6788,15 +6751,12 @@ texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Type3D/6
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Type3D/64x64x8/levels-7/samples-1/slices-1/usage-0x1/memoryless/texture Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Type3D/8x8x64/levels-4/samples-1/slices-1/usage-0x1/memoryless/size-and-align Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-storage-crossings * refused case/MTLPixelFormatRGBA8Unorm/Type3D/8x8x64/levels-4/samples-1/slices-1/usage-0x1/memoryless/texture Err(Error::Unsupported("Memoryless textures are not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture descriptor of Memoryless storage). rt refuses it (Memoryless textures are not built), and no replay stream asks it.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatR8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatR8Unorm/TextureBuffer/64x1x1/levels-2/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatR8Unorm/TextureBuffer/64x1x1/levels-7/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA16Float/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA16Float/TextureBuffer/64x1x1/levels-2/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA16Float/TextureBuffer/64x1x1/levels-7/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-2/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-7/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatR8Unorm/TextureBuffer/64x1x1/levels-2/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("2 mipmap levels are none or past the texture's 1")) refused: rt's texture buffer takes one mipmap level, as `Buffer::new_texture`'s does (`Refusal::TextureLevelCount`), where Metal's heap answers a texture buffer of more levels at its one level's footprint (256 bytes at 16 for this descriptor) and Metal's device takes such a descriptor and answers its level count back (this case's module notes). Open: a texture buffer of more than one level.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatR8Unorm/TextureBuffer/64x1x1/levels-7/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("7 mipmap levels are none or past the texture's 1")) refused: rt's texture buffer takes one mipmap level, as `Buffer::new_texture`'s does (`Refusal::TextureLevelCount`), where Metal's heap answers a texture buffer of more levels at its one level's footprint (256 bytes at 16 for this descriptor) and Metal's device takes such a descriptor and answers its level count back (this case's module notes). Open: a texture buffer of more than one level.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA16Float/TextureBuffer/64x1x1/levels-2/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("2 mipmap levels are none or past the texture's 1")) refused: rt's texture buffer takes one mipmap level, as `Buffer::new_texture`'s does (`Refusal::TextureLevelCount`), where Metal's heap answers a texture buffer of more levels at its one level's footprint (256 bytes at 16 for this descriptor) and Metal's device takes such a descriptor and answers its level count back (this case's module notes). Open: a texture buffer of more than one level.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA16Float/TextureBuffer/64x1x1/levels-7/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("7 mipmap levels are none or past the texture's 1")) refused: rt's texture buffer takes one mipmap level, as `Buffer::new_texture`'s does (`Refusal::TextureLevelCount`), where Metal's heap answers a texture buffer of more levels at its one level's footprint (256 bytes at 16 for this descriptor) and Metal's device takes such a descriptor and answers its level count back (this case's module notes). Open: a texture buffer of more than one level.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-2/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("2 mipmap levels are none or past the texture's 1")) refused: rt's texture buffer takes one mipmap level, as `Buffer::new_texture`'s does (`Refusal::TextureLevelCount`), where Metal's heap answers a texture buffer of more levels at its one level's footprint (256 bytes at 16 for this descriptor) and Metal's device takes such a descriptor and answers its level count back (this case's module notes). Open: a texture buffer of more than one level.
|
||||
texture-pairs-type-levels-slices * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-7/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("7 mipmap levels are none or past the texture's 1")) refused: rt's texture buffer takes one mipmap level, as `Buffer::new_texture`'s does (`Refusal::TextureLevelCount`), where Metal's heap answers a texture buffer of more levels at its one level's footprint (256 bytes at 16 for this descriptor) and Metal's device takes such a descriptor and answers its level count back (this case's module notes). Open: a texture buffer of more than one level.
|
||||
texture-pairs-usage-crossings llvmpipe refused case/MTLPixelFormatASTC_4x4_LDR/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of ASTC4x4LDR is made on this device for the usage")) The device's own answer (rule 2): this device's format queries offer no image of MTLPixelFormatASTC_4x4_LDR with the usage the case asks, so rt makes no such texture (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-pairs-usage-crossings AMD Radeon 780M refused case/MTLPixelFormatASTC_4x4_LDR/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of ASTC4x4LDR is made on this device for the usage")) The device's own answer (rule 2): this device's format queries offer no image of MTLPixelFormatASTC_4x4_LDR with the usage the case asks, so rt makes no such texture (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-pairs-usage-crossings RX 7900 XTX refused case/MTLPixelFormatASTC_4x4_LDR/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Unsupported("no texture of ASTC4x4LDR is made on this device for the usage")) The device's own answer (rule 2): this device's format queries offer no image of MTLPixelFormatASTC_4x4_LDR with the usage the case asks, so rt makes no such texture (Gap::TextureFormat, or the creator's NotMade).
|
||||
@@ -6833,32 +6793,19 @@ texture-pairs-usage-crossings AMD Radeon 780M refused case/MTLPixelFormatBC1_RGB
|
||||
texture-pairs-usage-crossings RX 7900 XTX refused case/MTLPixelFormatBC1_RGBA/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x4/private/texture Err(Error::Unsupported("no texture of BC1RGBA is made on this device for the usage")) The device's own answer (rule 2): this device's format queries offer no image of MTLPixelFormatBC1_RGBA with the usage the case asks, so rt makes no such texture (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-pairs-usage-crossings NVIDIA refused case/MTLPixelFormatBC1_RGBA/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x4/private/texture Err(Error::Unsupported("no texture of BC1RGBA is made on this device for the usage")) The device's own answer (rule 2): this device's format queries offer no image of MTLPixelFormatBC1_RGBA with the usage the case asks, so rt makes no such texture (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-pairs-usage-crossings Iris(R) Xe refused case/MTLPixelFormatBC1_RGBA/Type2D/64x64x1/levels-1/samples-1/slices-1/usage-0x4/private/texture Err(Error::Unsupported("no texture of BC1RGBA is made on this device for the usage")) The device's own answer (rule 2): this device's format queries offer no image of MTLPixelFormatBC1_RGBA with the usage the case asks, so rt makes no such texture (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x0/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x0/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x11/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x11/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x2/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x2/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x3/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x3/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4000/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4000/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4001/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4001/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x5/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x5/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8000/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8000/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8001/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8001/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0xc001/private/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0xc001/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x0/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x11/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x2/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x3/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4000/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x4001/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x5/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8000/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x8001/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-pairs-usage-crossings * refused case/MTLPixelFormatRGBA8Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0xc001/private/texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
texture-round-trip-11 llvmpipe refused case/texture Err(NotMade) The device's own answer (rule 2): this device's format queries offer no image of MTLPixelFormatR8Unorm_sRGB with the usage the case asks, so rt makes no such texture (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-round-trip-116 * refused case/texture Err(NotMade) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGBA16Bfloat). rt makes no texture of MTLPixelFormatRGBA16Bfloat for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-round-trip-26 * refused case/texture Err(NotMade) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatR16Bfloat). rt makes no texture of MTLPixelFormatR16Bfloat for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
@@ -6875,8 +6822,26 @@ texture-round-trip-578 * refused case/texture Err(NotMade) refused: no stream us
|
||||
texture-round-trip-579 * refused case/texture Err(NotMade) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRG10Unorm_X12_sRGB). rt makes no texture of MTLPixelFormatRG10Unorm_X12_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-round-trip-586 * refused case/texture Err(NotMade) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A2Unorm_sRGB). rt makes no texture of MTLPixelFormatRGB10A2Unorm_sRGB for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-round-trip-66 * refused case/texture Err(NotMade) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRG16Bfloat). rt makes no texture of MTLPixelFormatRG16Bfloat for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
texture-shared-handles * refused case/shared-texture Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-view-descriptors * refused case/shared-texture Err(Unavailable({call: "shared_texture"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no shared texture or its handle). The rt side of the suite answers `shared_texture` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
texture-shared-handles * refused case/shared-texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/shared-texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/shared-texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/shared-texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/shared-texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/view-of-the-shared-texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/view-of-the-shared-texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/view-of-the-shared-texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/view-of-the-shared-texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-shared-handles * refused case/view-of-the-shared-texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/shared-texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/shared-texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/shared-texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/shared-texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/shared-texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/view-of-the-shared-texture/expected_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/view-of-the-shared-texture/has_parent Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/view-of-the-shared-texture/parent_relative_level Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/view-of-the-shared-texture/parent_relative_slice Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
texture-view-descriptors * refused case/view-of-the-shared-texture/shareable Err(TheConsumers("metal2vulkan-runtime keeps no parentTexture, parentRelativeLevel, parentRelativeSlice or shareable: its consumer keeps the texture it made a view of and what it shared")) refused: the consumer's own (parentTexture, parentRelativeLevel, parentRelativeSlice, shareable). rt's view keeps the texture whose image it reads and no getter; its consumer keeps the texture it made a view of and what it shared.
|
||||
tile-descriptor-defaults * refused case/facts Err(Unavailable({call: "tile_descriptor_facts"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no tile render pipeline). The rt side of the suite answers `tile_descriptor_facts` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
tile-descriptor-reset * refused case/facts Err(Unavailable({call: "tile_descriptor_facts"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no tile render pipeline). The rt side of the suite answers `tile_descriptor_facts` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
tile-descriptor-set * refused case/facts Err(Unavailable({call: "tile_descriptor_facts"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no tile render pipeline). The rt side of the suite answers `tile_descriptor_facts` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
@@ -6897,24 +6862,25 @@ tile-simd-blur-columns * refused case/state Err(Unavailable({call: "tile_pipelin
|
||||
tile-simd-blur-rows * refused case/state Err(Unavailable({call: "tile_pipeline"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no tile render pipeline). The rt side of the suite answers `tile_pipeline` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
tile-state-thread-limits * refused case/state-limited-1024 Err(Unavailable({call: "tile_pipeline"})) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no tile render pipeline). The rt side of the suite answers `tile_pipeline` Unavailable: rt has no counterpart of the call, and no replay stream makes it.
|
||||
two-plane-announced-row-blits * refused case/work/0 Err({refused: Error::Unsupported("no texture of RGB10A82PXR10 is made on this device for the usage"), resource: 0 (0x0)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
two-plane-heap-blits * refused case/work/a48 Err({refused: Error::Unsupported("a heap texture of RGB10A82PXR10 is not placed in this heap on this device"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
two-plane-heap-blits * refused case/work/a48 Err({refused: Error::Unsupported("no texture of RGB10A82PXR10 is made on this device for the usage"), resource: 1 (0x1)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
two-plane-pad-fills * refused case/work/0 Err({refused: Error::Unsupported("no texture of RGB10A82PXR10 is made on this device for the usage"), resource: 0 (0x0)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
two-plane-row-blits * refused case/work/0 Err({refused: Error::Unsupported("no texture of RGB10A82PXR10 is made on this device for the usage"), resource: 0 (0x0)}) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no texture or view of MTLPixelFormatRGB10A8_2P_XR10). rt makes no texture of MTLPixelFormatRGB10A8_2P_XR10 for the usage the case asks on any venue (Gap::TextureFormat, or the creator's NotMade).
|
||||
visibility-boolean-accumulate * refused case/pass-0/calls/0-render Err(Error::Unsupported("a draw with AccumulatedVisibilityResults is not built")) Gap::Draw (AccumulatedVisibilityResults): the rt README, Known gaps of render encoders, "a `Boolean` or `Counting` visibility result mode in a pass whose `visibility_result_type` is `Accumulate`", refused where it is set and counted in Metrics::accumulated_visibility_refused. Metal on the M3 Max adds each result into its word; Metal on the 5300M and the UHD 630 answers Accumulate as Reset (values.rs, VisibilityResultType). Adding a result to a word is not built.
|
||||
visibility-boolean-accumulate * divergent case/pass-0/words 3 elements differ (U64), the largest difference 9 Not built: Accumulate's documented sum. Metal on the M3 Max adds a Counting result into the word's low 32 bits and ORs a Boolean one; the runtime writes each result in place of its word on every device, as Metal on the Radeon Pro 5300M and the UHD Graphics 630 does (docs/API.md section 10, until the sum is built). The sum needs a scratch copy of the query results and a kernel of the runtime's own after the rendering (crate::visibility); once built it replaces this answer on every device.
|
||||
visibility-boolean-accumulate * divergent case/pass-1/words 3 elements differ (U64), the largest difference 9 Not built: Accumulate's documented sum. Metal on the M3 Max adds a Counting result into the word's low 32 bits and ORs a Boolean one; the runtime writes each result in place of its word on every device, as Metal on the Radeon Pro 5300M and the UHD Graphics 630 does (docs/API.md section 10, until the sum is built). The sum needs a scratch copy of the query results and a kernel of the runtime's own after the rendering (crate::visibility); once built it replaces this answer on every device.
|
||||
visibility-boolean-revisit-after-covering * refused case/pass-0/calls/0-render Err(Error::Refused("the visibility result offset 0 is taken a second time in one encoder")) Metal's own refusal (Refusal::VisibilityResultOffsetTaken): Apple's page for setVisibilityResultMode(_:offset:) says "You can set a specific offset value only once per render pass", and Metal's validation stops the second set. Plain Metal on the M3 Max adds the later draws to the word; rt refuses the second mode set at the offset, the encoder's mode unchanged (the rt README, Known gaps of render encoders, visibility results). Adding a second query's count into a word is not built.
|
||||
visibility-boolean-revisit-after-nothing * refused case/pass-0/calls/0-render Err(Error::Refused("the visibility result offset 0 is taken a second time in one encoder")) Metal's own refusal (Refusal::VisibilityResultOffsetTaken): Apple's page for setVisibilityResultMode(_:offset:) says "You can set a specific offset value only once per render pass", and Metal's validation stops the second set. Plain Metal on the M3 Max adds the later draws to the word; rt refuses the second mode set at the offset, the encoder's mode unchanged (the rt README, Known gaps of render encoders, visibility results). Adding a second query's count into a word is not built.
|
||||
visibility-counting-accumulate * refused case/pass-0/calls/0-render Err(Error::Unsupported("a draw with AccumulatedVisibilityResults is not built")) Gap::Draw (AccumulatedVisibilityResults): the rt README, Known gaps of render encoders, "a `Boolean` or `Counting` visibility result mode in a pass whose `visibility_result_type` is `Accumulate`", refused where it is set and counted in Metrics::accumulated_visibility_refused. Metal on the M3 Max adds each result into its word; Metal on the 5300M and the UHD 630 answers Accumulate as Reset (values.rs, VisibilityResultType). Adding a result to a word is not built.
|
||||
visibility-counting-accumulate-one-command-buffer * refused case/pass-1/calls/0-render Err(Error::Unsupported("a draw with AccumulatedVisibilityResults is not built")) Gap::Draw (AccumulatedVisibilityResults): the rt README, Known gaps of render encoders, "a `Boolean` or `Counting` visibility result mode in a pass whose `visibility_result_type` is `Accumulate`", refused where it is set and counted in Metrics::accumulated_visibility_refused. Metal on the M3 Max adds each result into its word; Metal on the 5300M and the UHD 630 answers Accumulate as Reset (values.rs, VisibilityResultType). Adding a result to a word is not built.
|
||||
visibility-counting-accumulate-one-command-buffer * refused case/pass-1/calls/1-render Err(Error::Unsupported("a draw with AccumulatedVisibilityResults is not built")) Gap::Draw (AccumulatedVisibilityResults): the rt README, Known gaps of render encoders, "a `Boolean` or `Counting` visibility result mode in a pass whose `visibility_result_type` is `Accumulate`", refused where it is set and counted in Metrics::accumulated_visibility_refused. Metal on the M3 Max adds each result into its word; Metal on the 5300M and the UHD 630 answers Accumulate as Reset (values.rs, VisibilityResultType). Adding a result to a word is not built.
|
||||
visibility-counting-accumulate-revisit * refused case/pass-0/calls/0-render Err(Error::Unsupported("a draw with AccumulatedVisibilityResults is not built")) Gap::Draw (AccumulatedVisibilityResults): the rt README, Known gaps of render encoders, "a `Boolean` or `Counting` visibility result mode in a pass whose `visibility_result_type` is `Accumulate`", refused where it is set and counted in Metrics::accumulated_visibility_refused. Metal on the M3 Max adds each result into its word; Metal on the 5300M and the UHD 630 answers Accumulate as Reset (values.rs, VisibilityResultType). Adding a result to a word is not built.
|
||||
visibility-counting-accumulate * divergent case/pass-0/words 5 elements differ (U64), the largest difference 18446744069414584000 Not built: Accumulate's documented sum. Metal on the M3 Max adds a Counting result into the word's low 32 bits and ORs a Boolean one; the runtime writes each result in place of its word on every device, as Metal on the Radeon Pro 5300M and the UHD Graphics 630 does (docs/API.md section 10, until the sum is built). The sum needs a scratch copy of the query results and a kernel of the runtime's own after the rendering (crate::visibility); once built it replaces this answer on every device.
|
||||
visibility-counting-accumulate * divergent case/pass-1/words 5 elements differ (U64), the largest difference 18446744069414584000 Not built: Accumulate's documented sum. Metal on the M3 Max adds a Counting result into the word's low 32 bits and ORs a Boolean one; the runtime writes each result in place of its word on every device, as Metal on the Radeon Pro 5300M and the UHD Graphics 630 does (docs/API.md section 10, until the sum is built). The sum needs a scratch copy of the query results and a kernel of the runtime's own after the rendering (crate::visibility); once built it replaces this answer on every device.
|
||||
visibility-counting-accumulate-one-command-buffer * divergent case/pass-1/words 2 elements differ (U64), the largest difference 116 Not built: Accumulate's documented sum. Metal on the M3 Max adds a Counting result into the word's low 32 bits and ORs a Boolean one; the runtime writes each result in place of its word on every device, as Metal on the Radeon Pro 5300M and the UHD Graphics 630 does (docs/API.md section 10, until the sum is built). The sum needs a scratch copy of the query results and a kernel of the runtime's own after the rendering (crate::visibility); once built it replaces this answer on every device.
|
||||
visibility-counting-accumulate-revisit * refused case/pass-0/calls/0-render Err(Error::Refused("the visibility result offset 0 is taken a second time in one encoder")) Metal's own refusal (Refusal::VisibilityResultOffsetTaken): Apple's page for setVisibilityResultMode(_:offset:) says "You can set a specific offset value only once per render pass", and Metal's validation stops the second set. Plain Metal on the M3 Max adds the later draws to the word; rt refuses the second mode set at the offset, the encoder's mode unchanged (the rt README, Known gaps of render encoders, visibility results). Adding a second query's count into a word is not built.
|
||||
visibility-counting-revisit * refused case/pass-0/calls/0-render Err(Error::Refused("the visibility result offset 0 is taken a second time in one encoder")) Metal's own refusal (Refusal::VisibilityResultOffsetTaken): Apple's page for setVisibilityResultMode(_:offset:) says "You can set a specific offset value only once per render pass", and Metal's validation stops the second set. Plain Metal on the M3 Max adds the later draws to the word; rt refuses the second mode set at the offset, the encoder's mode unchanged (the rt README, Known gaps of render encoders, visibility results). Adding a second query's count into a word is not built.
|
||||
visibility-counting-revisit-after-disabled * refused case/pass-0/calls/0-render Err(Error::Refused("the visibility result offset 0 is taken a second time in one encoder")) Metal's own refusal (Refusal::VisibilityResultOffsetTaken): Apple's page for setVisibilityResultMode(_:offset:) says "You can set a specific offset value only once per render pass", and Metal's validation stops the second set. Plain Metal on the M3 Max adds the later draws to the word; rt refuses the second mode set at the offset, the encoder's mode unchanged (the rt README, Known gaps of render encoders, visibility results). Adding a second query's count into a word is not built.
|
||||
visible-tables-stage-fragment * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput is not built), and no replay stream asks it.
|
||||
visible-tables-stage-mesh * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput is not built), and no replay stream asks it.
|
||||
visible-tables-stage-object * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput is not built), and no replay stream asks it.
|
||||
visible-tables-stage-tile * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput is not built), and no replay stream asks it.
|
||||
visible-tables-stage-vertex * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput is not built), and no replay stream asks it.
|
||||
visible-tables-stage-vertex-and-fragment * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput is not built), and no replay stream asks it.
|
||||
visible-tables-stage-fragment * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput { cause: Slot } is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput { cause: Slot } is not built), and no replay stream asks it.
|
||||
visible-tables-stage-mesh * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput { cause: Slot } is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput { cause: Slot } is not built), and no replay stream asks it.
|
||||
visible-tables-stage-object * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput { cause: Slot } is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput { cause: Slot } is not built), and no replay stream asks it.
|
||||
visible-tables-stage-tile * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput { cause: Slot } is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput { cause: Slot } is not built), and no replay stream asks it.
|
||||
visible-tables-stage-vertex * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput { cause: Slot } is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput { cause: Slot } is not built), and no replay stream asks it.
|
||||
visible-tables-stage-vertex-and-fragment * refused case/outcome Err(Error::Unsupported("a render pipeline state with DrawInput { cause: Slot } is not built")) refused: no stream uses it yet (full selector census 11-19, m3-max-53207-53208, 53213, 53217-53221: 26 streams, no visible function table). rt refuses it (a render pipeline state with DrawInput { cause: Slot } is not built), and no replay stream asks it.
|
||||
xr-blend-bgr10xr-add llvmpipe refused case/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: Format; needs NotImplemented at metadata of entry rt6_fill_rgba16float, color attachment 0")) refused: no stream uses it yet (rt play-report census 11-19: 158 rt reports across the matrix streams, no render pipeline refused for framebuffer fetch). The translator refuses the pipeline: a blend into one of Apple's extended-range formats (Format) is not implemented on any device, as Metal's tile holds such an attachment as half through the render pass, which the codes the attachment stores do not keep.
|
||||
xr-blend-bgr10xr-add Iris(R) Xe refused case/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: Format; needs NotImplemented at metadata of entry rt6_fill_rgba16float, color attachment 0")) refused: no stream uses it yet (rt play-report census 11-19: 158 rt reports across the matrix streams, no render pipeline refused for framebuffer fetch). The translator refuses the pipeline: a blend into one of Apple's extended-range formats (Format) is not implemented on any device, as Metal's tile holds such an attachment as half through the render pass, which the codes the attachment stores do not keep.
|
||||
xr-blend-bgr10xr-add UHD Graphics 630 refused case/pipeline Err(Error::Translation("the translator made no pipeline: unsupported: Format; needs NotImplemented at metadata of entry rt6_fill_rgba16float, color attachment 0")) refused: no stream uses it yet (rt play-report census 11-19: 158 rt reports across the matrix streams, no render pipeline refused for framebuffer fetch). The translator refuses the pipeline: a blend into one of Apple's extended-range formats (Format) is not implemented on any device, as Metal's tile holds such an attachment as half through the render pass, which the codes the attachment stores do not keep.
|
||||
@@ -7663,12 +7629,12 @@ texture-pairs-usage-crossings * divergent case/MTLPixelFormatRGBA8Unorm/Type2D/6
|
||||
texture-pairs-usage-crossings * divergent case/MTLPixelFormatRGBA8Unorm/Type3D/64x64x8/levels-1/samples-1/slices-1/usage-0x0/private/texture/usage Metal 23 (0x17), ours 0 (0x0) rt has no usage getter; the site reads descriptor().usage, the descriptor as given; rt takes no bits as every usage wherever it acts.
|
||||
texture-pairs-usage-crossings * divergent case/MTLPixelFormatRGBA8Unorm/Type3D/64x64x8/levels-1/samples-1/slices-1/usage-0x8/private/texture/usage Metal 0 (0x0), ours 8 (0x8) rt has no usage getter; the site reads descriptor().usage, the descriptor as given; rt takes no bits as every usage wherever it acts.
|
||||
bicubic-texel-classes * refused case/rgba8unorm-srgb/dispatch Err(Error::Unsupported("texture slot 0, which a function samples through a bicubic filter, bound to a RGBA8UnormSRGB texture, whose bicubic sample is not built")) Known gap (the rt README, Known gaps of textures): a function's bicubic constexpr sample of a texture of 8-bit sRGB codes is `Gap::BicubicTexels`, naming the slot and the format. Metal sums the decoded taps; the runtime holds the texture as an sRGB image and builds no bicubic sample of it. The fix belongs in the bicubic routine's sRGB arm (`lower::sampler::bicubic`), built when a stream binds one.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/mixed/sampled 470 elements differ (F32), the largest difference 0.00040435791015625 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/r8unorm/sampled 70 elements differ (F32), the largest difference 0.000152587890625 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba16float/sampled 610 elements differ (F32), the largest difference 0.00037384033203125 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba16unorm/sampled 598 elements differ (F32), the largest difference 0.00021600723266601563 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba8snorm/sampled 818 elements differ (F32), the largest difference 0.00040435791015625 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba8unorm/sampled 578 elements differ (F32), the largest difference 0.0002383589744567871 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/mixed/sampled 384 elements differ (F32), the largest difference 0.00048828125 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. lavapipe computes `half` under the 16-bit float controls (it lacks only 16-bit `DenormPreserve`), and its answer here is the one the 780M and RTX 5080 rows record. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/r8unorm/sampled 60 elements differ (F32), the largest difference 0.00011444091796875 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. lavapipe computes `half` under the 16-bit float controls (it lacks only 16-bit `DenormPreserve`), and its answer here is the one the 780M and RTX 5080 rows record. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba16float/sampled 500 elements differ (F32), the largest difference 0.00037384033203125 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. lavapipe computes `half` under the 16-bit float controls (it lacks only 16-bit `DenormPreserve`), and its answer here is the one the 780M and RTX 5080 rows record. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba16unorm/sampled 496 elements differ (F32), the largest difference 0.000007758848369121552 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. lavapipe computes `half` under the 16-bit float controls (it lacks only 16-bit `DenormPreserve`), and its answer here is the one the 780M and RTX 5080 rows record. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba8snorm/sampled 756 elements differ (F32), the largest difference 0.00048828125 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. lavapipe computes `half` under the 16-bit float controls (it lacks only 16-bit `DenormPreserve`), and its answer here is the one the 780M and RTX 5080 rows record. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.1, 256 bits) divergent case/rgba8unorm/sampled 494 elements differ (F32), the largest difference 0.000244140625 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. lavapipe computes `half` under the 16-bit float controls (it lacks only 16-bit `DenormPreserve`), and its answer here is the one the 780M and RTX 5080 rows record. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes llvmpipe (LLVM 23.1.4, 256 bits) divergent case/rgba8unorm/sampled 578 elements differ (F32), the largest difference 0.0002383589744567871 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes Apple M3 Max divergent case/mixed/sampled 470 elements differ (F32), the largest difference 0.00040435791015625 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
bicubic-texel-classes Apple M3 Max divergent case/r8unorm/sampled 70 elements differ (F32), the largest difference 0.000152587890625 The device's arithmetic under the static note `bicubic-filter-arithmetic` (rule 1), within its stated bound. Metal's results lie on the format's grid: a sixteenth of a code for the 8-bit classes, a whole code for `RGBA16Unorm`, an exact `half` for `RGBA16Float`; at the six `RGBA16Float` samples where the sum is exactly halfway between two halves, Metal rounds away from zero. Ours is the unrounded `f32` sum of the sixteen decoded taps (the 2D routine, `lower::sampler::bicubic::routines`, `Plane`), and a `half` result is the device's narrowing of it. Every class takes Metal's arm, which the case's own tests hold in Metal's recording: `R32Float` the inner bilinear taps, which compare exactly; the clamp into [0, 1] of the unsigned normalized formats and into [-1, 1] of `RGBA8Snorm`; no clamp of `RGBA16Float`. Open: nothing; the difference is within Metal's precision, which rule 1 leaves to the note.
|
||||
@@ -7735,25 +7701,14 @@ primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLine/MT
|
||||
primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 4 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and ANV on the Iris Xe the upper (row 0, column 3); lavapipe covers Metal's. Note `device-line-rasterization`, the static note of every draw of lines (`RenderCommandEncoder::LINE_NOTE`).
|
||||
primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 5 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and ANV on the Iris Xe the upper (row 0, column 3); lavapipe covers Metal's. Note `device-line-rasterization`, the static note of every draw of lines (`RenderCommandEncoder::LINE_NOTE`).
|
||||
primitive-type-restart-indices Iris(R) Xe divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 6 An accepted difference (docs/API.md section 10, Draws: a line's tie-break is the device's own): the line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), where it only touches the diamonds of the two pixels the point joins, and Vulkan's Bresenham diamond is open, so no Vulkan control decides which a conforming driver covers. With Bresenham's rule on (bresenhamLines, the runtime's floor), Metal on the Apple M3 Max covers the lower pixel and ANV on the Iris Xe the upper (row 0, column 3); lavapipe covers Metal's. Note `device-line-rasterization`, the static note of every draw of lines (`RenderCommandEncoder::LINE_NOTE`).
|
||||
format-footprints-plain-stragglers * refused case/MTLPixelFormatBGRA4Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's `newTextureWithDescriptor:` of a texture buffer's descriptor, and a heap's size of one, take no buffer and allocate the texels themselves; the runtime makes a texture buffer only over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy), and refuses the descriptor at every other make and query (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does.
|
||||
format-footprints-plain-stragglers NVIDIA refused case/MTLPixelFormatBGRA4Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of BGRA4Unorm is made on this device for the usage")) refused: rt makes no texture buffer of MTLPixelFormatBGRA4Unorm on this venue (Gap::TextureFormat): a texture buffer's one buffer view takes a format the device holds directly whose buffer features hold both the uniform and the storage texel buffer, and neither of the format's Vulkan formats (A4R4G4B4_UNORM_PACK16, A4B4G4R4_UNORM_PACK16) is such a format here. A heap's size and alignment of a texture buffer follows the same query since a3fb852de3, so the Iris Xe, whose A4R4G4B4_UNORM_PACK16 holds both, answers this site and meets its row at makes-texture: the venues differ by query, not by form. Metal's validation layer refuses this format for a texture buffer ("pixel format (MTLPixelFormatBGRA4Unorm) cannot be used for a texture buffer"), so what such a texture reads is outside documented Metal and no value comparison is owed for it.
|
||||
format-footprints-plain-stragglers RADV refused case/MTLPixelFormatBGRA4Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of BGRA4Unorm is made on this device for the usage")) refused: rt makes no texture buffer of MTLPixelFormatBGRA4Unorm on this venue (Gap::TextureFormat): a texture buffer's one buffer view takes a format the device holds directly whose buffer features hold both the uniform and the storage texel buffer, and neither of the format's Vulkan formats (A4R4G4B4_UNORM_PACK16, A4B4G4R4_UNORM_PACK16) is such a format here. A heap's size and alignment of a texture buffer follows the same query since a3fb852de3, so the Iris Xe, whose A4R4G4B4_UNORM_PACK16 holds both, answers this site and meets its row at makes-texture: the venues differ by query, not by form. Metal's validation layer refuses this format for a texture buffer ("pixel format (MTLPixelFormatBGRA4Unorm) cannot be used for a texture buffer"), so what such a texture reads is outside documented Metal and no value comparison is owed for it.
|
||||
format-footprints-plain-stragglers llvmpipe refused case/MTLPixelFormatBGRA4Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of BGRA4Unorm is made on this device for the usage")) refused: rt makes no texture buffer of MTLPixelFormatBGRA4Unorm on this venue (Gap::TextureFormat): a texture buffer's one buffer view takes a format the device holds directly whose buffer features hold both the uniform and the storage texel buffer, and neither of the format's Vulkan formats (A4R4G4B4_UNORM_PACK16, A4B4G4R4_UNORM_PACK16) is such a format here. A heap's size and alignment of a texture buffer follows the same query since a3fb852de3, so the Iris Xe, whose A4R4G4B4_UNORM_PACK16 holds both, answers this site and meets its row at makes-texture: the venues differ by query, not by form. Metal's validation layer refuses this format for a texture buffer ("pixel format (MTLPixelFormatBGRA4Unorm) cannot be used for a texture buffer"), so what such a texture reads is outside documented Metal and no value comparison is owed for it.
|
||||
format-footprints-plain-stragglers Apple M3 Max refused case/MTLPixelFormatBGRA4Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of BGRA4Unorm is made on this device for the usage")) refused: rt makes no texture buffer of MTLPixelFormatBGRA4Unorm on this venue (Gap::TextureFormat): a texture buffer's one buffer view takes a format the device holds directly whose buffer features hold both the uniform and the storage texel buffer, and neither of the format's Vulkan formats (A4R4G4B4_UNORM_PACK16, A4B4G4R4_UNORM_PACK16) is such a format here. A heap's size and alignment of a texture buffer follows the same query since a3fb852de3, so the Iris Xe, whose A4R4G4B4_UNORM_PACK16 holds both, answers this site and meets its row at makes-texture: the venues differ by query, not by form. Metal's validation layer refuses this format for a texture buffer ("pixel format (MTLPixelFormatBGRA4Unorm) cannot be used for a texture buffer"), so what such a texture reads is outside documented Metal and no value comparison is owed for it.
|
||||
format-footprints-plain-stragglers UHD Graphics 630 refused case/MTLPixelFormatBGRA4Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align Err(Error::Unsupported("no texture of BGRA4Unorm is made on this device for the usage")) refused: rt makes no texture buffer of MTLPixelFormatBGRA4Unorm on this venue (Gap::TextureFormat): a texture buffer's one buffer view takes a format the device holds directly whose buffer features hold both the uniform and the storage texel buffer, and neither of the format's Vulkan formats (A4R4G4B4_UNORM_PACK16, A4B4G4R4_UNORM_PACK16) is such a format here. A heap's size and alignment of a texture buffer follows the same query since a3fb852de3, so the Iris Xe, whose A4R4G4B4_UNORM_PACK16 holds both, answers this site and meets its row at makes-texture: the venues differ by query, not by form. Metal's validation layer refuses this format for a texture buffer ("pixel format (MTLPixelFormatBGRA4Unorm) cannot be used for a texture buffer"), so what such a texture reads is outside documented Metal and no value comparison is owed for it.
|
||||
format-footprints-plain-stragglers Iris(R) Xe refused case/MTLPixelFormatBGRA4Unorm/TextureBuffer/64x1x1/levels-1/samples-1/slices-1/usage-0x1/shared/makes-texture Err(Error::Refused("a texture buffer is made over a buffer the consumer places (Buffer::new_texture)")) refused: the consumer's contract (the runtime's README, Textures). Metal's device's `newTextureWithDescriptor:` of a texture buffer's descriptor takes no buffer and allocates the texels itself; the runtime makes a texture buffer over a buffer the consumer places (`Buffer::new_texture`, one buffer view of its bytes, no copy) or in a heap (`Device::new_heap_texture`), and refuses the descriptor at every other make (`Refusal::TextureBufferNotOverBuffer`). A consumer answers the call by placing a buffer of the texels' bytes and making the texture buffer over it; this side makes the descriptor's texture as Metal's call reads. Open: this side placing the buffer as a consumer does. Since a3fb852de3 this venue answers the heap's size and alignment of this descriptor, which A4R4G4B4_UNORM_PACK16's texel-buffer features allow here, so the case reaches this make. Metal's validation layer refuses this format for a texture buffer ("pixel format (MTLPixelFormatBGRA4Unorm) cannot be used for a texture buffer"), so what such a texture reads is outside documented Metal and no value comparison is owed for it.
|
||||
fractional-viewport-coverage llvmpipe divergent case/drawn/texels 344 elements differ (F32), the largest difference 11.25 An accepted difference (docs/API.md section 10, Draws): Metal states only that fragments outside the viewport are clipped (MTLRenderCommandEncoder.h, setViewport:), not which a pixel the viewport's edge crosses is, so a filled primitive reaching past a viewport whose edge crosses a pixel is covered at that edge by the device's own rule. Metal on the Apple M3 Max covers every pixel the viewport overlaps, a pixel it holds only part of included; lavapipe clips the primitive to the viewport and covers a pixel where its sample lies in the clipped primitive.
|
||||
fractional-viewport-coverage Iris(R) Xe divergent case/drawn/texels 480 elements differ (F32), the largest difference 12 A driver bug and an accepted difference at one site, split by pixel: every differing pixel is a far column or far row Metal drew and the Iris left at the clear (the Iris draws each arm's near column and row as Metal does). (1) 240 elements, 60 pixels, the largest difference 12: a driver bug, not an accepted difference. The far column and row of the two arms whose viewport ends 0.7 into a pixel (origin 2.0 or 2.3 within the cell, extent 7.7 or 7.4): each pixel's centre lies inside the viewport, Metal draws it, and so does Vulkan's rule (a pixel is covered where its sample point lies in the clipped primitive, "Basic Polygon Rasterization"). ANV clamps the hardware scissor to the viewport and truncates its far edge to an integer (`update_scissors` in Mesa's `src/intel/vulkan/genX_gfx_state.c`), so that row and column are not drawn: the rt README's known gap (Known gaps of render encoders, the Iris Xe's fractional viewport). (2) 240 elements, 60 pixels, the largest difference 11.25: an accepted difference (docs/API.md section 10, Draws). The far column and row of the arms whose viewport ends 0.25 into a pixel (origin 2.75, extent 6.5) and on a pixel centre (origin 2.5, extent 7.0): each pixel's centre lies outside the viewport or on its far edge. Metal states only that fragments outside the viewport are clipped (MTLRenderCommandEncoder.h, setViewport:), not which a pixel the viewport's edge crosses is, so a filled primitive reaching past a viewport whose edge crosses a pixel is covered at that edge by the device's own rule. Metal on the Apple M3 Max covers every pixel the viewport overlaps, a pixel it holds only part of included; the Iris leaves these pixels undrawn.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short/constant/rows 3 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short/per-vertex/rows 3 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short2/constant/rows 6 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short2/per-vertex/rows 6 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short3/constant/rows 9 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short3/per-vertex/rows 9 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short4/constant/rows 12 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/Short4/per-vertex/rows 12 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort/constant/rows 5 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort/per-vertex/rows 5 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort2/constant/rows 10 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45004000, the device 0x45003000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort2/per-vertex/rows 10 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45004000, the device 0x45003000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort3/constant/rows 15 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45004000, the device 0x45003000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort3/per-vertex/rows 15 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45004000, the device 0x45003000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort4/constant/rows 20 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45004000, the device 0x45003000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes llvmpipe divergent case/int_attribute_to_half4/UShort4/per-vertex/rows 20 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x45004000, the device 0x45003000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes NVIDIA divergent case/int_attribute_to_half4/Short/constant/rows 3 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's conversion to 16 bits and back, a round trip NVIDIA's compiler folds into the value it started from, handing it on unrounded where Metal rounds it to nearest even. Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes NVIDIA divergent case/int_attribute_to_half4/Short/per-vertex/rows 3 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's conversion to 16 bits and back, a round trip NVIDIA's compiler folds into the value it started from, handing it on unrounded where Metal rounds it to nearest even. Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
integer-vertex-attributes NVIDIA divergent case/int_attribute_to_half4/Short2/constant/rows 6 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's conversion to 16 bits and back, a round trip NVIDIA's compiler folds into the value it started from, handing it on unrounded where Metal rounds it to nearest even. Metal reads 0x45000000, the device 0x45001000 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
@@ -7805,42 +7760,14 @@ vertex-format-float4 Iris(R) Xe divergent case/MTLVertexFormatHalf/rows 2 elemen
|
||||
vertex-format-float4 Iris(R) Xe divergent case/MTLVertexFormatHalf2/rows 4 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN vertex attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-float4 Iris(R) Xe divergent case/MTLVertexFormatHalf3/rows 6 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN vertex attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-float4 Iris(R) Xe divergent case/MTLVertexFormatHalf4/rows 8 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN vertex attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatChar2Normalized/rows 16 elements differ (F32), the largest difference 0.00019609928131103516 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3c010000, the device 0x3c010204 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatChar3Normalized/rows 24 elements differ (F32), the largest difference 0.00019609928131103516 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3c810000, the device 0x3c810204 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatChar4Normalized/rows 32 elements differ (F32), the largest difference 0.00019609928131103516 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3c810000, the device 0x3c810204 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatCharNormalized/rows 8 elements differ (F32), the largest difference 0.00019609928131103516 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3c010000, the device 0x3c010204 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat/rows 7 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x0, the device 0x1 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat2/rows 14 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x0, the device 0x7fffff at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat3/rows 21 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x0, the device 0x7fffff at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat4/rows 28 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x0, the device 0x7fffff at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloatRG11B10/rows 9 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN of a `half` or `RG11B10` vertex attribute widened by the device's fetch keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7ffe0000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf/rows 2 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN of a `half` or `RG11B10` vertex attribute widened by the device's fetch keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf2/rows 4 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN of a `half` or `RG11B10` vertex attribute widened by the device's fetch keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf3/rows 6 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN of a `half` or `RG11B10` vertex attribute widened by the device's fetch keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf4/rows 8 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a NaN of a `half` or `RG11B10` vertex attribute widened by the device's fetch keeps its payload where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0x7fc02000 at the first differing element. Note `device-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatInt1010102Normalized/rows 9 elements differ (F32), the largest difference 0.0001576542854309082 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0xbb004000, the device 0xbb004020 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShort/rows 2 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0xc7000000, the device 0xc6fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShort2/rows 4 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0xc7000000, the device 0xc6fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShort2Normalized/rows 16 elements differ (F32), the largest difference 0.0000152587890625 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x38000000, the device 0x38000100 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShort3/rows 6 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0xc7000000, the device 0xc6fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShort3Normalized/rows 24 elements differ (F32), the largest difference 0.0000152587890625 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x38800000, the device 0x38800100 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShort4/rows 8 elements differ (F32), the largest difference 1 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0xc7000000, the device 0xc6fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShort4Normalized/rows 32 elements differ (F32), the largest difference 0.0000152587890625 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x38800000, the device 0x38800100 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatShortNormalized/rows 8 elements differ (F32), the largest difference 0.0000152587890625 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x38000000, the device 0x38000100 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUChar2Normalized/rows 20 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3eff0000, the device 0x3efeff00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUChar3Normalized/rows 30 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3eff0000, the device 0x3efeff00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUChar4Normalized/rows 40 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3eff0000, the device 0x3efeff00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUChar4Normalized_BGRA/rows 40 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3f48c000, the device 0x3f48c8ca at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUCharNormalized/rows 10 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3b808000, the device 0x3b808081 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUInt1010102Normalized/rows 8 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3f002000, the device 0x3f002008 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShort/rows 7 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShort2/rows 14 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShort2Normalized/rows 20 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3f000000, the device 0x3effff00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShort3/rows 21 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShort3Normalized/rows 30 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3f000000, the device 0x3effff00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShort4/rows 28 elements differ (F32), the largest difference inf The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x47000000, the device 0x46fffe00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShort4Normalized/rows 40 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x3f000000, the device 0x3effff00 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatUShortNormalized/rows 10 elements differ (F32), the largest difference 0.0001627802848815918 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's `OpFConvert` to 16 bits and back (lavapipe has no `shaderDenormPreserveFloat16`, so no float controls make the pair Metal's), and lavapipe's compiler folds the pair, handing the value on unrounded where Metal rounds it to nearest even: Metal reads 0x37800000, the device 0x37800080 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat/rows 1 element differs (F32): Metal Single 0x7fc00000, ours Single 0xffc00000 The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat2/rows 2 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat3/rows 3 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatFloat4/rows 4 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf/rows 1 element differs (F32): Metal Single 0x7fc00000, ours Single 0xffc00000 The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf2/rows 2 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf3/rows 3 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 llvmpipe divergent case/MTLVertexFormatHalf4/rows 4 elements differ (F32), the largest difference NaN The device's own answer (rule 1): a vertex function's `half`-typed attribute is held at 16 bits under the 16-bit float controls (lavapipe offers 16-bit `RoundingModeRTE` and `SignedZeroInfNanPreserve`, not `DenormPreserve`), and a NaN attribute reaches the function in the device's encoding, where Metal reads the canonical NaN. Metal reads 0x7fc00000, the device 0xffc00000 at the first differing element. Notes `native-half-conversion` and `native-nan-encoding`.
|
||||
vertex-format-half4 NVIDIA divergent case/MTLVertexFormatChar2Normalized/rows 16 elements differ (F32), the largest difference 0.00019609928131103516 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's conversion to 16 bits and back, a round trip NVIDIA's compiler folds into the value it started from, handing it on unrounded where Metal rounds it to nearest even. Metal reads 0x3c010000, the device 0x3c010204 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 NVIDIA divergent case/MTLVertexFormatChar3Normalized/rows 24 elements differ (F32), the largest difference 0.00019609928131103516 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's conversion to 16 bits and back, a round trip NVIDIA's compiler folds into the value it started from, handing it on unrounded where Metal rounds it to nearest even. Metal reads 0x3c810000, the device 0x3c810204 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
vertex-format-half4 NVIDIA divergent case/MTLVertexFormatChar4Normalized/rows 32 elements differ (F32), the largest difference 0.00019609928131103516 The device's own answer (rule 1): a vertex function's `half`-typed attribute is the fetched `float` rounded to `half` by the module's conversion to 16 bits and back, a round trip NVIDIA's compiler folds into the value it started from, handing it on unrounded where Metal rounds it to nearest even. Metal reads 0x3c810000, the device 0x3c810204 at the first differing element. Note `native-half-conversion`, whose bound is a value not rounded at all.
|
||||
@@ -7972,6 +7899,9 @@ vertex-step-rate-instances llvmpipe refused case/program/calls/0-renderCommandEn
|
||||
indirect-range-gpu-written-at-zero Iris(R) Xe refused case/execution Err(Error::Unsupported("indirect command buffers of Extension are not built")) The device's own answer (rule 2): the Iris Xe (ANV, Mesa 26.2.6) does not list `VK_EXT_device_generated_commands`, so an indirect command buffer's execution is refused typed (`Gap::IndirectCommandBuffers`, `IndirectCommandsKind::Extension`), a known gap the runtime's README records. Every venue with the extension runs the case.
|
||||
indirect-range-gpu-written-past-zero Iris(R) Xe refused case/execution Err(Error::Unsupported("indirect command buffers of Extension are not built")) The device's own answer (rule 2): the Iris Xe (ANV, Mesa 26.2.6) does not list `VK_EXT_device_generated_commands`, so an indirect command buffer's execution is refused typed (`Gap::IndirectCommandBuffers`, `IndirectCommandsKind::Extension`), a known gap the runtime's README records. Every venue with the extension runs the case.
|
||||
indirect-range-written-by-an-earlier-draw Iris(R) Xe refused case/execution Err(Error::Unsupported("indirect command buffers of Extension are not built")) The device's own answer (rule 2): the Iris Xe (ANV, Mesa 26.2.6) does not list `VK_EXT_device_generated_commands`, so an indirect command buffer's execution is refused typed (`Gap::IndirectCommandBuffers`, `IndirectCommandsKind::Extension`), a known gap the runtime's README records. Every venue with the extension runs the case.
|
||||
indirect-range-gpu-written-plain-draws Iris(R) Xe refused case/execution Err(Error::Unsupported("indirect command buffers of Extension are not built")) The device's own answer (rule 2): the Iris Xe (ANV, Mesa 26.2.6) does not list `VK_EXT_device_generated_commands`, so an indirect command buffer's execution is refused typed (`Gap::IndirectCommandBuffers`, `IndirectCommandsKind::Extension`), a known gap the runtime's README records. Every venue with the extension runs the case.
|
||||
indirect-range-gpu-written-patch-draws Iris(R) Xe refused case/execution Err(Error::Unsupported("indirect command buffers of Extension are not built")) The device's own answer (rule 2): the Iris Xe (ANV, Mesa 26.2.6) does not list `VK_EXT_device_generated_commands`, so an indirect command buffer's execution is refused typed (`Gap::IndirectCommandBuffers`, `IndirectCommandsKind::Extension`), a known gap the runtime's README records. Every venue with the extension runs the case.
|
||||
indirect-range-gpu-written-indexed-patch-draws Iris(R) Xe refused case/execution Err(Error::Unsupported("indirect command buffers of Extension are not built")) The device's own answer (rule 2): the Iris Xe (ANV, Mesa 26.2.6) does not list `VK_EXT_device_generated_commands`, so an indirect command buffer's execution is refused typed (`Gap::IndirectCommandBuffers`, `IndirectCommandsKind::Extension`), a known gap the runtime's README records. Every venue with the extension runs the case.
|
||||
pixel-samplers-rgba16f-nearest-border NVIDIA divergent case/output/norm the digest is 3288187d8ade9557ef4b727bf31750abd8136d15c98b6d29b17ccf6423c0d497 on Metal and 18ed16e2998cc7c3d87dee548216bd6f3bdff85329f9a3ce3025330f3bcd0c0f here The device's own answer (rule 1): `norm` differs from Metal's (`arg`, `const` and `slot` read Metal's answer). The device's nearest filter at the normalized coordinate over the size (`norm`, the case's control), where the sources that hand the device a texel's centre or the coordinate itself read Metal's texels. Note `device-sampling`. The site records a digest alone, so the run names no coordinate.
|
||||
pixel-samplers-rgba16f-nearest-border RX 550 divergent case/output/norm the digest is 3288187d8ade9557ef4b727bf31750abd8136d15c98b6d29b17ccf6423c0d497 on Metal and 181213b4f4895852c79d14b069dde19b045933de9743eec64b2aff176b053e70 here The device's own answer (rule 1): `norm` differs from Metal's (`arg`, `const` and `slot` read Metal's answer). The device's nearest filter at the normalized coordinate over the size (`norm`, the case's control), where the sources that hand the device a texel's centre or the coordinate itself read Metal's texels. Note `device-sampling`. The site records a digest alone, so the run names no coordinate.
|
||||
pixel-samplers-rgba16f-nearest-border Iris(R) Xe divergent case/output/norm the digest is 3288187d8ade9557ef4b727bf31750abd8136d15c98b6d29b17ccf6423c0d497 on Metal and 18ed16e2998cc7c3d87dee548216bd6f3bdff85329f9a3ce3025330f3bcd0c0f here The device's own answer (rule 1): `norm` differs from Metal's (`arg`, `const` and `slot` read Metal's answer). The device's nearest filter at the normalized coordinate over the size (`norm`, the case's control), where the sources that hand the device a texel's centre or the coordinate itself read Metal's texels. Note `device-sampling`. The site records a digest alone, so the run names no coordinate.
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -113,7 +113,9 @@ int main(void) {
|
||||
height:kSide
|
||||
mipmapped:NO];
|
||||
t.usage = MTLTextureUsageRenderTarget;
|
||||
t.storageMode = MTLStorageModeShared;
|
||||
// A discrete GPU's Mac takes no Shared texture: there the read texture is Managed, and a
|
||||
// blit synchronizes it before the CPU reads it.
|
||||
t.storageMode = device.hasUnifiedMemory ? MTLStorageModeShared : MTLStorageModeManaged;
|
||||
id<MTLTexture> read = [device newTextureWithDescriptor:t];
|
||||
MTLRenderPassDescriptor *pass = [MTLRenderPassDescriptor renderPassDescriptor];
|
||||
if (n > 1) {
|
||||
@@ -146,6 +148,11 @@ int main(void) {
|
||||
[e drawPrimitives:MTLPrimitiveTypeTriangle vertexStart:0 vertexCount:3];
|
||||
}
|
||||
[e endEncoding];
|
||||
if (!device.hasUnifiedMemory) {
|
||||
id<MTLBlitCommandEncoder> b = [cb blitCommandEncoder];
|
||||
[b synchronizeResource:read];
|
||||
[b endEncoding];
|
||||
}
|
||||
[cb commit];
|
||||
[cb waitUntilCompleted];
|
||||
if (cb.error) {
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
// Whether a command buffer that waits for an event on one queue runs once another queue's command
|
||||
// buffer signals it, or only after that whole command buffer, on Metal.
|
||||
//
|
||||
// The runtime submits every queue to one `VkQueue`, so its waiter runs after the signaller's whole
|
||||
// command buffer (the runtime's README, the queues' known gaps). This probe measures Metal in the
|
||||
// same two shapes, five rounds each, in one process:
|
||||
//
|
||||
// event A, on queue A: one short dispatch, a signal of an `MTLEvent` to the round's value, then
|
||||
// about 100 ms of dispatches (25 of a kernel that spins about 4 ms, calibrated first,
|
||||
// alone). B, on queue B and committed just after A: a wait for that value, then one
|
||||
// dispatch of one thread over B's own buffer.
|
||||
// host A: the 25 spins alone. B: a wait for an `MTLSharedEvent`'s round value, then the one
|
||||
// thread; the host sets the value just after both commits.
|
||||
//
|
||||
// Each round reports A's GPU span, and when B's GPU work started and ended: from A's GPU start
|
||||
// (event) or from the host's set (host). B's GPU start may include its wait, so the stall beyond
|
||||
// the event's order is read from B's GPU end, B's one thread being about 0.01 ms: in the event
|
||||
// shape B's end less A's start less A's short part (one dispatch of one thread and the signal,
|
||||
// timed alone first); in the host shape B's end less the set. A and B share no resource, so only
|
||||
// the event orders them. Each round's GPU work is about 0.1 s; nothing can hang: every wait's value
|
||||
// is signalled in the same round.
|
||||
//
|
||||
// WHAT IT MEASURED (MTL_DEBUG_LAYER unset; one spin 4.00 ms at 275,795 iterations, A's short part
|
||||
// 0.002 ms; job m3-max-79181):
|
||||
//
|
||||
// M3 Max, macOS 27.0.1: event, A ran 99.96-100.00 ms and B's GPU end came 0.01-0.08 ms after
|
||||
// A's GPU start; host, A ran 99.95 ms from 0.13-0.14 ms after the set and B's GPU end came
|
||||
// 0.13-0.15 ms after the set. No command buffer reported an error.
|
||||
//
|
||||
// So the M3 runs B once the event reaches its value, beside the rest of A's command buffer.
|
||||
//
|
||||
// Run: cross_queue_event_stall [DEVICE] (a part of a device's name, or the default device)
|
||||
// Build: clang -fobjc-arc -O1 -fmodules -o cross_queue_event_stall cross_queue_event_stall.m \
|
||||
// -framework Foundation -framework Metal
|
||||
//
|
||||
// Measuring runs keep `MTL_DEBUG_LAYER` OUT of the environment.
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Metal/Metal.h>
|
||||
#include <mach/mach_time.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static void P(const char *fmt, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
fputs("RESULT ", stdout);
|
||||
vfprintf(stdout, fmt, ap);
|
||||
fputc('\n', stdout);
|
||||
fflush(stdout);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/// The host's clock in seconds, the one `GPUStartTime` and `GPUEndTime` answer on.
|
||||
static double host_seconds(void) {
|
||||
static mach_timebase_info_data_t base;
|
||||
if (base.denom == 0) {
|
||||
mach_timebase_info(&base);
|
||||
}
|
||||
return (double)mach_absolute_time() * base.numer / base.denom / 1e9;
|
||||
}
|
||||
|
||||
static const int ROUNDS = 5;
|
||||
static const int SPINS = 25;
|
||||
static const NSUInteger THREADS = 256;
|
||||
|
||||
static NSString *const kSource =
|
||||
@"#include <metal_stdlib>\n"
|
||||
"using namespace metal;\n"
|
||||
"kernel void spin(device uint *b [[buffer(0)]],\n"
|
||||
" constant uint &iters [[buffer(1)]],\n"
|
||||
" uint gid [[thread_position_in_grid]]) {\n"
|
||||
" uint x = gid * 2654435761u;\n"
|
||||
" for (uint i = 0; i < iters; i++) { x = x * 1664525u + 1013904223u; }\n"
|
||||
" b[gid] = x == 0x12345678u ? 1u : 0xFFFFFFFFu;\n"
|
||||
"}\n"
|
||||
"kernel void one(device uint *b [[buffer(0)]]) { b[0] = 7u; }\n";
|
||||
|
||||
typedef struct {
|
||||
id<MTLDevice> device;
|
||||
id<MTLComputePipelineState> spin;
|
||||
id<MTLComputePipelineState> one;
|
||||
id<MTLBuffer> a_words;
|
||||
id<MTLBuffer> b_words;
|
||||
} Probe;
|
||||
|
||||
static void encode_spins(Probe *p, id<MTLCommandBuffer> cb, uint32_t iters, int dispatches) {
|
||||
id<MTLComputeCommandEncoder> e = [cb computeCommandEncoder];
|
||||
[e setComputePipelineState:p->spin];
|
||||
[e setBuffer:p->a_words offset:0 atIndex:0];
|
||||
[e setBytes:&iters length:sizeof iters atIndex:1];
|
||||
for (int d = 0; d < dispatches; d++) {
|
||||
[e dispatchThreadgroups:MTLSizeMake(THREADS / 64, 1, 1)
|
||||
threadsPerThreadgroup:MTLSizeMake(64, 1, 1)];
|
||||
}
|
||||
[e endEncoding];
|
||||
}
|
||||
|
||||
/// One dispatch of one thread over `buffer`.
|
||||
static void encode_one(Probe *p, id<MTLCommandBuffer> cb, id<MTLBuffer> buffer) {
|
||||
id<MTLComputeCommandEncoder> e = [cb computeCommandEncoder];
|
||||
[e setComputePipelineState:p->one];
|
||||
[e setBuffer:buffer offset:0 atIndex:0];
|
||||
[e dispatchThreadgroups:MTLSizeMake(1, 1, 1) threadsPerThreadgroup:MTLSizeMake(1, 1, 1)];
|
||||
[e endEncoding];
|
||||
}
|
||||
|
||||
static double span_ms(id<MTLCommandBuffer> cb) {
|
||||
return (cb.GPUEndTime - cb.GPUStartTime) * 1000.0;
|
||||
}
|
||||
|
||||
static const char *status(id<MTLCommandBuffer> cb) {
|
||||
return cb.error ? cb.error.localizedDescription.UTF8String : "no error";
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
@autoreleasepool {
|
||||
Probe p;
|
||||
p.device = MTLCreateSystemDefaultDevice();
|
||||
if (argc == 2) {
|
||||
p.device = nil;
|
||||
for (id<MTLDevice> device in MTLCopyAllDevices()) {
|
||||
if (strstr(device.name.UTF8String, argv[1])) {
|
||||
p.device = device;
|
||||
}
|
||||
}
|
||||
if (!p.device) {
|
||||
P("no device named like %s", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
NSOperatingSystemVersion v = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
P("device %s macOS %ld.%ld.%ld MTL_DEBUG_LAYER=%s", p.device.name.UTF8String,
|
||||
(long)v.majorVersion, (long)v.minorVersion, (long)v.patchVersion,
|
||||
getenv("MTL_DEBUG_LAYER") ? getenv("MTL_DEBUG_LAYER") : "unset");
|
||||
NSError *error = nil;
|
||||
id<MTLLibrary> library = [p.device newLibraryWithSource:kSource options:nil error:&error];
|
||||
if (!library) {
|
||||
P("library: %s", error.localizedDescription.UTF8String);
|
||||
return 1;
|
||||
}
|
||||
p.spin = [p.device newComputePipelineStateWithFunction:[library newFunctionWithName:@"spin"]
|
||||
error:&error];
|
||||
p.one = [p.device newComputePipelineStateWithFunction:[library newFunctionWithName:@"one"]
|
||||
error:&error];
|
||||
if (!p.spin || !p.one) {
|
||||
P("pipeline: %s", error.localizedDescription.UTF8String);
|
||||
return 1;
|
||||
}
|
||||
p.a_words = [p.device newBufferWithLength:THREADS * 4 options:MTLResourceStorageModePrivate];
|
||||
p.b_words = [p.device newBufferWithLength:4096 options:MTLResourceStorageModePrivate];
|
||||
id<MTLBuffer> a_one = [p.device newBufferWithLength:4096 options:MTLResourceStorageModePrivate];
|
||||
id<MTLCommandQueue> queue_a = [p.device newCommandQueue];
|
||||
id<MTLCommandQueue> queue_b = [p.device newCommandQueue];
|
||||
|
||||
// Calibration on A's queue, alone: one spin of about 4 ms, then A's short part.
|
||||
uint32_t iters = 1u << 10;
|
||||
double one_ms = 0;
|
||||
for (int step = 0; step < 14 && (one_ms < 3.5 || one_ms > 4.5); step++) {
|
||||
if (step > 0) {
|
||||
double scale = one_ms > 0.1 ? 4.0 / one_ms : 8.0;
|
||||
iters = (uint32_t)MIN((double)(1u << 28), MAX(1.0, iters * scale));
|
||||
}
|
||||
id<MTLCommandBuffer> cb = [queue_a commandBuffer];
|
||||
encode_spins(&p, cb, iters, 1);
|
||||
[cb commit];
|
||||
[cb waitUntilCompleted];
|
||||
one_ms = span_ms(cb);
|
||||
}
|
||||
id<MTLEvent> warm_event = [p.device newEvent];
|
||||
double short_ms = 0;
|
||||
for (int w = 0; w < 3; w++) {
|
||||
id<MTLCommandBuffer> cb = [queue_a commandBuffer];
|
||||
encode_one(&p, cb, a_one);
|
||||
[cb encodeSignalEvent:warm_event value:(uint64_t)(w + 1)];
|
||||
[cb commit];
|
||||
[cb waitUntilCompleted];
|
||||
short_ms = span_ms(cb);
|
||||
}
|
||||
P("one spin alone: %u iterations, %.2f ms; the short part (one thread and a signal) %.3f ms; "
|
||||
"A's long part %d spins",
|
||||
iters, one_ms, short_ms, SPINS);
|
||||
|
||||
id<MTLEvent> event = [p.device newEvent];
|
||||
for (int round = 1; round <= ROUNDS; round++) {
|
||||
id<MTLCommandBuffer> a = [queue_a commandBuffer];
|
||||
encode_one(&p, a, a_one);
|
||||
[a encodeSignalEvent:event value:(uint64_t)round];
|
||||
encode_spins(&p, a, iters, SPINS);
|
||||
id<MTLCommandBuffer> b = [queue_b commandBuffer];
|
||||
[b encodeWaitForEvent:event value:(uint64_t)round];
|
||||
encode_one(&p, b, p.b_words);
|
||||
[a commit];
|
||||
[b commit];
|
||||
[b waitUntilCompleted];
|
||||
[a waitUntilCompleted];
|
||||
double ms = 1000.0, a0 = a.GPUStartTime;
|
||||
P("event round %d: A %.2f ms; B's GPU start %.2f and end %.2f ms after A's start (A ended "
|
||||
"at %.2f); stall beyond the event's order (B's end) %.2f ms; A %s, B %s",
|
||||
round, span_ms(a), (b.GPUStartTime - a0) * ms, (b.GPUEndTime - a0) * ms,
|
||||
(a.GPUEndTime - a0) * ms, (b.GPUEndTime - a0) * ms - short_ms, status(a), status(b));
|
||||
}
|
||||
|
||||
id<MTLSharedEvent> shared = [p.device newSharedEvent];
|
||||
for (int round = 1; round <= ROUNDS; round++) {
|
||||
id<MTLCommandBuffer> a = [queue_a commandBuffer];
|
||||
encode_spins(&p, a, iters, SPINS);
|
||||
id<MTLCommandBuffer> b = [queue_b commandBuffer];
|
||||
[b encodeWaitForEvent:shared value:(uint64_t)round];
|
||||
encode_one(&p, b, p.b_words);
|
||||
[a commit];
|
||||
[b commit];
|
||||
double set = host_seconds();
|
||||
shared.signaledValue = (uint64_t)round;
|
||||
[b waitUntilCompleted];
|
||||
[a waitUntilCompleted];
|
||||
double ms = 1000.0;
|
||||
P("host round %d: A %.2f ms, its GPU start %.2f ms after the host's set; B's GPU start %.2f "
|
||||
"and end %.2f ms after the set (A ended at %.2f); stall beyond the event's order (B's "
|
||||
"end) %.2f ms; A %s, B %s",
|
||||
round, span_ms(a), (a.GPUStartTime - set) * ms, (b.GPUStartTime - set) * ms,
|
||||
(b.GPUEndTime - set) * ms, (a.GPUEndTime - set) * ms, (b.GPUEndTime - set) * ms,
|
||||
status(a), status(b));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// What plain Metal answers for `-[MTLDevice getDefaultSamplePositions:count:]` at each sample count,
|
||||
// those the device renders (`supportsTextureSampleCount:`) and those it does not, the reference
|
||||
// metal2vulkan-runtime's `Device::default_sample_positions` is read against.
|
||||
//
|
||||
// default_sample_positions <count> one count a process: an assertion ends it.
|
||||
// default_sample_positions list the counts.
|
||||
//
|
||||
// Each count prints whether the device renders it, then calls the method into 64 positions first
|
||||
// set to (-1, -1), and prints every position it changed (index and value, each coordinate to 9
|
||||
// digits), how many it changed, and an exception it raised, if any. A count Metal's validation
|
||||
// stops ends the process; run it under MTL_DEBUG_LAYER=1 as well to see what the validation layer
|
||||
// says (the exit status and the assertion's text on stderr).
|
||||
//
|
||||
// Build and run (macOS):
|
||||
// clang -O2 -fobjc-arc -framework Metal -framework Foundation -o default_sample_positions \
|
||||
// default_sample_positions.m
|
||||
// for n in $(./default_sample_positions list); do ./default_sample_positions $n; echo "exit $?"; done
|
||||
// for n in $(./default_sample_positions list); do MTL_DEBUG_LAYER=1 ./default_sample_positions $n;
|
||||
// echo "exit $?"; done
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Metal/Metal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static const unsigned long kCounts[] = {0, 1, 2, 3, 4, 5, 6, 8, 16, 17, 32, 33};
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
@autoreleasepool {
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: %s <count> | list\n", argv[0]);
|
||||
return 2;
|
||||
}
|
||||
if (strcmp(argv[1], "list") == 0) {
|
||||
for (size_t i = 0; i < sizeof kCounts / sizeof kCounts[0]; i++) printf("%lu\n", kCounts[i]);
|
||||
return 0;
|
||||
}
|
||||
NSUInteger n = (NSUInteger)strtoul(argv[1], NULL, 10);
|
||||
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
|
||||
if (!device) {
|
||||
fprintf(stderr, "no Metal device\n");
|
||||
return 3;
|
||||
}
|
||||
printf("device %s; count %lu; supportsTextureSampleCount %s\n", device.name.UTF8String,
|
||||
(unsigned long)n, [device supportsTextureSampleCount:n] ? "YES" : "NO");
|
||||
enum { kSlots = 64 };
|
||||
MTLSamplePosition pos[kSlots];
|
||||
for (int i = 0; i < kSlots; i++) pos[i] = MTLSamplePositionMake(-1.0f, -1.0f);
|
||||
fflush(stdout);
|
||||
@try {
|
||||
[device getDefaultSamplePositions:pos count:n];
|
||||
} @catch (NSException *e) {
|
||||
printf("count %lu: exception %s: %s\n", (unsigned long)n, e.name.UTF8String,
|
||||
e.reason.UTF8String);
|
||||
}
|
||||
int changed = 0;
|
||||
for (int i = 0; i < kSlots; i++) {
|
||||
if (pos[i].x == -1.0f && pos[i].y == -1.0f) continue;
|
||||
changed++;
|
||||
printf("count %lu: position %d (%.9f, %.9f)\n", (unsigned long)n, i, pos[i].x, pos[i].y);
|
||||
}
|
||||
printf("count %lu: %d of %d positions changed\n", (unsigned long)n, changed, kSlots);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,667 @@
|
||||
// Whether a Metal blit copy gives the source's bytes from before the copy where its source and its
|
||||
// destination are two resources over one memory: a texture placed in a placement heap and another
|
||||
// resource of the heap placed over its bytes, and an IOSurface plane's texture and a no-copy buffer
|
||||
// over the surface's own bytes.
|
||||
//
|
||||
// The runtime refuses the first (`Gap::OverlappingCopy`: a heap texture's texels lie as the device
|
||||
// chooses, so no cut of Vulkan copy commands keeps one command's source and destination apart),
|
||||
// and copies the second a row at a time from the source as it was before the copy. MTLHeap.h of a
|
||||
// placement heap's resources: "Any resources that exist in this heap at overlapping half-open
|
||||
// range [offset, offset + requiredSize) are implicitly aliased with the new resource."
|
||||
//
|
||||
// Cases, one a process, ROUNDS (8) rounds each, each round with words of its own:
|
||||
//
|
||||
// heap-<mode>-b2t a buffer and a 64x64 RGBA8Unorm texture, both at offset 0 of a placement
|
||||
// heap: the buffer is written (a blit from a Shared buffer), then copied
|
||||
// whole into the texture, which is then read out
|
||||
// heap-<mode>-t2b the texture is written, then copied whole into the buffer, which is read out
|
||||
// heap-<mode>-t2t two such textures at offset 0: the first is written, then copied whole into
|
||||
// the second, which is read out
|
||||
// heap-private-<shape>-apart
|
||||
// controls: the second resource placed past the first's bytes
|
||||
// tex-shift two such textures in a Private placement heap, the second one texture
|
||||
// alignment on: `copyFromTexture:toTexture:` from the first to the second
|
||||
// tex-half the second half the texture's bytes on (rounded up to the alignment)
|
||||
// tex-region both at 0: the region method (`copyFromTexture:sourceSlice:...`) over the
|
||||
// whole level
|
||||
// tex-region-half the region method over the whole level, the second half the bytes on
|
||||
// tex-region-part both at 0: the region method, texels (0, 0) to (31, 31) into (32, 32)
|
||||
// tex-inplace-to a heap texture at 0 and a linear texture over a heap buffer at 0
|
||||
// (`newTextureWithDescriptor:offset:bytesPerRow:`): `copyFromTexture:toTexture:`
|
||||
// from the heap texture to the linear one
|
||||
// tex-inplace-from the same, from the linear texture to the heap texture
|
||||
// buf-alias-<way>-<n>
|
||||
// two buffers at offset 0 of a Private placement heap, 64 KiB and 4 KiB more
|
||||
// each: `copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size:` of
|
||||
// 64 KiB from the first to the second, the destination <n> bytes past the
|
||||
// source (`up`) or the source <n> bytes past the destination (`down`)
|
||||
// buf-one-up-4 control: one such buffer into itself, the destination 4 bytes past the
|
||||
// source, which Apple's page for the copy allows only where the size is less
|
||||
// than the offsets' distance
|
||||
// surface-in-up a 64x16 BGRA8Unorm IOSurface's plane texture and a no-copy buffer over the
|
||||
// surface's bytes: buffer rows 1-15 into texture rows 0-14
|
||||
// surface-in-down buffer rows 0-14 into texture rows 1-15
|
||||
// surface-in-right texels 0-55 of each buffer row into texels 8-63 of the texture's
|
||||
// surface-out-up texture rows 1-15 into buffer rows 0-14
|
||||
// surface-out-down texture rows 0-14 into buffer rows 1-15
|
||||
// surface-out-right texels 0-55 of each texture row into texels 8-63 of the buffer's
|
||||
//
|
||||
// <mode> is the heap's storage mode, `private` or `shared`. Every resource is tracked. Each step is
|
||||
// a command buffer of its own, waited for, so the copy is one blit command alone.
|
||||
//
|
||||
// Each heap round prints how many of the destination's 32-bit words hold the source's word from
|
||||
// before the copy ("source") and how many do not ("other"), with the destination's FNV-1a 64. Each
|
||||
// surface round prints, over the destination region, how many words hold the source's word from
|
||||
// before the copy ("source"), the word a copy of texels in place front to back would leave
|
||||
// ("forward"), back to front ("backward"), or none of them ("other"), and how many words outside
|
||||
// the region changed ("outside"). Each case ends with `SUMMARY <case> whole <n> of <ROUNDS>`: the
|
||||
// rounds whose every destination word was the source's.
|
||||
//
|
||||
// xcrun clang -O2 -fobjc-arc -framework Metal -framework Foundation -framework IOSurface \
|
||||
// -o overlapping_alias_copies overlapping_alias_copies.m
|
||||
// for c in $(./overlapping_alias_copies --list); do
|
||||
// ./overlapping_alias_copies $c; MTL_DEBUG_LAYER=1 ./overlapping_alias_copies $c
|
||||
// done
|
||||
//
|
||||
// Every case prints `DEVICE <name> / RELEASE <os>`, then `CASE <case>`, `READ` lines, and `DONE
|
||||
// <case>`. A case whose process Metal ends prints no `DONE`, and its exit status is the reading.
|
||||
//
|
||||
// WHAT IT MEASURED: on an Apple M3 Max, macOS 27.0.1 (26A434), jobs m3-max-81486 (heap-*,
|
||||
// surface-*) and m3-max-81493 (tex-*). The texture's heap footprint was 16512 bytes at an
|
||||
// alignment of 128.
|
||||
//
|
||||
// - With the API validation off, every case gave the source's words from before the copy in 8 of
|
||||
// 8 rounds, including the aliases at 0, 128 and 8320 bytes apart. The surface cases also left
|
||||
// no word outside the region changed.
|
||||
// - With MTL_DEBUG_LAYER=1, these cases end the process (status 134) at the copy:
|
||||
// - heap-{private,shared}-{b2t,t2b}, tex-region, tex-region-half and tex-region-part:
|
||||
// "validateResourceAliasing:332: failed assertion `blitting between aliasing resources is
|
||||
// defined on a placement heap only when using a blit method copying entire texture surfaces,
|
||||
// or when copying between buffers.'"
|
||||
// - tex-inplace-to and tex-inplace-from: "validateResourceAliasing:332: failed assertion
|
||||
// `blitting between aliasing resources is defined on a placement heap only when both textures
|
||||
// are linear and have the same bufferBytesPerRow value.'"
|
||||
// - Under validation, the other cases run to the end with the same words: heap-*-t2t, tex-shift
|
||||
// and tex-half (copyFromTexture:toTexture:), the -apart controls, and every surface-* case.
|
||||
// - Job m3-max-81544 (buf-*): with the API validation off, every case gave memmove's bytes in 8 of
|
||||
// 8 rounds, buf-one-up-4 too. With MTL_DEBUG_LAYER=1, buf-one-up-4 runs to the end with the same
|
||||
// bytes, and every buf-alias-* case ends the process (status 134) inside the layer's own
|
||||
// aliasing check, "-[MTLDebugBuffer width]: unrecognized selector sent to instance",
|
||||
// from `validateResourceAliasing` under `-[MTLDebugBlitCommandEncoder
|
||||
// copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size:]`: the layer's fault, not a
|
||||
// refusal; its assertion text above names copies between buffers among the defined ones.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <IOSurface/IOSurface.h>
|
||||
#import <Metal/Metal.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
enum {
|
||||
ROUNDS = 8,
|
||||
SIDE = 64,
|
||||
ROW = SIDE * 4,
|
||||
TEXELS = SIDE * SIDE,
|
||||
SURFACE_WIDTH = 64,
|
||||
SURFACE_HEIGHT = 16,
|
||||
SURFACE_PITCH = 256,
|
||||
SHIFT = 8,
|
||||
};
|
||||
|
||||
static id<MTLDevice> gDevice = nil;
|
||||
static id<MTLCommandQueue> gQueue = nil;
|
||||
|
||||
static const char *kCases[] = {
|
||||
"heap-private-b2t", "heap-private-t2b", "heap-private-t2t",
|
||||
"heap-shared-b2t", "heap-shared-t2b", "heap-shared-t2t",
|
||||
"heap-private-b2t-apart", "heap-private-t2b-apart", "heap-private-t2t-apart",
|
||||
"tex-shift", "tex-half", "tex-region",
|
||||
"tex-region-half", "tex-region-part", "tex-inplace-to",
|
||||
"tex-inplace-from",
|
||||
"buf-alias-up-4", "buf-alias-down-4", "buf-alias-up-4096",
|
||||
"buf-alias-down-4096", "buf-one-up-4",
|
||||
"surface-in-up", "surface-in-down", "surface-in-right",
|
||||
"surface-out-up", "surface-out-down", "surface-out-right",
|
||||
};
|
||||
|
||||
static NSUInteger round_up(NSUInteger value, NSUInteger multiple) {
|
||||
return (value + multiple - 1) / multiple * multiple;
|
||||
}
|
||||
|
||||
static uint64_t fnv(const uint8_t *bytes, size_t len) {
|
||||
uint64_t h = 0xcbf29ce484222325ull;
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
h ^= bytes[i];
|
||||
h *= 0x100000001b3ull;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
/// Commits `cb`, waits for it, and prints its status where it did not complete.
|
||||
static void run(id<MTLCommandBuffer> cb, const char *step) {
|
||||
[cb commit];
|
||||
[cb waitUntilCompleted];
|
||||
if (cb.status != MTLCommandBufferStatusCompleted) {
|
||||
printf("READ step %s status %ld error %s\n", step, (long)cb.status,
|
||||
cb.error ? cb.error.localizedDescription.UTF8String : "none");
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
// ---- heap cases ----------------------------------------------------------------------------
|
||||
|
||||
static int heap_case(MTLStorageMode mode, const char *shape, BOOL apart, const char *name) {
|
||||
MTLTextureDescriptor *td =
|
||||
[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA8Unorm
|
||||
width:SIDE
|
||||
height:SIDE
|
||||
mipmapped:NO];
|
||||
td.usage = MTLTextureUsageShaderRead;
|
||||
td.storageMode = mode;
|
||||
td.hazardTrackingMode = MTLHazardTrackingModeTracked;
|
||||
MTLResourceOptions bo =
|
||||
(mode == MTLStorageModePrivate ? MTLResourceStorageModePrivate
|
||||
: MTLResourceStorageModeShared) |
|
||||
MTLResourceHazardTrackingModeTracked;
|
||||
MTLSizeAndAlign ts = [gDevice heapTextureSizeAndAlignWithDescriptor:td];
|
||||
NSUInteger blen = ts.size;
|
||||
MTLSizeAndAlign bs = [gDevice heapBufferSizeAndAlignWithLength:blen options:bo];
|
||||
NSUInteger align = MAX(ts.align, bs.align);
|
||||
NSUInteger span = MAX(ts.size, bs.size);
|
||||
NSUInteger second = apart ? round_up(span, align) : 0;
|
||||
printf("READ texture_size %lu texture_align %lu buffer_size %lu buffer_align %lu second_at %lu\n",
|
||||
(unsigned long)ts.size, (unsigned long)ts.align, (unsigned long)bs.size,
|
||||
(unsigned long)bs.align, (unsigned long)second);
|
||||
|
||||
MTLHeapDescriptor *hd = [MTLHeapDescriptor new];
|
||||
hd.type = MTLHeapTypePlacement;
|
||||
hd.storageMode = mode;
|
||||
hd.hazardTrackingMode = MTLHazardTrackingModeTracked;
|
||||
hd.size = round_up(second + span, 1u << 16) + (1u << 16);
|
||||
id<MTLHeap> heap = [gDevice newHeapWithDescriptor:hd];
|
||||
if (!heap) {
|
||||
printf("READ heap nil\n");
|
||||
return 2;
|
||||
}
|
||||
BOOL b2t = strcmp(shape, "b2t") == 0, t2b = strcmp(shape, "t2b") == 0;
|
||||
BOOL t2t = strcmp(shape, "t2t") == 0;
|
||||
// The first resource at 0, the second at `second`: the texture first for t2b and t2t, the
|
||||
// buffer first for b2t.
|
||||
id<MTLTexture> texture = [heap newTextureWithDescriptor:td offset:(b2t ? second : 0)];
|
||||
id<MTLBuffer> buffer =
|
||||
(b2t || t2b) ? [heap newBufferWithLength:blen options:bo offset:(b2t ? 0 : second)] : nil;
|
||||
id<MTLTexture> texture2 = t2t ? [heap newTextureWithDescriptor:td offset:second] : nil;
|
||||
if (!texture || ((b2t || t2b) && !buffer) || (t2t && !texture2)) {
|
||||
printf("READ resource nil texture %d buffer %d texture2 %d\n", texture != nil,
|
||||
buffer != nil, texture2 != nil);
|
||||
return 2;
|
||||
}
|
||||
id<MTLBuffer> src = [gDevice newBufferWithLength:TEXELS * 4 options:MTLResourceStorageModeShared];
|
||||
id<MTLBuffer> out = [gDevice newBufferWithLength:TEXELS * 4 options:MTLResourceStorageModeShared];
|
||||
MTLSize whole = MTLSizeMake(SIDE, SIDE, 1);
|
||||
MTLOrigin zero = MTLOriginMake(0, 0, 0);
|
||||
int wholeRounds = 0;
|
||||
for (uint32_t round = 0; round < ROUNDS; round++) {
|
||||
uint32_t *words = (uint32_t *)src.contents;
|
||||
for (uint32_t i = 0; i < TEXELS; i++) words[i] = 0x80000000u | (round << 16) | i;
|
||||
memset(out.contents, 0xEE, TEXELS * 4);
|
||||
|
||||
id<MTLCommandBuffer> cb = [gQueue commandBuffer];
|
||||
id<MTLBlitCommandEncoder> blit = [cb blitCommandEncoder];
|
||||
if (b2t) {
|
||||
[blit copyFromBuffer:src sourceOffset:0 toBuffer:buffer destinationOffset:0
|
||||
size:TEXELS * 4];
|
||||
} else {
|
||||
[blit copyFromBuffer:src sourceOffset:0 sourceBytesPerRow:ROW
|
||||
sourceBytesPerImage:ROW * SIDE sourceSize:whole toTexture:texture
|
||||
destinationSlice:0 destinationLevel:0 destinationOrigin:zero];
|
||||
}
|
||||
[blit endEncoding];
|
||||
run(cb, "write");
|
||||
|
||||
cb = [gQueue commandBuffer];
|
||||
blit = [cb blitCommandEncoder];
|
||||
if (b2t) {
|
||||
[blit copyFromBuffer:buffer sourceOffset:0 sourceBytesPerRow:ROW
|
||||
sourceBytesPerImage:ROW * SIDE sourceSize:whole toTexture:texture
|
||||
destinationSlice:0 destinationLevel:0 destinationOrigin:zero];
|
||||
} else if (t2b) {
|
||||
[blit copyFromTexture:texture sourceSlice:0 sourceLevel:0 sourceOrigin:zero
|
||||
sourceSize:whole toBuffer:buffer destinationOffset:0
|
||||
destinationBytesPerRow:ROW destinationBytesPerImage:ROW * SIDE];
|
||||
} else {
|
||||
[blit copyFromTexture:texture toTexture:texture2];
|
||||
}
|
||||
[blit endEncoding];
|
||||
run(cb, "copy");
|
||||
|
||||
cb = [gQueue commandBuffer];
|
||||
blit = [cb blitCommandEncoder];
|
||||
if (t2b) {
|
||||
[blit copyFromBuffer:buffer sourceOffset:0 toBuffer:out destinationOffset:0
|
||||
size:TEXELS * 4];
|
||||
} else {
|
||||
[blit copyFromTexture:(b2t ? texture : texture2) sourceSlice:0 sourceLevel:0
|
||||
sourceOrigin:zero sourceSize:whole toBuffer:out destinationOffset:0
|
||||
destinationBytesPerRow:ROW destinationBytesPerImage:ROW * SIDE];
|
||||
}
|
||||
[blit endEncoding];
|
||||
run(cb, "read");
|
||||
|
||||
const uint32_t *got = (const uint32_t *)out.contents;
|
||||
int source = 0, other = 0, first = -1;
|
||||
for (int i = 0; i < TEXELS; i++) {
|
||||
if (got[i] == words[i]) {
|
||||
source++;
|
||||
} else {
|
||||
other++;
|
||||
if (first < 0) first = i;
|
||||
}
|
||||
}
|
||||
printf("READ %s round %u source %d other %d", name, round, source, other);
|
||||
if (first >= 0) printf(" first_other %d word 0x%08x", first, got[first]);
|
||||
printf(" fnv %016llx\n", (unsigned long long)fnv(out.contents, TEXELS * 4));
|
||||
fflush(stdout);
|
||||
if (other == 0) wholeRounds++;
|
||||
}
|
||||
printf("SUMMARY %s whole %d of %d\n", name, wholeRounds, ROUNDS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ---- texture to texture in a Private placement heap ---------------------------------------
|
||||
|
||||
/// How a `tex-*` case copies: `copyFromTexture:toTexture:` (`WHOLE`), or the region method over
|
||||
/// the whole level (`REGION_WHOLE`) or over its 32 x 32 texels at (0, 0) into (32, 32)
|
||||
/// (`REGION_PART`).
|
||||
typedef enum { WHOLE, REGION_WHOLE, REGION_PART } Method;
|
||||
|
||||
/// The second texture at `at` (`0`, `1` the texture alignment, `2` half the texture's bytes rounded
|
||||
/// up to it); `inPlace` 1 where the destination, 2 where the source, is a linear texture over a heap
|
||||
/// buffer at offset 0 (`newTextureWithDescriptor:offset:bytesPerRow:`) instead of a heap texture.
|
||||
static int tex_case(int at, Method method, int inPlace, const char *name) {
|
||||
MTLTextureDescriptor *td =
|
||||
[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA8Unorm
|
||||
width:SIDE
|
||||
height:SIDE
|
||||
mipmapped:NO];
|
||||
td.usage = MTLTextureUsageShaderRead;
|
||||
td.storageMode = MTLStorageModePrivate;
|
||||
td.hazardTrackingMode = MTLHazardTrackingModeTracked;
|
||||
MTLResourceOptions bo = MTLResourceStorageModePrivate | MTLResourceHazardTrackingModeTracked;
|
||||
MTLSizeAndAlign ts = [gDevice heapTextureSizeAndAlignWithDescriptor:td];
|
||||
NSUInteger second = at == 0 ? 0 : at == 1 ? ts.align : round_up(ts.size / 2, ts.align);
|
||||
printf("READ texture_size %lu texture_align %lu second_at %lu linear_align %lu\n",
|
||||
(unsigned long)ts.size, (unsigned long)ts.align, (unsigned long)second,
|
||||
(unsigned long)[gDevice minimumLinearTextureAlignmentForPixelFormat:td.pixelFormat]);
|
||||
MTLHeapDescriptor *hd = [MTLHeapDescriptor new];
|
||||
hd.type = MTLHeapTypePlacement;
|
||||
hd.storageMode = MTLStorageModePrivate;
|
||||
hd.hazardTrackingMode = MTLHazardTrackingModeTracked;
|
||||
hd.size = round_up(second + ts.size, 1u << 16) + (1u << 16);
|
||||
id<MTLHeap> heap = [gDevice newHeapWithDescriptor:hd];
|
||||
id<MTLTexture> first = [heap newTextureWithDescriptor:td offset:0];
|
||||
id<MTLTexture> other = nil;
|
||||
id<MTLBuffer> under = nil;
|
||||
if (inPlace) {
|
||||
under = [heap newBufferWithLength:ts.size options:bo offset:second];
|
||||
other = [under newTextureWithDescriptor:td offset:0 bytesPerRow:ROW];
|
||||
} else {
|
||||
other = [heap newTextureWithDescriptor:td offset:second];
|
||||
}
|
||||
if (!heap || !first || !other) {
|
||||
printf("READ resource nil heap %d first %d other %d\n", heap != nil, first != nil,
|
||||
other != nil);
|
||||
return 2;
|
||||
}
|
||||
id<MTLTexture> source = inPlace == 2 ? other : first;
|
||||
id<MTLTexture> destination = inPlace == 2 ? first : other;
|
||||
id<MTLBuffer> src = [gDevice newBufferWithLength:TEXELS * 4 options:MTLResourceStorageModeShared];
|
||||
id<MTLBuffer> out = [gDevice newBufferWithLength:TEXELS * 4 options:MTLResourceStorageModeShared];
|
||||
MTLSize whole = MTLSizeMake(SIDE, SIDE, 1);
|
||||
MTLOrigin zero = MTLOriginMake(0, 0, 0);
|
||||
int half = SIDE / 2, wholeRounds = 0;
|
||||
for (uint32_t round = 0; round < ROUNDS; round++) {
|
||||
uint32_t *words = (uint32_t *)src.contents;
|
||||
for (uint32_t i = 0; i < TEXELS; i++) words[i] = 0x80000000u | (round << 16) | i;
|
||||
memset(out.contents, 0xEE, TEXELS * 4);
|
||||
|
||||
id<MTLCommandBuffer> cb = [gQueue commandBuffer];
|
||||
id<MTLBlitCommandEncoder> blit = [cb blitCommandEncoder];
|
||||
[blit copyFromBuffer:src sourceOffset:0 sourceBytesPerRow:ROW
|
||||
sourceBytesPerImage:ROW * SIDE sourceSize:whole toTexture:source
|
||||
destinationSlice:0 destinationLevel:0 destinationOrigin:zero];
|
||||
[blit endEncoding];
|
||||
run(cb, "write");
|
||||
|
||||
cb = [gQueue commandBuffer];
|
||||
blit = [cb blitCommandEncoder];
|
||||
if (method == WHOLE) {
|
||||
[blit copyFromTexture:source toTexture:destination];
|
||||
} else {
|
||||
BOOL part = method == REGION_PART;
|
||||
[blit copyFromTexture:source sourceSlice:0 sourceLevel:0 sourceOrigin:zero
|
||||
sourceSize:(part ? MTLSizeMake(half, half, 1) : whole)
|
||||
toTexture:destination destinationSlice:0 destinationLevel:0
|
||||
destinationOrigin:(part ? MTLOriginMake(half, half, 0) : zero)];
|
||||
}
|
||||
[blit endEncoding];
|
||||
run(cb, "copy");
|
||||
|
||||
cb = [gQueue commandBuffer];
|
||||
blit = [cb blitCommandEncoder];
|
||||
[blit copyFromTexture:destination sourceSlice:0 sourceLevel:0 sourceOrigin:zero
|
||||
sourceSize:whole toBuffer:out destinationOffset:0
|
||||
destinationBytesPerRow:ROW destinationBytesPerImage:ROW * SIDE];
|
||||
[blit endEncoding];
|
||||
run(cb, "read");
|
||||
|
||||
const uint32_t *got = (const uint32_t *)out.contents;
|
||||
int source_words = 0, other_words = 0, region = 0, firstOther = -1;
|
||||
for (int y = 0; y < SIDE; y++) {
|
||||
for (int x = 0; x < SIDE; x++) {
|
||||
int i = y * SIDE + x, from = i;
|
||||
if (method == REGION_PART) {
|
||||
if (x < half || y < half) continue;
|
||||
from = (y - half) * SIDE + (x - half);
|
||||
}
|
||||
region++;
|
||||
if (got[i] == words[from]) {
|
||||
source_words++;
|
||||
} else {
|
||||
other_words++;
|
||||
if (firstOther < 0) firstOther = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("READ %s round %u region %d source %d other %d", name, round, region, source_words,
|
||||
other_words);
|
||||
if (firstOther >= 0) printf(" first_other %d word 0x%08x", firstOther, got[firstOther]);
|
||||
printf(" fnv %016llx\n", (unsigned long long)fnv(out.contents, TEXELS * 4));
|
||||
fflush(stdout);
|
||||
if (other_words == 0) wholeRounds++;
|
||||
}
|
||||
printf("SUMMARY %s whole %d of %d\n", name, wholeRounds, ROUNDS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ---- buffer to buffer in a Private placement heap ------------------------------------------
|
||||
|
||||
/// A copy of 64 KiB between two buffers at offset 0 of a placement heap (one buffer where `one`),
|
||||
/// the destination `shift` bytes past the source (before it where negative). A third buffer over
|
||||
/// the same bytes writes them first and reads them after; each round prints how many of the bytes
|
||||
/// the copy's two ranges cover hold memmove's answer ("source") and how many do not ("other").
|
||||
static int buf_case(long shift, BOOL one, const char *name) {
|
||||
enum { SIZE = 64 << 10, MORE = 4 << 10, SPAN = SIZE + MORE };
|
||||
MTLResourceOptions bo = MTLResourceStorageModePrivate | MTLResourceHazardTrackingModeTracked;
|
||||
MTLSizeAndAlign bs = [gDevice heapBufferSizeAndAlignWithLength:SPAN options:bo];
|
||||
printf("READ buffer_size %lu buffer_align %lu\n", (unsigned long)bs.size,
|
||||
(unsigned long)bs.align);
|
||||
MTLHeapDescriptor *hd = [MTLHeapDescriptor new];
|
||||
hd.type = MTLHeapTypePlacement;
|
||||
hd.storageMode = MTLStorageModePrivate;
|
||||
hd.hazardTrackingMode = MTLHazardTrackingModeTracked;
|
||||
hd.size = round_up(bs.size, 1u << 16) + (1u << 16);
|
||||
id<MTLHeap> heap = [gDevice newHeapWithDescriptor:hd];
|
||||
id<MTLBuffer> whole = [heap newBufferWithLength:SPAN options:bo offset:0];
|
||||
id<MTLBuffer> first = [heap newBufferWithLength:SPAN options:bo offset:0];
|
||||
id<MTLBuffer> second = one ? first : [heap newBufferWithLength:SPAN options:bo offset:0];
|
||||
if (!heap || !whole || !first || !second) {
|
||||
printf("READ resource nil\n");
|
||||
return 2;
|
||||
}
|
||||
id<MTLBuffer> src = [gDevice newBufferWithLength:SPAN options:MTLResourceStorageModeShared];
|
||||
id<MTLBuffer> out = [gDevice newBufferWithLength:SPAN options:MTLResourceStorageModeShared];
|
||||
NSUInteger from = shift < 0 ? (NSUInteger)-shift : 0, to = shift < 0 ? 0 : (NSUInteger)shift;
|
||||
uint8_t *want = malloc(SPAN);
|
||||
int wholeRounds = 0;
|
||||
for (uint32_t round = 0; round < ROUNDS; round++) {
|
||||
uint8_t *bytes = (uint8_t *)src.contents;
|
||||
for (uint32_t i = 0; i < SPAN; i++) bytes[i] = (uint8_t)(i * 131u + i / 251u + round * 17u);
|
||||
memcpy(want, bytes, SPAN);
|
||||
memmove(want + to, want + from, SIZE);
|
||||
memset(out.contents, 0xEE, SPAN);
|
||||
|
||||
id<MTLCommandBuffer> cb = [gQueue commandBuffer];
|
||||
id<MTLBlitCommandEncoder> blit = [cb blitCommandEncoder];
|
||||
[blit copyFromBuffer:src sourceOffset:0 toBuffer:whole destinationOffset:0 size:SPAN];
|
||||
[blit endEncoding];
|
||||
run(cb, "write");
|
||||
|
||||
cb = [gQueue commandBuffer];
|
||||
blit = [cb blitCommandEncoder];
|
||||
[blit copyFromBuffer:first sourceOffset:from toBuffer:second destinationOffset:to size:SIZE];
|
||||
[blit endEncoding];
|
||||
run(cb, "copy");
|
||||
|
||||
cb = [gQueue commandBuffer];
|
||||
blit = [cb blitCommandEncoder];
|
||||
[blit copyFromBuffer:whole sourceOffset:0 toBuffer:out destinationOffset:0 size:SPAN];
|
||||
[blit endEncoding];
|
||||
run(cb, "read");
|
||||
|
||||
const uint8_t *got = (const uint8_t *)out.contents;
|
||||
int source = 0, other = 0;
|
||||
long firstOther = -1;
|
||||
for (long i = 0; i < SPAN; i++) {
|
||||
if (got[i] == want[i]) {
|
||||
source++;
|
||||
} else {
|
||||
other++;
|
||||
if (firstOther < 0) firstOther = i;
|
||||
}
|
||||
}
|
||||
printf("READ %s round %u source %d other %d", name, round, source, other);
|
||||
if (firstOther >= 0)
|
||||
printf(" first_other %ld byte 0x%02x want 0x%02x", firstOther, got[firstOther],
|
||||
want[firstOther]);
|
||||
printf(" fnv %016llx\n", (unsigned long long)fnv(out.contents, SPAN));
|
||||
fflush(stdout);
|
||||
if (other == 0) wholeRounds++;
|
||||
}
|
||||
free(want);
|
||||
printf("SUMMARY %s whole %d of %d\n", name, wholeRounds, ROUNDS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ---- surface cases -------------------------------------------------------------------------
|
||||
|
||||
/// A copy of `w` by `h` texels from `(sx, sy)` to `(dx, dy)` on the plane's grid of words, done
|
||||
/// in place one word at a time, front to back (`forward`) or back to front.
|
||||
static void in_place(uint32_t *grid, int pitchWords, int sx, int sy, int dx, int dy, int w, int h,
|
||||
BOOL forward) {
|
||||
for (int k = 0; k < w * h; k++) {
|
||||
int i = forward ? k : w * h - 1 - k;
|
||||
int x = i % w, y = i / w;
|
||||
grid[(dy + y) * pitchWords + dx + x] = grid[(sy + y) * pitchWords + sx + x];
|
||||
}
|
||||
}
|
||||
|
||||
static int surface_case(const char *shape, const char *name) {
|
||||
NSDictionary *props = @{
|
||||
(__bridge NSString *)kIOSurfaceWidth : @(SURFACE_WIDTH),
|
||||
(__bridge NSString *)kIOSurfaceHeight : @(SURFACE_HEIGHT),
|
||||
(__bridge NSString *)kIOSurfaceBytesPerElement : @4,
|
||||
(__bridge NSString *)kIOSurfaceBytesPerRow : @(SURFACE_PITCH),
|
||||
(__bridge NSString *)kIOSurfacePixelFormat : @((uint32_t)'BGRA'),
|
||||
};
|
||||
IOSurfaceRef surface = IOSurfaceCreate((__bridge CFDictionaryRef)props);
|
||||
if (!surface) {
|
||||
printf("READ surface nil\n");
|
||||
return 2;
|
||||
}
|
||||
uint8_t *base = (uint8_t *)IOSurfaceGetBaseAddress(surface);
|
||||
size_t alloc = IOSurfaceGetAllocSize(surface), pitch = IOSurfaceGetBytesPerRow(surface);
|
||||
size_t page = (size_t)getpagesize();
|
||||
printf("READ surface alloc %zu pitch %zu base_page_offset %zu page %zu\n", alloc, pitch,
|
||||
(size_t)((uintptr_t)base % page), page);
|
||||
if ((uintptr_t)base % page != 0 || pitch % 4 != 0) {
|
||||
printf("READ skipped: the surface's bytes take no no-copy buffer\n");
|
||||
return 2;
|
||||
}
|
||||
id<MTLBuffer> buffer = [gDevice
|
||||
newBufferWithBytesNoCopy:base
|
||||
length:round_up(alloc, page)
|
||||
options:MTLResourceStorageModeShared | MTLResourceHazardTrackingModeTracked
|
||||
deallocator:nil];
|
||||
MTLTextureDescriptor *td =
|
||||
[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatBGRA8Unorm
|
||||
width:SURFACE_WIDTH
|
||||
height:SURFACE_HEIGHT
|
||||
mipmapped:NO];
|
||||
td.usage = MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite;
|
||||
td.storageMode = MTLStorageModeShared;
|
||||
td.hazardTrackingMode = MTLHazardTrackingModeTracked;
|
||||
id<MTLTexture> texture = [gDevice newTextureWithDescriptor:td iosurface:surface plane:0];
|
||||
if (!buffer || !texture) {
|
||||
printf("READ resource nil buffer %d texture %d\n", buffer != nil, texture != nil);
|
||||
return 2;
|
||||
}
|
||||
BOOL into = strncmp(shape, "in-", 3) == 0;
|
||||
const char *move = shape + (into ? 3 : 4);
|
||||
int sx = 0, sy = 0, dx = 0, dy = 0, w = SURFACE_WIDTH, h = SURFACE_HEIGHT;
|
||||
if (strcmp(move, "up") == 0) {
|
||||
sy = 1;
|
||||
h -= 1;
|
||||
} else if (strcmp(move, "down") == 0) {
|
||||
dy = 1;
|
||||
h -= 1;
|
||||
} else {
|
||||
dx = SHIFT;
|
||||
w -= SHIFT;
|
||||
}
|
||||
int pitchWords = (int)(pitch / 4);
|
||||
size_t bytes = pitch * SURFACE_HEIGHT;
|
||||
uint32_t *before = malloc(bytes), *expect = malloc(bytes), *forward = malloc(bytes),
|
||||
*backward = malloc(bytes);
|
||||
int wholeRounds = 0;
|
||||
for (uint32_t round = 0; round < ROUNDS; round++) {
|
||||
IOSurfaceLock(surface, 0, NULL);
|
||||
uint32_t *grid = (uint32_t *)base;
|
||||
for (int y = 0; y < SURFACE_HEIGHT; y++)
|
||||
for (int x = 0; x < pitchWords; x++)
|
||||
grid[y * pitchWords + x] = 0xC0000000u | (round << 16) | ((uint32_t)y << 8) |
|
||||
(uint32_t)x;
|
||||
memcpy(before, grid, bytes);
|
||||
IOSurfaceUnlock(surface, 0, NULL);
|
||||
memcpy(expect, before, bytes);
|
||||
for (int y = 0; y < h; y++)
|
||||
for (int x = 0; x < w; x++)
|
||||
expect[(dy + y) * pitchWords + dx + x] = before[(sy + y) * pitchWords + sx + x];
|
||||
memcpy(forward, before, bytes);
|
||||
in_place(forward, pitchWords, sx, sy, dx, dy, w, h, YES);
|
||||
memcpy(backward, before, bytes);
|
||||
in_place(backward, pitchWords, sx, sy, dx, dy, w, h, NO);
|
||||
|
||||
id<MTLCommandBuffer> cb = [gQueue commandBuffer];
|
||||
id<MTLBlitCommandEncoder> blit = [cb blitCommandEncoder];
|
||||
if (into) {
|
||||
[blit copyFromBuffer:buffer sourceOffset:(NSUInteger)(sy * pitch + sx * 4)
|
||||
sourceBytesPerRow:pitch sourceBytesPerImage:pitch * h
|
||||
sourceSize:MTLSizeMake(w, h, 1) toTexture:texture destinationSlice:0
|
||||
destinationLevel:0 destinationOrigin:MTLOriginMake(dx, dy, 0)];
|
||||
} else {
|
||||
[blit copyFromTexture:texture sourceSlice:0 sourceLevel:0
|
||||
sourceOrigin:MTLOriginMake(sx, sy, 0) sourceSize:MTLSizeMake(w, h, 1)
|
||||
toBuffer:buffer destinationOffset:(NSUInteger)(dy * pitch + dx * 4)
|
||||
destinationBytesPerRow:pitch destinationBytesPerImage:pitch * h];
|
||||
}
|
||||
[blit endEncoding];
|
||||
run(cb, "copy");
|
||||
|
||||
IOSurfaceLock(surface, kIOSurfaceLockReadOnly, NULL);
|
||||
const uint32_t *got = (const uint32_t *)base;
|
||||
int source = 0, fwd = 0, bwd = 0, other = 0, outside = 0, first = -1;
|
||||
for (int y = 0; y < SURFACE_HEIGHT; y++) {
|
||||
for (int x = 0; x < pitchWords; x++) {
|
||||
int i = y * pitchWords + x;
|
||||
BOOL inRegion = y >= dy && y < dy + h && x >= dx && x < dx + w;
|
||||
if (!inRegion) {
|
||||
outside += got[i] != before[i];
|
||||
continue;
|
||||
}
|
||||
BOOL any = NO;
|
||||
if (got[i] == expect[i]) source++, any = YES;
|
||||
if (got[i] == forward[i]) fwd++, any = YES;
|
||||
if (got[i] == backward[i]) bwd++, any = YES;
|
||||
if (!any) {
|
||||
other++;
|
||||
if (first < 0) first = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("READ %s round %u region %d source %d forward %d backward %d other %d outside %d",
|
||||
name, round, w * h, source, fwd, bwd, other, outside);
|
||||
if (first >= 0) printf(" first_other %d word 0x%08x", first, got[first]);
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
if (source == w * h && outside == 0) wholeRounds++;
|
||||
IOSurfaceUnlock(surface, kIOSurfaceLockReadOnly, NULL);
|
||||
}
|
||||
printf("SUMMARY %s whole %d of %d\n", name, wholeRounds, ROUNDS);
|
||||
free(before);
|
||||
free(expect);
|
||||
free(forward);
|
||||
free(backward);
|
||||
CFRelease(surface);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
@autoreleasepool {
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: %s <case> | --list\n", argv[0]);
|
||||
return 64;
|
||||
}
|
||||
if (strcmp(argv[1], "--list") == 0) {
|
||||
for (size_t i = 0; i < sizeof kCases / sizeof kCases[0]; i++) printf("%s\n", kCases[i]);
|
||||
return 0;
|
||||
}
|
||||
const char *name = argv[1];
|
||||
BOOL known = NO;
|
||||
for (size_t i = 0; i < sizeof kCases / sizeof kCases[0]; i++)
|
||||
known |= strcmp(kCases[i], name) == 0;
|
||||
if (!known) {
|
||||
fprintf(stderr, "unknown case %s\n", name);
|
||||
return 64;
|
||||
}
|
||||
gDevice = MTLCreateSystemDefaultDevice();
|
||||
gQueue = [gDevice newCommandQueue];
|
||||
printf("DEVICE %s\n", gDevice.name.UTF8String);
|
||||
printf("RELEASE macOS %s\n",
|
||||
[NSProcessInfo processInfo].operatingSystemVersionString.UTF8String);
|
||||
printf("CASE %s\n", name);
|
||||
fflush(stdout);
|
||||
int rc;
|
||||
if (strncmp(name, "heap-", 5) == 0) {
|
||||
MTLStorageMode mode = strncmp(name + 5, "private", 7) == 0 ? MTLStorageModePrivate
|
||||
: MTLStorageModeShared;
|
||||
const char *shape = name + 5 + (mode == MTLStorageModePrivate ? 8 : 7);
|
||||
char base[8] = {0};
|
||||
strncpy(base, shape, 3);
|
||||
rc = heap_case(mode, base, strstr(shape, "-apart") != NULL, name);
|
||||
} else if (strncmp(name, "buf-", 4) == 0) {
|
||||
BOOL one = strncmp(name, "buf-one-", 8) == 0;
|
||||
const char *way = name + (one ? 8 : 10);
|
||||
BOOL up = strncmp(way, "up-", 3) == 0;
|
||||
long n = atol(way + (up ? 3 : 5));
|
||||
rc = buf_case(up ? n : -n, one, name);
|
||||
} else if (strncmp(name, "tex-", 4) == 0) {
|
||||
const char *t = name + 4;
|
||||
if (strcmp(t, "shift") == 0) rc = tex_case(1, WHOLE, 0, name);
|
||||
else if (strcmp(t, "half") == 0) rc = tex_case(2, WHOLE, 0, name);
|
||||
else if (strcmp(t, "region") == 0) rc = tex_case(0, REGION_WHOLE, 0, name);
|
||||
else if (strcmp(t, "region-half") == 0) rc = tex_case(2, REGION_WHOLE, 0, name);
|
||||
else if (strcmp(t, "region-part") == 0) rc = tex_case(0, REGION_PART, 0, name);
|
||||
else if (strcmp(t, "inplace-to") == 0) rc = tex_case(0, WHOLE, 1, name);
|
||||
else rc = tex_case(0, WHOLE, 2, name);
|
||||
} else {
|
||||
rc = surface_case(name + 8, name);
|
||||
}
|
||||
printf("DONE %s\n", name);
|
||||
fflush(stdout);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,11 @@ static float *draw(NSString *fragment, MTLPixelFormat format, int targets, int s
|
||||
height:side
|
||||
mipmapped:NO];
|
||||
td.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead;
|
||||
td.storageMode = samples > 1 ? MTLStorageModePrivate : MTLStorageModeShared;
|
||||
// A discrete GPU's Mac takes no Shared texture: there a single-sample attachment is Managed,
|
||||
// and a blit synchronizes it before the CPU reads it.
|
||||
td.storageMode = samples > 1 ? MTLStorageModePrivate
|
||||
: gDevice.hasUnifiedMemory ? MTLStorageModeShared
|
||||
: MTLStorageModeManaged;
|
||||
td.textureType = samples > 1 ? MTLTextureType2DMultisample : MTLTextureType2D;
|
||||
td.sampleCount = samples;
|
||||
id<MTLTexture> textures[8];
|
||||
@@ -158,6 +162,11 @@ static float *draw(NSString *fragment, MTLPixelFormat format, int targets, int s
|
||||
[ce endEncoding];
|
||||
}
|
||||
}
|
||||
if (samples == 1 && !gDevice.hasUnifiedMemory) {
|
||||
id<MTLBlitCommandEncoder> b = [cb blitCommandEncoder];
|
||||
for (int i = 0; i < targets; i++) [b synchronizeResource:textures[i]];
|
||||
[b endEncoding];
|
||||
}
|
||||
[cb commit];
|
||||
[cb waitUntilCompleted];
|
||||
if (cb.error) {
|
||||
|
||||
+423
@@ -0,0 +1,423 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "indirect-range-gpu-written-indexed-patch-draws",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "icb_merged_ipatches.ll",
|
||||
"entry": "icb_merged_ipatches",
|
||||
"source_sha256": "b25e68cedf24679d06f1c9c5b578dd24f9a6765c2730fe64c6748ec5ad9b8a94"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_ipatches.air.ll",
|
||||
"entry": "icb_merged_ipatches",
|
||||
"source_sha256": "2e5e19c3a9c01d97e61c6ce7a55ecda1bb1cf7f5d078a5333db1f022ae68bf15"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_ipatches.ll",
|
||||
"entry": "icb_merged_ipatch_vertex",
|
||||
"source_sha256": "b25e68cedf24679d06f1c9c5b578dd24f9a6765c2730fe64c6748ec5ad9b8a94"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_ipatches.air.ll",
|
||||
"entry": "icb_merged_ipatch_vertex",
|
||||
"source_sha256": "2e5e19c3a9c01d97e61c6ce7a55ecda1bb1cf7f5d078a5333db1f022ae68bf15"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_ipatches.ll",
|
||||
"entry": "icb_merged_ipatch_fragment",
|
||||
"source_sha256": "b25e68cedf24679d06f1c9c5b578dd24f9a6765c2730fe64c6748ec5ad9b8a94"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_ipatches.air.ll",
|
||||
"entry": "icb_merged_ipatch_fragment",
|
||||
"source_sha256": "2e5e19c3a9c01d97e61c6ce7a55ecda1bb1cf7f5d078a5333db1f022ae68bf15"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": "metal_run",
|
||||
"device": "Apple M3 Max",
|
||||
"runs": 3,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 3,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "b25e68cedf24679d06f1c9c5b578dd24f9a6765c2730fe64c6748ec5ad9b8a94"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2e5e19c3a9c01d97e61c6ce7a55ecda1bb1cf7f5d078a5333db1f022ae68bf15"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:draws",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "0ce15fd22a62915fa73eb0f74d4591d48fbac3a3a7dd63add596ed5b943412d2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:marks",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2c050a4484712374bc0061534a9607f09e7bfa43dc246463b34d80eef0210fe7"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:frame",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "b7013c015db61a3fe79e6983697779e6f0d0cfa795ace130f2401424d94011c6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:corners",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "8387c9b2878550caca811c4689d84a51a39d96acd7883990dcafe6ce0c31ff36"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:points",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "141f3df317a7b672aacc4d44f1571d23abbc11b483ee9e66678f5f2eb2f69184"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:factors",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "6b915313f9a35aa1187c128f7a0b39416b7dde4a3c97d63fa1b1715a6630bd95"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:range",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "dbec72d7af153cd0a8a4b33054d8ea7329136a5fc88f017d984653e93ce0b4a4"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:copied-range",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "eca75f8497701d6223817cde38bf42cdd1124e01ef6b705bcfe9a584f7b42f0f"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "execution",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "ad2aac34e8f61b894e782c47a2726c16f0dbbdf9789d95c68247c828bbad2621"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "library",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:draws",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:marks",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:frame",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:corners",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:points",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:factors",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:range",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:copied-range",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "execution",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target-texels",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"texture": {
|
||||
"level": 0,
|
||||
"slice": 0,
|
||||
"aspect": "color",
|
||||
"sample": 0,
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"size": [
|
||||
8,
|
||||
16,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"element": "u32",
|
||||
"row_offset": 0,
|
||||
"row_elements": 32,
|
||||
"row_pitch": 128,
|
||||
"rows": 16,
|
||||
"image_pitch": 2048,
|
||||
"images": 1,
|
||||
"gaps": "compared"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "ran"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 10.54",
|
||||
"instrument": 241,
|
||||
"times": {
|
||||
"case": "indirect-range-gpu-written-indexed-patch-draws",
|
||||
"calls": 10,
|
||||
"in_calls": 36194957,
|
||||
"on_cpu": 1482498,
|
||||
"blocked": 34785959,
|
||||
"elsewhere": 8260000,
|
||||
"spend": 44425792,
|
||||
"spend_least": 43452459,
|
||||
"spend_most": 46478627,
|
||||
"per_call": [
|
||||
{
|
||||
"call": "buffer",
|
||||
"least_calls": 8,
|
||||
"most_calls": 8,
|
||||
"wall": 2125,
|
||||
"on_cpu": 2250,
|
||||
"blocked": 0,
|
||||
"wall_least": 1875,
|
||||
"wall_most": 2750,
|
||||
"wall_total": 46791,
|
||||
"on_cpu_total": 48251,
|
||||
"blocked_total": 0
|
||||
},
|
||||
{
|
||||
"call": "encoded_range",
|
||||
"least_calls": 1,
|
||||
"most_calls": 1,
|
||||
"wall": 9653625,
|
||||
"on_cpu": 689792,
|
||||
"blocked": 8828708,
|
||||
"wall_least": 9103125,
|
||||
"wall_most": 10684500,
|
||||
"wall_total": 9653625,
|
||||
"on_cpu_total": 689792,
|
||||
"blocked_total": 8828708
|
||||
},
|
||||
{
|
||||
"call": "library",
|
||||
"least_calls": 1,
|
||||
"most_calls": 1,
|
||||
"wall": 26477750,
|
||||
"on_cpu": 708084,
|
||||
"blocked": 25811625,
|
||||
"wall_least": 26255917,
|
||||
"wall_most": 28317958,
|
||||
"wall_total": 26477750,
|
||||
"on_cpu_total": 708084,
|
||||
"blocked_total": 25811625
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+402
@@ -0,0 +1,402 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "indirect-range-gpu-written-patch-draws",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "icb_merged_patches.ll",
|
||||
"entry": "icb_merged_patches",
|
||||
"source_sha256": "d71808b60017fb10c3b4cfcbc94106c0e463042539a5a7b167aebc68a6b9f0d6"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_patches.air.ll",
|
||||
"entry": "icb_merged_patches",
|
||||
"source_sha256": "aad671f3480a454481577e25ee2c86d43b2b7cce5971456b1454319c59909219"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_patches.ll",
|
||||
"entry": "icb_merged_patch_vertex",
|
||||
"source_sha256": "d71808b60017fb10c3b4cfcbc94106c0e463042539a5a7b167aebc68a6b9f0d6"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_patches.air.ll",
|
||||
"entry": "icb_merged_patch_vertex",
|
||||
"source_sha256": "aad671f3480a454481577e25ee2c86d43b2b7cce5971456b1454319c59909219"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_patches.ll",
|
||||
"entry": "icb_merged_patch_fragment",
|
||||
"source_sha256": "d71808b60017fb10c3b4cfcbc94106c0e463042539a5a7b167aebc68a6b9f0d6"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_patches.air.ll",
|
||||
"entry": "icb_merged_patch_fragment",
|
||||
"source_sha256": "aad671f3480a454481577e25ee2c86d43b2b7cce5971456b1454319c59909219"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": "metal_run",
|
||||
"device": "Apple M3 Max",
|
||||
"runs": 3,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 3,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "d71808b60017fb10c3b4cfcbc94106c0e463042539a5a7b167aebc68a6b9f0d6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "aad671f3480a454481577e25ee2c86d43b2b7cce5971456b1454319c59909219"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:draws",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "0ce15fd22a62915fa73eb0f74d4591d48fbac3a3a7dd63add596ed5b943412d2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:marks",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2c050a4484712374bc0061534a9607f09e7bfa43dc246463b34d80eef0210fe7"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:frame",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "b7013c015db61a3fe79e6983697779e6f0d0cfa795ace130f2401424d94011c6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:xy",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "06eb16ee0c7fb7d2cce6f2d22c05ca75d3f43c96acd50cc50faa0b5cdaf67d0f"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:factors",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "6b915313f9a35aa1187c128f7a0b39416b7dde4a3c97d63fa1b1715a6630bd95"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:range",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "dbec72d7af153cd0a8a4b33054d8ea7329136a5fc88f017d984653e93ce0b4a4"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:copied-range",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "eca75f8497701d6223817cde38bf42cdd1124e01ef6b705bcfe9a584f7b42f0f"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "execution",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "47e37f4716e5483692d2930763ef674b40ebc015261a335cd1561a971ecab4fb"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "library",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:draws",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:marks",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:frame",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:xy",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:factors",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:range",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:copied-range",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "execution",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target-texels",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAABAQAAAQAAAAIAAAABAAAAAQEAAAEAAAACAAAAAQAAAAEBAAABAAAAAgAAAAEAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAgEAAAIAAAACAAAAAgAAAAIBAAACAAAAAgAAAAIAAAACAQAAAgAAAAIAAAACAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAMBAAADAAAABAAAAAMAAAADAQAAAwAAAAQAAAADAAAAAwEAAAMAAAAEAAAAAwAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAEAQAABAAAAAQAAAAEAAAABAEAAAQAAAAEAAAABAAAAAQBAAAEAAAABAAAAAQAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAABQEAAAUAAAAGAAAABQAAAAUBAAAFAAAABgAAAAUAAAAFAQAABQAAAAYAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"texture": {
|
||||
"level": 0,
|
||||
"slice": 0,
|
||||
"aspect": "color",
|
||||
"sample": 0,
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"size": [
|
||||
8,
|
||||
16,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"element": "u32",
|
||||
"row_offset": 0,
|
||||
"row_elements": 32,
|
||||
"row_pitch": 128,
|
||||
"rows": 16,
|
||||
"image_pitch": 2048,
|
||||
"images": 1,
|
||||
"gaps": "compared"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "ran"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 9.22",
|
||||
"instrument": 243,
|
||||
"times": {
|
||||
"case": "indirect-range-gpu-written-patch-draws",
|
||||
"calls": 9,
|
||||
"in_calls": 35987916,
|
||||
"on_cpu": 1301625,
|
||||
"blocked": 34623584,
|
||||
"elsewhere": 8263083,
|
||||
"spend": 44553706,
|
||||
"spend_least": 43017916,
|
||||
"spend_most": 51074958,
|
||||
"per_call": [
|
||||
{
|
||||
"call": "buffer",
|
||||
"least_calls": 7,
|
||||
"most_calls": 7,
|
||||
"wall": 2083,
|
||||
"on_cpu": 2209,
|
||||
"blocked": 0,
|
||||
"wall_least": 1791,
|
||||
"wall_most": 2459,
|
||||
"wall_total": 41790,
|
||||
"on_cpu_total": 42750,
|
||||
"blocked_total": 0
|
||||
},
|
||||
{
|
||||
"call": "encoded_range",
|
||||
"least_calls": 1,
|
||||
"most_calls": 1,
|
||||
"wall": 9405375,
|
||||
"on_cpu": 617625,
|
||||
"blocked": 8797958,
|
||||
"wall_least": 8986208,
|
||||
"wall_most": 11068625,
|
||||
"wall_total": 9405375,
|
||||
"on_cpu_total": 617625,
|
||||
"blocked_total": 8797958
|
||||
},
|
||||
{
|
||||
"call": "library",
|
||||
"least_calls": 1,
|
||||
"most_calls": 1,
|
||||
"wall": 26239083,
|
||||
"on_cpu": 640542,
|
||||
"blocked": 25567583,
|
||||
"wall_least": 25508041,
|
||||
"wall_most": 33501292,
|
||||
"wall_total": 26239083,
|
||||
"on_cpu_total": 640542,
|
||||
"blocked_total": 25567583
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+381
@@ -0,0 +1,381 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "indirect-range-gpu-written-plain-draws",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "icb_merged_draws.ll",
|
||||
"entry": "icb_merged_triangles",
|
||||
"source_sha256": "62094586abf5f2e8b34451370f2110e510800d5f154fa05c3ad6726fda571ada"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_draws.air.ll",
|
||||
"entry": "icb_merged_triangles",
|
||||
"source_sha256": "057557b1e38d8813b3b8284419f1ab80da59e0ba5736543e3dc3cff4ca48d622"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_draws.ll",
|
||||
"entry": "icb_merged_vertex",
|
||||
"source_sha256": "62094586abf5f2e8b34451370f2110e510800d5f154fa05c3ad6726fda571ada"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_draws.air.ll",
|
||||
"entry": "icb_merged_vertex",
|
||||
"source_sha256": "057557b1e38d8813b3b8284419f1ab80da59e0ba5736543e3dc3cff4ca48d622"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_draws.ll",
|
||||
"entry": "icb_merged_fragment",
|
||||
"source_sha256": "62094586abf5f2e8b34451370f2110e510800d5f154fa05c3ad6726fda571ada"
|
||||
},
|
||||
{
|
||||
"fixture": "icb_merged_draws.air.ll",
|
||||
"entry": "icb_merged_fragment",
|
||||
"source_sha256": "057557b1e38d8813b3b8284419f1ab80da59e0ba5736543e3dc3cff4ca48d622"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": "metal_run",
|
||||
"device": "Apple M3 Max",
|
||||
"runs": 3,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 3,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "62094586abf5f2e8b34451370f2110e510800d5f154fa05c3ad6726fda571ada"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "057557b1e38d8813b3b8284419f1ab80da59e0ba5736543e3dc3cff4ca48d622"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:draws",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "a218b20cc7cb7430a0252189ca31754adb8261576bacf865b0476c1eeaaa5a2c"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:marks",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2c050a4484712374bc0061534a9607f09e7bfa43dc246463b34d80eef0210fe7"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:frame",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "b7013c015db61a3fe79e6983697779e6f0d0cfa795ace130f2401424d94011c6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:xy",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2d1d34182af3ad3e082d0e0a210b30b782c1a506581fedd15b40447e2414c721"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:range",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "dbec72d7af153cd0a8a4b33054d8ea7329136a5fc88f017d984653e93ce0b4a4"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:copied-range",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "eca75f8497701d6223817cde38bf42cdd1124e01ef6b705bcfe9a584f7b42f0f"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "execution",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "38a4728ce077a3a098320db29a766b6b7e727f063d0c724a232e1895a88507c9"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "library",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:draws",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:marks",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:frame",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:xy",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:range",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:copied-range",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "execution",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target-texels",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAGAAAAAgAAAAEAAAABAQAABgAAAAIAAAABAAAAAQEAAAYAAAACAAAAAQAAAAEBAAAGAAAAAgAAAAEAAAABAQAABgAAAAIAAAABAAAAAQEAAAYAAAACAAAAAQAAAAEBAAAJAAAAAgAAAAEAAAABAQAACQAAAAIAAAABAAAAAQEAAAYAAAACAAAAAQAAAAEBAAAGAAAAAgAAAAEAAAABAQAACQAAAAIAAAABAAAAAQEAAAkAAAACAAAAAQAAAAEBAAAJAAAAAgAAAAEAAAABAQAACQAAAAIAAAABAAAAAQEAAAkAAAACAAAAAQAAAAEBAAAJAAAAAgAAAAEAAAACAQAADAAAAAIAAAACAAAAAgEAAAwAAAACAAAAAgAAAAIBAAAMAAAAAgAAAAIAAAACAQAADAAAAAIAAAACAAAAAgEAAAwAAAACAAAAAgAAAAIBAAAMAAAAAgAAAAIAAAACAQAADwAAAAIAAAACAAAAAgEAAA8AAAACAAAAAgAAAAIBAAAMAAAAAgAAAAIAAAACAQAADAAAAAIAAAACAAAAAgEAAA8AAAACAAAAAgAAAAIBAAAPAAAAAgAAAAIAAAACAQAADwAAAAIAAAACAAAAAgEAAA8AAAACAAAAAgAAAAIBAAAPAAAAAgAAAAIAAAACAQAADwAAAAIAAAACAAAAAwEAABIAAAAEAAAAAwAAAAMBAAASAAAABAAAAAMAAAADAQAAEgAAAAQAAAADAAAAAwEAABIAAAAEAAAAAwAAAAMBAAASAAAABAAAAAMAAAADAQAAEgAAAAQAAAADAAAAAwEAABUAAAAEAAAAAwAAAAMBAAAVAAAABAAAAAMAAAADAQAAEgAAAAQAAAADAAAAAwEAABIAAAAEAAAAAwAAAAMBAAAVAAAABAAAAAMAAAADAQAAFQAAAAQAAAADAAAAAwEAABUAAAAEAAAAAwAAAAMBAAAVAAAABAAAAAMAAAADAQAAFQAAAAQAAAADAAAAAwEAABUAAAAEAAAAAwAAAAQBAAAYAAAABAAAAAQAAAAEAQAAGAAAAAQAAAAEAAAABAEAABgAAAAEAAAABAAAAAQBAAAYAAAABAAAAAQAAAAEAQAAGAAAAAQAAAAEAAAABAEAABgAAAAEAAAABAAAAAQBAAAbAAAABAAAAAQAAAAEAQAAGwAAAAQAAAAEAAAABAEAABgAAAAEAAAABAAAAAQBAAAYAAAABAAAAAQAAAAEAQAAGwAAAAQAAAAEAAAABAEAABsAAAAEAAAABAAAAAQBAAAbAAAABAAAAAQAAAAEAQAAGwAAAAQAAAAEAAAABAEAABsAAAAEAAAABAAAAAQBAAAbAAAABAAAAAQAAAAFAQAAHgAAAAYAAAAFAAAABQEAAB4AAAAGAAAABQAAAAUBAAAeAAAABgAAAAUAAAAFAQAAHgAAAAYAAAAFAAAABQEAAB4AAAAGAAAABQAAAAUBAAAeAAAABgAAAAUAAAAFAQAAIQAAAAYAAAAFAAAABQEAACEAAAAGAAAABQAAAAUBAAAeAAAABgAAAAUAAAAFAQAAHgAAAAYAAAAFAAAABQEAACEAAAAGAAAABQAAAAUBAAAhAAAABgAAAAUAAAAFAQAAIQAAAAYAAAAFAAAABQEAACEAAAAGAAAABQAAAAUBAAAhAAAABgAAAAUAAAAFAQAAIQAAAAYAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"texture": {
|
||||
"level": 0,
|
||||
"slice": 0,
|
||||
"aspect": "color",
|
||||
"sample": 0,
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"size": [
|
||||
8,
|
||||
16,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"element": "u32",
|
||||
"row_offset": 0,
|
||||
"row_elements": 32,
|
||||
"row_pitch": 128,
|
||||
"rows": 16,
|
||||
"image_pitch": 2048,
|
||||
"images": 1,
|
||||
"gaps": "compared"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "ran"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 8.69",
|
||||
"instrument": 335,
|
||||
"times": {
|
||||
"case": "indirect-range-gpu-written-plain-draws",
|
||||
"calls": 8,
|
||||
"in_calls": 35681583,
|
||||
"on_cpu": 1324710,
|
||||
"blocked": 34355668,
|
||||
"elsewhere": 8006709,
|
||||
"spend": 43671958,
|
||||
"spend_least": 43513917,
|
||||
"spend_most": 360937126,
|
||||
"per_call": [
|
||||
{
|
||||
"call": "buffer",
|
||||
"least_calls": 6,
|
||||
"most_calls": 6,
|
||||
"wall": 2125,
|
||||
"on_cpu": 2250,
|
||||
"blocked": 0,
|
||||
"wall_least": 2000,
|
||||
"wall_most": 3958,
|
||||
"wall_total": 37083,
|
||||
"on_cpu_total": 38044,
|
||||
"blocked_total": 0
|
||||
},
|
||||
{
|
||||
"call": "encoded_range",
|
||||
"least_calls": 1,
|
||||
"most_calls": 1,
|
||||
"wall": 9033125,
|
||||
"on_cpu": 643250,
|
||||
"blocked": 8376667,
|
||||
"wall_least": 8846333,
|
||||
"wall_most": 12209583,
|
||||
"wall_total": 9033125,
|
||||
"on_cpu_total": 643250,
|
||||
"blocked_total": 8376667
|
||||
},
|
||||
{
|
||||
"call": "library",
|
||||
"least_calls": 1,
|
||||
"most_calls": 1,
|
||||
"wall": 26798167,
|
||||
"on_cpu": 659500,
|
||||
"blocked": 26109209,
|
||||
"wall_least": 26143667,
|
||||
"wall_most": 339176584,
|
||||
"wall_total": 26798167,
|
||||
"on_cpu_total": 659500,
|
||||
"blocked_total": 26109209
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "managed-named-address-only",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "examples/runtime_examples.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
},
|
||||
{
|
||||
"fixture": "examples/runtime_examples.air.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.air.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M measurement under macOS 26.7.1, 8 rounds a reader (jobs 81602 and 81644), which found that a named Managed range reaches the GPU at the first commit whose encoders name the buffer, with its bytes as of that commit, and that a buffer no encoder names keeps the bytes its GPU copy last took",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 8,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 8,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Synced",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "20c32b58f9dbd5416fe908e078a5ba1d76c369e08dc3c9d62c5c4e71ec4c9b05"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Named",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2391a11b1f9ea5ba826528ca3c097c8d2144c199a679efe81e425ec575ee514e"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Later",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "a18573742f763887800bcc4744b72900125a1b2c0e4b7a5f7f894aa3f9121d72"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reader",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "d80c9bf910f144738ef983724bc04bd6bd3f17c5c83ed57bedee1b1b9278e811"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "examples",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pointers",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sequence",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reads",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"the bytes the GPU's copy last took"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 11.59",
|
||||
"instrument": 240,
|
||||
"times": {
|
||||
"case": "managed-named-address-only",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle keeps one copy of a Managed buffer (hasUnifiedMemory true), so its run answers what one copy holds, not which commit takes a range to a second copy",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "managed-named-blit-source",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "examples/runtime_examples.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
},
|
||||
{
|
||||
"fixture": "examples/runtime_examples.air.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.air.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M measurement under macOS 26.7.1, 8 rounds a reader (jobs 81602 and 81644), which found that a named Managed range reaches the GPU at the first commit whose encoders name the buffer, with its bytes as of that commit, and that a buffer no encoder names keeps the bytes its GPU copy last took",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 8,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 8,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Synced",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "20c32b58f9dbd5416fe908e078a5ba1d76c369e08dc3c9d62c5c4e71ec4c9b05"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Named",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2391a11b1f9ea5ba826528ca3c097c8d2144c199a679efe81e425ec575ee514e"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Later",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "a18573742f763887800bcc4744b72900125a1b2c0e4b7a5f7f894aa3f9121d72"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reader",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "1b2e19108e54dc09c92e23b90c30f27cda0ce0147bdaaf8c3971fff9b8f730b5"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "examples",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pointers",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sequence",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reads",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"the bytes as of the reader's commit"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 11.59",
|
||||
"instrument": 240,
|
||||
"times": {
|
||||
"case": "managed-named-blit-source",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle keeps one copy of a Managed buffer (hasUnifiedMemory true), so its run answers what one copy holds, not which commit takes a range to a second copy",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "managed-named-compute-slot",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "examples/runtime_examples.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
},
|
||||
{
|
||||
"fixture": "examples/runtime_examples.air.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.air.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M measurement under macOS 26.7.1, 8 rounds a reader (jobs 81602 and 81644), which found that a named Managed range reaches the GPU at the first commit whose encoders name the buffer, with its bytes as of that commit, and that a buffer no encoder names keeps the bytes its GPU copy last took",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 8,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 8,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Synced",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "20c32b58f9dbd5416fe908e078a5ba1d76c369e08dc3c9d62c5c4e71ec4c9b05"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Named",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2391a11b1f9ea5ba826528ca3c097c8d2144c199a679efe81e425ec575ee514e"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Later",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "a18573742f763887800bcc4744b72900125a1b2c0e4b7a5f7f894aa3f9121d72"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reader",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "55407f997e7be480140400a823d6eaf8df8b9088782e4e0399c05d73705f6c38"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "examples",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pointers",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sequence",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reads",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"the bytes as of the reader's commit"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 11.59",
|
||||
"instrument": 240,
|
||||
"times": {
|
||||
"case": "managed-named-compute-slot",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle keeps one copy of a Managed buffer (hasUnifiedMemory true), so its run answers what one copy holds, not which commit takes a range to a second copy",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "managed-named-declared",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "examples/runtime_examples.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
},
|
||||
{
|
||||
"fixture": "examples/runtime_examples.air.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.air.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M measurement under macOS 26.7.1, 8 rounds a reader (jobs 81602 and 81644), which found that a named Managed range reaches the GPU at the first commit whose encoders name the buffer, with its bytes as of that commit, and that a buffer no encoder names keeps the bytes its GPU copy last took",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 8,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 8,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Synced",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "20c32b58f9dbd5416fe908e078a5ba1d76c369e08dc3c9d62c5c4e71ec4c9b05"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Named",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2391a11b1f9ea5ba826528ca3c097c8d2144c199a679efe81e425ec575ee514e"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Later",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "a18573742f763887800bcc4744b72900125a1b2c0e4b7a5f7f894aa3f9121d72"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reader",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "f833228cb8681bbf3e38af9de7a212dfc542b3e3ba1312ec8a45bb2b67605dc7"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "examples",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pointers",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sequence",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reads",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"the bytes as of the reader's commit"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 11.59",
|
||||
"instrument": 240,
|
||||
"times": {
|
||||
"case": "managed-named-declared",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle keeps one copy of a Managed buffer (hasUnifiedMemory true), so its run answers what one copy holds, not which commit takes a range to a second copy",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "managed-named-vertex-slot",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "examples/runtime_examples.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
},
|
||||
{
|
||||
"fixture": "examples/runtime_examples.air.ll",
|
||||
"entry": "scale_and_offset",
|
||||
"source_sha256": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
},
|
||||
{
|
||||
"fixture": "ab_pointers.air.ll",
|
||||
"entry": "ab_address",
|
||||
"source_sha256": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M measurement under macOS 26.7.1, 8 rounds a reader (jobs 81602 and 81644), which found that a named Managed range reaches the GPU at the first commit whose encoders name the buffer, with its bytes as of that commit, and that a buffer no encoder names keeps the bytes its GPU copy last took",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 8,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 8,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "fbe310c683c1e125803f56d76f76eaceda8d4b7a7f1968715a583b8fad27c7d6"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:examples",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "579cc33e08cdfb18fdb85de70d8d81983d280dd737b2ed4894483ca0faa6e880"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "7e51361c89fa9dc5f98df57f99923c3a734abb96253a55bf992370f088c01315"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed:pointers",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "1fdd7761a65caebbf70a505edfcb95c4627ae1a8a2ec5eb856adc270f18206a2"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Synced",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "20c32b58f9dbd5416fe908e078a5ba1d76c369e08dc3c9d62c5c4e71ec4c9b05"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Named",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "2391a11b1f9ea5ba826528ca3c097c8d2144c199a679efe81e425ec575ee514e"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents:Later",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "a18573742f763887800bcc4744b72900125a1b2c0e4b7a5f7f894aa3f9121d72"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reader",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "af7ad0b82e4819d2859b5a0ef4a1f6f77d03e74795f9bf8595785db2a066ef30"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "examples",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pointers",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sequence",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reads",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"the bytes as of the reader's commit"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 11.59",
|
||||
"instrument": 240,
|
||||
"times": {
|
||||
"case": "managed-named-vertex-slot",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle keeps one copy of a Managed buffer (hasUnifiedMemory true), so its run answers what one copy holds, not which commit takes a range to a second copy",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "sample-positions-8x-custom-left",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "rt6_restart.ll",
|
||||
"entry": "rt6_restart_vertex+rt6_restart_count",
|
||||
"source_sha256": "ee3fb102a9172fb5214a2c468b5fb177a7000fb169043ed578a12dd5b43c0464"
|
||||
},
|
||||
{
|
||||
"fixture": "rt6_restart.air.ll",
|
||||
"entry": "rt6_restart_vertex+rt6_restart_count",
|
||||
"source_sha256": "08138096f5f8bef1f56267558b5bbbf1c9780e08bae5d84b87f3da4025ab6d09"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M under macOS 26.7.1 (job 82284): the family's pass at 8 samples, plain and under Metal's API validation layer, one run each",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 1,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 1,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "ee3fb102a9172fb5214a2c468b5fb177a7000fb169043ed578a12dd5b43c0464"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "08138096f5f8bef1f56267558b5bbbf1c9780e08bae5d84b87f3da4025ab6d09"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "render-pipeline",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "03f5943fa208ea15062a63d582f15aae90bb31a792f25b55a2e32f5d92791dfc"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "46be23a3b9ab948bd0549700811244dda8e20f669e98aec2361cbff5c3cae246"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolve",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "84d9f4366da2d180bd2c9a0c0c0ec5a5f91d7e745b28088b7971335c2aa913fb"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pass",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "93c0b0f95c6553ffab21916ad615f43281c739a17cb231feff569c06f875698f"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vertices",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "f2df32a2160f721d5a70c07c8cbc9134e1e986712ebd31c961c3bac754d632d2"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "library",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "render-pipeline",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolve",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vertices",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read-back",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "calls",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "0-renderCommandEncoder",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "1-copyFromTextureToBuffer",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "coverage",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"8 of 8 samples"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolved",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AQAA/w=="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"buffer": {
|
||||
"offset": 0,
|
||||
"length": 4
|
||||
}
|
||||
},
|
||||
"element": "u8",
|
||||
"row_offset": 0,
|
||||
"row_elements": 4,
|
||||
"row_pitch": 4,
|
||||
"rows": 1,
|
||||
"image_pitch": 4,
|
||||
"images": 1,
|
||||
"gaps": "ignored"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 7.63",
|
||||
"instrument": 288,
|
||||
"times": {
|
||||
"case": "sample-positions-8x-custom-left",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle renders no 8 samples (an Apple M3 Max answers supportsTextureSampleCount: no for 8), so a record run there must not encode an 8-sample texture",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "sample-positions-8x-custom-mixed",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "rt6_restart.ll",
|
||||
"entry": "rt6_restart_vertex+rt6_restart_count",
|
||||
"source_sha256": "ee3fb102a9172fb5214a2c468b5fb177a7000fb169043ed578a12dd5b43c0464"
|
||||
},
|
||||
{
|
||||
"fixture": "rt6_restart.air.ll",
|
||||
"entry": "rt6_restart_vertex+rt6_restart_count",
|
||||
"source_sha256": "08138096f5f8bef1f56267558b5bbbf1c9780e08bae5d84b87f3da4025ab6d09"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M under macOS 26.7.1 (job 82284): the family's pass at 8 samples, plain and under Metal's API validation layer, one run each",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 1,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 1,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "ee3fb102a9172fb5214a2c468b5fb177a7000fb169043ed578a12dd5b43c0464"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "08138096f5f8bef1f56267558b5bbbf1c9780e08bae5d84b87f3da4025ab6d09"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "render-pipeline",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "03f5943fa208ea15062a63d582f15aae90bb31a792f25b55a2e32f5d92791dfc"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "46be23a3b9ab948bd0549700811244dda8e20f669e98aec2361cbff5c3cae246"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolve",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "84d9f4366da2d180bd2c9a0c0c0ec5a5f91d7e745b28088b7971335c2aa913fb"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pass",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "d87c873f5ca0e3476ac05aaa450b32d24bb1d91d199500d0fb52aa62b7ffdcc1"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vertices",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "f2df32a2160f721d5a70c07c8cbc9134e1e986712ebd31c961c3bac754d632d2"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "library",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "render-pipeline",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolve",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vertices",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read-back",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "calls",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "0-renderCommandEncoder",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "1-copyFromTextureToBuffer",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "coverage",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"1 of 8 samples"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolved",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AAAAIA=="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"buffer": {
|
||||
"offset": 0,
|
||||
"length": 4
|
||||
}
|
||||
},
|
||||
"element": "u8",
|
||||
"row_offset": 0,
|
||||
"row_elements": 4,
|
||||
"row_pitch": 4,
|
||||
"rows": 1,
|
||||
"image_pitch": 4,
|
||||
"images": 1,
|
||||
"gaps": "ignored"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 7.63",
|
||||
"instrument": 288,
|
||||
"times": {
|
||||
"case": "sample-positions-8x-custom-mixed",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle renders no 8 samples (an Apple M3 Max answers supportsTextureSampleCount: no for 8), so a record run there must not encode an 8-sample texture",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "sample-positions-8x-default",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "rt6_restart.ll",
|
||||
"entry": "rt6_restart_vertex+rt6_restart_count",
|
||||
"source_sha256": "ee3fb102a9172fb5214a2c468b5fb177a7000fb169043ed578a12dd5b43c0464"
|
||||
},
|
||||
{
|
||||
"fixture": "rt6_restart.air.ll",
|
||||
"entry": "rt6_restart_vertex+rt6_restart_count",
|
||||
"source_sha256": "08138096f5f8bef1f56267558b5bbbf1c9780e08bae5d84b87f3da4025ab6d09"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": {
|
||||
"carried": {
|
||||
"from": "an AMD Radeon Pro 5300M under macOS 26.7.1 (job 82284): the family's pass at 8 samples, plain and under Metal's API validation layer, one run each",
|
||||
"measured_on": "amd-radeon-pro-5300m"
|
||||
}
|
||||
},
|
||||
"device": "apple-m3-max",
|
||||
"runs": 1,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 1,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "ee3fb102a9172fb5214a2c468b5fb177a7000fb169043ed578a12dd5b43c0464"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "08138096f5f8bef1f56267558b5bbbf1c9780e08bae5d84b87f3da4025ab6d09"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "render-pipeline",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "03f5943fa208ea15062a63d582f15aae90bb31a792f25b55a2e32f5d92791dfc"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "46be23a3b9ab948bd0549700811244dda8e20f669e98aec2361cbff5c3cae246"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolve",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "84d9f4366da2d180bd2c9a0c0c0ec5a5f91d7e745b28088b7971335c2aa913fb"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pass",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "332dff968c8d5130d43c6b0e1a050413da9aefb004b8c46bd9344136283bb30d"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vertices",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "1a2ae8d6b0ceafa23db4dce5d5c4df98fa10a8ab3c8e382a230e022c63501385"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "library",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "render-pipeline",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "target",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolve",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vertices",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read-back",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "calls",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "0-renderCommandEncoder",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "1-copyFromTextureToBuffer",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "coverage",
|
||||
"observed": {
|
||||
"value": {
|
||||
"lines": [
|
||||
"5 of 8 samples"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resolved",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AQAAnw=="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"buffer": {
|
||||
"offset": 0,
|
||||
"length": 4
|
||||
}
|
||||
},
|
||||
"element": "u8",
|
||||
"row_offset": 0,
|
||||
"row_elements": 4,
|
||||
"row_pitch": 4,
|
||||
"rows": 1,
|
||||
"image_pitch": 4,
|
||||
"images": 1,
|
||||
"gaps": "ignored"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "not_run"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 7.63",
|
||||
"instrument": 288,
|
||||
"times": {
|
||||
"case": "sample-positions-8x-default",
|
||||
"calls": 0,
|
||||
"in_calls": 0,
|
||||
"on_cpu": 0,
|
||||
"blocked": 0,
|
||||
"elsewhere": 0,
|
||||
"spend": 0,
|
||||
"spend_least": 0,
|
||||
"spend_most": 0,
|
||||
"stopped": "the case forbids running its Metal leg here: the oracle renders no 8 samples (an Apple M3 Max answers supportsTextureSampleCount: no for 8), so a record run there must not encode an 8-sample texture",
|
||||
"per_call": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,760 @@
|
||||
{
|
||||
"format": 1,
|
||||
"case": "srgb-storage-fragment-writes",
|
||||
"suite_version": 1,
|
||||
"shaders": [
|
||||
{
|
||||
"fixture": "fpv_srgb_draw_storage.ll",
|
||||
"entry": "fpv_srgb_cover+fpv_srgb_fragment_write",
|
||||
"source_sha256": "35dd732c5dc27582830992b27dfeed05647e9bd9c9977b23f103df3122ae225e"
|
||||
},
|
||||
{
|
||||
"fixture": "fpv_srgb_draw_storage.air.ll",
|
||||
"entry": "fpv_srgb_cover+fpv_srgb_fragment_write",
|
||||
"source_sha256": "b4b2a37ad65ae7d5ac0619d7fd5786601468a85a3047bcde7e854f8412f6ab7b"
|
||||
},
|
||||
{
|
||||
"fixture": "fpv_srgb_draw_storage.ll",
|
||||
"entry": "fpv_srgb_cover+fpv_srgb_fragment_write_half",
|
||||
"source_sha256": "35dd732c5dc27582830992b27dfeed05647e9bd9c9977b23f103df3122ae225e"
|
||||
},
|
||||
{
|
||||
"fixture": "fpv_srgb_draw_storage.air.ll",
|
||||
"entry": "fpv_srgb_cover+fpv_srgb_fragment_write_half",
|
||||
"source_sha256": "b4b2a37ad65ae7d5ac0619d7fd5786601468a85a3047bcde7e854f8412f6ab7b"
|
||||
}
|
||||
],
|
||||
"answers": [
|
||||
{
|
||||
"key": {
|
||||
"chip": "apple-m3-max",
|
||||
"os_version": "27.0.1",
|
||||
"os_build": "26A434",
|
||||
"metal_level": "27.0.1"
|
||||
},
|
||||
"provenance": "metal_run",
|
||||
"device": "Apple M3 Max",
|
||||
"runs": 3,
|
||||
"outcomes": [
|
||||
{
|
||||
"runs": 3,
|
||||
"transcript": {
|
||||
"root": {
|
||||
"name": "case",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "inputs",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "air",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "35dd732c5dc27582830992b27dfeed05647e9bd9c9977b23f103df3122ae225e"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "air-typed",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "b4b2a37ad65ae7d5ac0619d7fd5786601468a85a3047bcde7e854f8412f6ab7b"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer:1",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "bf5e8ffa51a9e748985800c1d3d7f1a2a6ae7435136593ca8d9637e3f87c699c"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "attachment",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "467d04c4e816c2c655992d28052cef204b216322e750da6f61201b8e84d48de4"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write/pipeline",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "aab2a1df4bf3fe9258270f83d86ecdec0b44cf044aefa24905a0cd235ffb24e4"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write/buffer:0",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "d04922fa8a9a89e9e7154b13f86ee53b8577a55039d63b1841a9dc09fcbac3a8"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write_half/pipeline",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "35846d793c51f78a7c1040ea71fceee7c1e410a48e6271c8103236711ea9041c"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write_half/buffer:0",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "d08866127ea15fb18bb754e0c61bc3c2e4392333b9cd28f4544b6e77aee06506"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "f62e7fbd0b56f442221d9b2f93366fbe85bbc0c083bc9fff4589f79e1dde7803"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB",
|
||||
"observed": {
|
||||
"value": "absent",
|
||||
"digest": {
|
||||
"kind": "sha256",
|
||||
"hex": "751eae77ae9d671d3c66bec6eb1b0e6359b8be839b8a93e5702d71e528297757"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "library",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "buffer/width",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write/pipeline",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write/buffer/0",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write/texture",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write/attachment",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write/draw",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write/pass",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write/texels",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write/stored",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AP8AAAH+JQEC/UoCA/xvAwT7lAQF+rkFBvneBgf4AwcI9ygICfZNCQr1cgoL9JcLDPO8DA3y4Q0O8QYOD/ArDxDvUBAR7nUREu2aEhPsvxMU6+QUFeoJFRbpLhYX6FMXGOd4GBnmnRka5cIaG+TnGxzjDBwd4jEdHuFWHh/gex8g36AgId7FISLd6iIj3A8jJNs0JCXaWSUm2X4mJ9ijJyjXyCgp1u0pKtUSKivUNyss01wsLdKBLS7Rpi4v0MsvMM/wMDHOFTEyzToyM8xfMzTLhDQ1yqk1NsnONjfI8zc4xxg4OcY9OTrFYjo7xIc7PMOsPD3C0T0+wfY+P8AbP0C/QEBBvmVBQr2KQkO8r0NEu9RERbr5RUa5HkZHuENHSLdoSEm2jUlKtbJKS7TXS0yz/ExNsiFNTrFGTk+wa09Qr5BQUa61UVKt2lJTrP9TVKskVFWqSVVWqW5WV6iTV1inuFhZpt1ZWqUCWlukJ1tco0xcXaJxXV6hll5foLtfYJ/gYGGeBWFinSpiY5xPY2SbdGRlmpllZpm+ZmeY42dolwhoaZYtaWqVUmprlHdrbJOcbG2SwW1ukeZub5ALb3CPMHBxjlVxco16cnOMn3N0i8R0dYrpdXaJDnZ3iDN3eIdYeHmGfXl6haJ6e4THe3yD7Hx9ghF9foE2fn+AW3+Af4CAgX6lgYJ9yoKDfO+DhHsUhIV6OYWGeV6Gh3iDh4h3qIiJds2JinXyiot0F4uMczyMjXJhjY5xho6PcKuPkG/QkJFu9ZGSbRqSk2w/k5RrZJSVaomVlmmulpdo05eYZ/iYmWYdmZplQpqbZGebnGOMnJ1isZ2eYdaen2D7n6BfIKChXkWhol1qoqNcj6OkW7SkpVrZpaZZ/qanWCOnqFdIqKlWbamqVZKqq1S3q6xT3KytUgGtrlEmrq9QS6+wT3CwsU6VsbJNurKzTN+ztEsEtLVKKbW2SU62t0hzt7hHmLi5Rr25ukXiurtEB7u8Qyy8vUJRvb5Bdr6/QJu/wD/AwME+5cHCPQrCwzwvw8Q7VMTFOnnFxjmexsc4w8fIN+jIyTYNyco1MsrLNFfLzDN8zM0yoc3OMcbOzzDrz9AvENDRLjXR0i1a0tMsf9PUK6TU1SrJ1dYp7tbXKBPX2Cc42NkmXdnaJYLa2ySn29wjzNzdIvHd3iEW3t8gO9/gH2Dg4R6F4eIdquLjHM/j5Bv05OUaGeXmGT7m5xhj5+gXiOjpFq3p6hXS6usU9+vsExzs7RJB7e4RZu7vEIvv8A+w8PEO1fHyDfry8wwf8/QLRPT1Cmn19gmO9vcIs/f4B9j4+Qb9+foFIvr7BEf7/ANs/P0Ckf3+Abb+/wDb/wD/AP8A//8AAP///wAA/wD7lFH7+vlQ+vleU/n4w1L49yhd9/aNXPb18l/19Fde9PO8WfPyIVjy8YZb8fDrWvDvUEXv7rVE7u0aR+3sf0bs6+RB6+pJQOrprkPp6BNC6Od4Tefm3Uzm5UJP5eSnTuTjDEnj4nFI4uHWS+HgO0rg36B1394FdN7danfd3M923Ns0cdvamXDa2f5z2dhjctjXyH3X1i181tWSf9XU937U01x509LBeNLRJnvR0It60M/wZc/OVWTOzbpnzcwfZszLhGHLyulgyslOY8nIs2LIxxhtx8Z9bMbF4m/FxEduxMOsacPCEWjCwXZrwcDbasC/QBW/vqUUvr0KF728bxa8u9QRu7o5ELq5nhO5uAMSuLdoHbe2zRy2tTIftbSXHrSz/BmzsmEYsrHGG7GwKxqwr5AFr671BK6tWgetrL8GrKskAauqiQCqqe4DqahTAqinuA2nph0MpqWCD6Wk5w6ko0wJo6KxCKKhFguhoHsKoJ/gNZ+eRTSenao3nZwPNpybdDGbmtkwmpk+M5mYozKYlwg9l5ZtPJaV0j+VlDc+lJOcOZOSATiSkWY7kZDLOpCPMCWPjpUkjo36J42MXyaMi8Qhi4opIIqJjiOJiPMiiIdYLYeGvSyGhSIvhYSHLoSD7CmDglEogoG2K4GAGyqAf4DVf37l1H59Std9fK/WfHsU0Xt6edB6ed7TeXhD0nh3qN13dg3cdnVy33V01950czzZc3Kh2HJxBttxcGvacG/QxW9uNcRubZrHbWz/xmxrZMFrasnAamkuw2lok8JoZ/jNZ2ZdzGZlws9lZCfOZGOMyWNi8chiYVbLYWC7ymBfIPVfXoX0Xl3q911cT/ZcW7TxW1oZ8FpZfvNZWOPyWFdI/VdWrfxWVRL/VVR3/lRT3PlTUkH4UlGm+1FQC/pQT3DlT07V5E5NOudNTJ/mTEsE4UtKaeBKSc7jSUgz4khHmO1HRv3sRkVi70VEx+5EQyzpQ0KR6EJB9utBQFvqQD/AlT8+JZQ+PYqXPTzvljw7VJE7OrmQOjkekzk4g5I4N+idNzZNnDY1sp81NBeeNDN8mTMy4ZgyMUabMTCrmjAvEIUvLnWELi3ahy0sP4YsK6SBKyoJgCopboMpKNOCKCc4jScmnYwmJQKPJSRnjiQjzIkjIjGIIiGWiyEg+4ogH2C1Hx7FtB4dKrcdHI+2HBv0sRsaWbAaGb6zGRgjshgXiL0XFu28FhVSvxUUt74UExy5ExKBuBIR5rsREEu6EA+wpQ8OFaQODXqnDQzfpgwLRKELCqmgCgkOowkIc6IIB9itBwY9rAYFoq8FBAeuBANsqQMC0agCATarAQCbqgA="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"texture": {
|
||||
"level": 0,
|
||||
"slice": 0,
|
||||
"aspect": "color",
|
||||
"sample": 0,
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"size": [
|
||||
256,
|
||||
2,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"element": "u8",
|
||||
"row_offset": 0,
|
||||
"row_elements": 1024,
|
||||
"row_pitch": 1024,
|
||||
"rows": 2,
|
||||
"image_pitch": 2048,
|
||||
"images": 1,
|
||||
"gaps": "ignored"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write/texture",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write/attachment",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write/draw",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write/pass",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write/texels",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write/stored",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AP8AACX+AQFK/QICb/wDA5T7BAS5+gUF3vkGBgP4Bwco9wgITfYJCXL1CgqX9AsLvPMMDOHyDQ0G8Q4OK/APD1DvEBB17hERmu0SEr/sExPk6xQUCeoVFS7pFhZT6BcXeOcYGJ3mGRnC5Roa5+QbGwzjHBwx4h0dVuEeHnvgHx+g3yAgxd4hIerdIiIP3CMjNNskJFnaJSV+2SYmo9gnJ8jXKCjt1ikpEtUqKjfUKytc0ywsgdItLabRLi7L0C8v8M8wMBXOMTE6zTIyX8wzM4TLNDSpyjU1zsk2NvPINzcYxzg4PcY5OWLFOjqHxDs7rMM8PNHCPT32wT4+G8A/P0C/QEBlvkFBir1CQq+8Q0PUu0RE+bpFRR65RkZDuEdHaLdISI22SUmytUpK17RLS/yzTEwhsk1NRrFOTmuwT0+Qr1BQta5RUdqtUlL/rFNTJKtUVEmqVVVuqVZWk6hXV7inWFjdpllZAqVaWiekW1tMo1xccaJdXZahXl67oF9f4J9gYAWeYWEqnWJiT5xjY3SbZGSZmmVlvplmZuOYZ2cIl2hoLZZpaVKVamp3lGtrnJNsbMGSbW3mkW5uC5BvbzCPcHBVjnFxeo1ycp+Mc3PEi3R06Yp1dQ6JdnYziHd3WId4eH2GeXmihXp6x4R7e+yDfHwRgn19NoF+fluAf3+Af4CApX6Bgcp9goLvfIODFHuEhDl6hYVeeYaGg3iHh6h3iIjNdomJ8nWKihd0i4s8c4yMYXKNjYZxjo6rcI+P0G+QkPVukZEabZKSP2yTk2RrlJSJapWVrmmWltNol5f4Z5iYHWaZmUJlmppnZJubjGOcnLFinZ3WYZ6e+2CfnyBfoKBFXqGhal2ioo9co6O0W6Sk2Vqlpf5ZpqYjWKenSFeoqG1WqamSVaqqt1Srq9xTrKwBUq2tJlGurktQr69wT7CwlU6xsbpNsrLfTLOzBEu0tClKtbVOSba2c0i3t5hHuLi9Rrm54kW6ugdEu7ssQ7y8UUK9vXZBvr6bQL+/wD/AwOU+wcEKPcLCLzzDw1Q7xMR5OsXFnjnGxsM4x8foN8jIDTbJyTI1yspXNMvLfDPMzKEyzc3GMc7O6zDPzxAv0NA1LtHRWi3S0n8s09OkK9TUySrV1e4p1tYTKNfXOCfY2F0m2dmCJdrapyTb28wj3NzxIt3dFiHe3jsg399gH+DghR7h4aod4uLPHOPj9Bvk5Bka5eU+GebmYxjn54gX6OitFunp0hXq6vcU6+scE+zsQRLt7WYR7u6LEO/vsA/w8NUO8fH6DfLyHwzz80QL9PRpCvX1jgn29rMI9/fYB/j4/Qb5+SIF+vpHBPv7bAP8/JEC/f22Af7+2wD//wD/AP///wAA//8A//8AAABRlPv7UPn6+lNe+flSw/j4XSj391yN9vZf8vX1Xlf09Fm88/NYIfLyW4bx8Vrr8PBFUO/vRLXu7kca7e1Gf+zsQeTr60BJ6upDrunpQhPo6E145+dM3ebmT0Ll5U6n5ORJDOPjSHHi4kvW4eFKO+DgdaDf33QF3t53at3dds/c3HE029twmdrac/7Z2XJj2Nh9yNfXfC3W1n+S1dV+99TUeVzT03jB0tJ7JtHReovQ0GXwz89kVc7OZ7rNzWYfzMxhhMvLYOnKymNOyclis8jIbRjHx2x9xsZv4sXFbkfExGmsw8NoEcLCa3bBwWrbwMAVQL+/FKW+vhcKvb0Wb7y8EdS7uxA5uroTnrm5EgO4uB1ot7cczba2HzK1tR6XtLQZ/LOzGGGyshvGsbEaK7CwBZCvrwT1rq4HWq2tBr+srAEkq6sAiaqqA+6pqQJTqKgNuKenDB2mpg+CpaUO56SkCUyjowixoqILFqGhCnugoDXgn580RZ6eN6qdnTYPnJwxdJubMNmamjM+mZkyo5iYPQiXlzxtlpY/0pWVPjeUlDmck5M4AZKSO2aRkTrLkJAlMI+PJJWOjif6jY0mX4yMIcSLiyApioojjomJIvOIiC1Yh4csvYaGLyKFhS6HhIQp7IODKFGCgiu2gYEqG4CA1YB/f9Tlfn7XSn191q98fNEUe3vQeXp60955edJDeHjdqHd33A12dt9ydXXe13R02Txzc9ihcnLbBnFx2mtwcMXQb2/ENW5ux5ptbcb/bGzBZGtrwMlqasMuaWnCk2hozfhnZ8xdZmbPwmVlzidkZMmMY2PI8WJiy1ZhYcq7YGD1IF9f9IVeXvfqXV32T1xc8bRbW/AZWlrzfllZ8uNYWP1IV1f8rVZW/xJVVf53VFT53FNT+EFSUvumUVH6C1BQ5XBPT+TVTk7nOk1N5p9MTOEES0vgaUpK485JSeIzSEjtmEdH7P1GRu9iRUXux0RE6SxDQ+iRQkLr9kFB6ltAQJXAPz+UJT4+l4o9PZbvPDyRVDs7kLk6OpMeOTmSgzg4neg3N5xNNjafsjU1nhc0NJl8MzOY4TIym0YxMZqrMDCFEC8vhHUuLofaLS2GPywsgaQrK4AJKiqDbikpgtMoKI04JyeMnSYmjwIlJY5nJCSJzCMjiDEiIouWISGK+yAgtWAfH7TFHh63Kh0dto8cHLH0GxuwWRoas74ZGbIjGBi9iBcXvO0WFr9SFRW+txQUuRwTE7iBEhK75hERuksQEKWwDw+kFQ4Op3oNDabfDAyhRAsLoKkKCqMOCQmicwgIrdgHB6w9BgavogUFrgcEBKlsAwOo0QICqzYBAaqbAAA="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"texture": {
|
||||
"level": 0,
|
||||
"slice": 0,
|
||||
"aspect": "color",
|
||||
"sample": 0,
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"size": [
|
||||
256,
|
||||
2,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"element": "u8",
|
||||
"row_offset": 0,
|
||||
"row_elements": 1024,
|
||||
"row_pitch": 1024,
|
||||
"rows": 2,
|
||||
"image_pitch": 2048,
|
||||
"images": 1,
|
||||
"gaps": "ignored"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write_half/pipeline",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fpv_srgb_fragment_write_half/buffer/0",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write_half/texture",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write_half/attachment",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write_half/draw",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write_half/pass",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write_half/texels",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatRGBA8Unorm_sRGB/fpv_srgb_fragment_write_half/stored",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AP8AAAH+JQEC/UoCA/xvAwT7lAQF+rkFBvneBgf4AwcI9ygICfZNCQr1cgoL9JcLDPO8DA3y4Q0O8QYOD/ArDxDvUBAR7nUREu2aEhPsvxMU6+QUFeoJFRbpLhYX6FMXGOd4GBnmnRka5cIaG+TnGxzjDBwd4jEdHuFWHh/gex8g36AgId7FISLd6iIj3A8jJNs0JCXaWSUm2X4mJ9ijJyjXyCgp1u0pKtUSKivUNyss01wsLdKBLS7Rpi4v0MsvMM/wMDHOFTEyzToyM8xfMzTLhDQ1yqk1NsnONjfI8zc4xxg4OcY9OTrFYjo7xIc7PMOsPD3C0T0+wfY+P8AbP0C/QEBBvmVBQr2KQkO8r0NEu9RERbr5RUa5HkZHuENHSLdoSEm2jUlKtbJKS7TXS0yz/ExNsiFNTrFGTk+wa09Qr5BQUa61UVKt2lJTrP9TVKskVFWqSVVWqW5WV6iTV1inuFhZpt1ZWqUCWlukJ1tco0xcXaJxXV6hll5foLtfYJ/gYGGeBWFinSpiY5xPY2SbdGRlmpllZpm+ZmeY42dolwhoaZYtaWqVUmprlHdrbJOcbG2SwW1ukeZub5ALb3CPMHBxjlVxco16cnOMn3N0i8R0dYrpdXaJDnZ3iDN3eIdYeHmGfXl6haJ6e4THe3yD7Hx9ghF9foE2fn+AW3+Af4CAgX6lgYJ9yoKDfO+DhHsUhIV6OYWGeV6Gh3iDh4h3qIiJds2JinXyiot0F4uMczyMjXJhjY5xho6PcKuPkG/QkJFu9ZGSbRqSk2w/k5RrZJSVaomVlmmulpdo05eYZ/iYmWYdmZplQpqbZGebnGOMnJ1isZ2eYdaen2D7n6BfIKChXkWhol1qoqNcj6OkW7SkpVrZpaZZ/qanWCOnqFdIqKlWbamqVZKqq1S3q6xT3KytUgGtrlEmrq9QS6+wT3CwsU6VsbJNurKzTN+ztEsEtLVKKbW2SU62t0hzt7hHmLi5Rr25ukXiurtEB7u8Qyy8vUJRvb5Bdr6/QJu/wD/AwME+5cHCPQrCwzwvw8Q7VMTFOnnFxjmexsc4w8fIN+jIyTYNyco1MsrLNFfLzDN8zM0yoc3OMcbOzzDrz9AvENDRLjXR0i1a0tMsf9PUK6TU1SrJ1dYp7tbXKBPX2Cc42NkmXdnaJYLa2ySn29wjzNzdIvHd3iEW3t8gO9/gH2Dg4R6F4eIdquLjHM/j5Bv05OUaGeXmGT7m5xhj5+gXiOjpFq3p6hXS6usU9+vsExzs7RJB7e4RZu7vEIvv8A+w8PEO1fHyDfry8wwf8/QLRPT1Cmn19gmO9vcIs/f4B9j4+Qb9+foFIvr7BEf7/ANs/P0Ckf3+Abb+/wDb/wD/AP8A//8AAP///wAA/wD7lFH7+vlQ+vleU/n4w1L49yhd9/aNXPb18l/19Fde9PO8WfPyIVjy8YZb8fDrWvDvUEXv7rVE7u0aR+3sf0bs6+RB6+pJQOrprkPp6BNC6Od4Tefm3Uzm5UJP5eSnTuTjDEnj4nFI4uHWS+HgO0rg36B1394FdN7danfd3M923Ns0cdvamXDa2f5z2dhjctjXyH3X1i181tWSf9XU937U01x509LBeNLRJnvR0It60M/wZc/OVWTOzbpnzcwfZszLhGHLyulgyslOY8nIs2LIxxhtx8Z9bMbF4m/FxEduxMOsacPCEWjCwXZrwcDbasC/QBW/vqUUvr0KF728bxa8u9QRu7o5ELq5nhO5uAMSuLdoHbe2zRy2tTIftbSXHrSz/BmzsmEYsrHGG7GwKxqwr5AFr671BK6tWgetrL8GrKskAauqiQCqqe4DqahTAqinuA2nph0MpqWCD6Wk5w6ko0wJo6KxCKKhFguhoHsKoJ/gNZ+eRTSenao3nZwPNpybdDGbmtkwmpk+M5mYozKYlwg9l5ZtPJaV0j+VlDc+lJOcOZOSATiSkWY7kZDLOpCPMCWPjpUkjo36J42MXyaMi8Qhi4opIIqJjiOJiPMiiIdYLYeGvSyGhSIvhYSHLoSD7CmDglEogoG2K4GAGyqAf4DVf37l1H59Std9fK/WfHsU0Xt6edB6ed7TeXhD0nh3qN13dg3cdnVy33V01950czzZc3Kh2HJxBttxcGvacG/QxW9uNcRubZrHbWz/xmxrZMFrasnAamkuw2lok8JoZ/jNZ2ZdzGZlws9lZCfOZGOMyWNi8chiYVbLYWC7ymBfIPVfXoX0Xl3q911cT/ZcW7TxW1oZ8FpZfvNZWOPyWFdI/VdWrfxWVRL/VVR3/lRT3PlTUkH4UlGm+1FQC/pQT3DlT07V5E5NOudNTJ/mTEsE4UtKaeBKSc7jSUgz4khHmO1HRv3sRkVi70VEx+5EQyzpQ0KR6EJB9utBQFvqQD/AlT8+JZQ+PYqXPTzvljw7VJE7OrmQOjkekzk4g5I4N+idNzZNnDY1sp81NBeeNDN8mTMy4ZgyMUabMTCrmjAvEIUvLnWELi3ahy0sP4YsK6SBKyoJgCopboMpKNOCKCc4jScmnYwmJQKPJSRnjiQjzIkjIjGIIiGWiyEg+4ogH2C1Hx7FtB4dKrcdHI+2HBv0sRsaWbAaGb6zGRgjshgXiL0XFu28FhVSvxUUt74UExy5ExKBuBIR5rsREEu6EA+wpQ8OFaQODXqnDQzfpgwLRKELCqmgCgkOowkIc6IIB9itBwY9rAYFoq8FBAeuBANsqQMC0agCATarAQCbqgA="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"texture": {
|
||||
"level": 0,
|
||||
"slice": 0,
|
||||
"aspect": "color",
|
||||
"sample": 0,
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"size": [
|
||||
256,
|
||||
2,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"element": "u8",
|
||||
"row_offset": 0,
|
||||
"row_elements": 1024,
|
||||
"row_pitch": 1024,
|
||||
"rows": 2,
|
||||
"image_pitch": 2048,
|
||||
"images": 1,
|
||||
"gaps": "ignored"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write_half/texture",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write_half/attachment",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write_half/draw",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": {
|
||||
"variant": {
|
||||
"name": "Completed",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write_half/pass",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write_half/texels",
|
||||
"observed": {
|
||||
"value": {
|
||||
"variant": {
|
||||
"name": "Ok",
|
||||
"payload": "absent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MTLPixelFormatBGRA8Unorm_sRGB/fpv_srgb_fragment_write_half/stored",
|
||||
"observed": {
|
||||
"value": {
|
||||
"bytes": "AP8AACX+AQFK/QICb/wDA5T7BAS5+gUF3vkGBgP4Bwco9wgITfYJCXL1CgqX9AsLvPMMDOHyDQ0G8Q4OK/APD1DvEBB17hERmu0SEr/sExPk6xQUCeoVFS7pFhZT6BcXeOcYGJ3mGRnC5Roa5+QbGwzjHBwx4h0dVuEeHnvgHx+g3yAgxd4hIerdIiIP3CMjNNskJFnaJSV+2SYmo9gnJ8jXKCjt1ikpEtUqKjfUKytc0ywsgdItLabRLi7L0C8v8M8wMBXOMTE6zTIyX8wzM4TLNDSpyjU1zsk2NvPINzcYxzg4PcY5OWLFOjqHxDs7rMM8PNHCPT32wT4+G8A/P0C/QEBlvkFBir1CQq+8Q0PUu0RE+bpFRR65RkZDuEdHaLdISI22SUmytUpK17RLS/yzTEwhsk1NRrFOTmuwT0+Qr1BQta5RUdqtUlL/rFNTJKtUVEmqVVVuqVZWk6hXV7inWFjdpllZAqVaWiekW1tMo1xccaJdXZahXl67oF9f4J9gYAWeYWEqnWJiT5xjY3SbZGSZmmVlvplmZuOYZ2cIl2hoLZZpaVKVamp3lGtrnJNsbMGSbW3mkW5uC5BvbzCPcHBVjnFxeo1ycp+Mc3PEi3R06Yp1dQ6JdnYziHd3WId4eH2GeXmihXp6x4R7e+yDfHwRgn19NoF+fluAf3+Af4CApX6Bgcp9goLvfIODFHuEhDl6hYVeeYaGg3iHh6h3iIjNdomJ8nWKihd0i4s8c4yMYXKNjYZxjo6rcI+P0G+QkPVukZEabZKSP2yTk2RrlJSJapWVrmmWltNol5f4Z5iYHWaZmUJlmppnZJubjGOcnLFinZ3WYZ6e+2CfnyBfoKBFXqGhal2ioo9co6O0W6Sk2Vqlpf5ZpqYjWKenSFeoqG1WqamSVaqqt1Srq9xTrKwBUq2tJlGurktQr69wT7CwlU6xsbpNsrLfTLOzBEu0tClKtbVOSba2c0i3t5hHuLi9Rrm54kW6ugdEu7ssQ7y8UUK9vXZBvr6bQL+/wD/AwOU+wcEKPcLCLzzDw1Q7xMR5OsXFnjnGxsM4x8foN8jIDTbJyTI1yspXNMvLfDPMzKEyzc3GMc7O6zDPzxAv0NA1LtHRWi3S0n8s09OkK9TUySrV1e4p1tYTKNfXOCfY2F0m2dmCJdrapyTb28wj3NzxIt3dFiHe3jsg399gH+DghR7h4aod4uLPHOPj9Bvk5Bka5eU+GebmYxjn54gX6OitFunp0hXq6vcU6+scE+zsQRLt7WYR7u6LEO/vsA/w8NUO8fH6DfLyHwzz80QL9PRpCvX1jgn29rMI9/fYB/j4/Qb5+SIF+vpHBPv7bAP8/JEC/f22Af7+2wD//wD/AP///wAA//8A//8AAABRlPv7UPn6+lNe+flSw/j4XSj391yN9vZf8vX1Xlf09Fm88/NYIfLyW4bx8Vrr8PBFUO/vRLXu7kca7e1Gf+zsQeTr60BJ6upDrunpQhPo6E145+dM3ebmT0Ll5U6n5ORJDOPjSHHi4kvW4eFKO+DgdaDf33QF3t53at3dds/c3HE029twmdrac/7Z2XJj2Nh9yNfXfC3W1n+S1dV+99TUeVzT03jB0tJ7JtHReovQ0GXwz89kVc7OZ7rNzWYfzMxhhMvLYOnKymNOyclis8jIbRjHx2x9xsZv4sXFbkfExGmsw8NoEcLCa3bBwWrbwMAVQL+/FKW+vhcKvb0Wb7y8EdS7uxA5uroTnrm5EgO4uB1ot7cczba2HzK1tR6XtLQZ/LOzGGGyshvGsbEaK7CwBZCvrwT1rq4HWq2tBr+srAEkq6sAiaqqA+6pqQJTqKgNuKenDB2mpg+CpaUO56SkCUyjowixoqILFqGhCnugoDXgn580RZ6eN6qdnTYPnJwxdJubMNmamjM+mZkyo5iYPQiXlzxtlpY/0pWVPjeUlDmck5M4AZKSO2aRkTrLkJAlMI+PJJWOjif6jY0mX4yMIcSLiyApioojjomJIvOIiC1Yh4csvYaGLyKFhS6HhIQp7IODKFGCgiu2gYEqG4CA1YB/f9Tlfn7XSn191q98fNEUe3vQeXp60955edJDeHjdqHd33A12dt9ydXXe13R02Txzc9ihcnLbBnFx2mtwcMXQb2/ENW5ux5ptbcb/bGzBZGtrwMlqasMuaWnCk2hozfhnZ8xdZmbPwmVlzidkZMmMY2PI8WJiy1ZhYcq7YGD1IF9f9IVeXvfqXV32T1xc8bRbW/AZWlrzfllZ8uNYWP1IV1f8rVZW/xJVVf53VFT53FNT+EFSUvumUVH6C1BQ5XBPT+TVTk7nOk1N5p9MTOEES0vgaUpK485JSeIzSEjtmEdH7P1GRu9iRUXux0RE6SxDQ+iRQkLr9kFB6ltAQJXAPz+UJT4+l4o9PZbvPDyRVDs7kLk6OpMeOTmSgzg4neg3N5xNNjafsjU1nhc0NJl8MzOY4TIym0YxMZqrMDCFEC8vhHUuLofaLS2GPywsgaQrK4AJKiqDbikpgtMoKI04JyeMnSYmjwIlJY5nJCSJzCMjiDEiIouWISGK+yAgtWAfH7TFHh63Kh0dto8cHLH0GxuwWRoas74ZGbIjGBi9iBcXvO0WFr9SFRW+txQUuRwTE7iBEhK75hERuksQEKWwDw+kFQ4Op3oNDabfDAyhRAsLoKkKCqMOCQmicwgIrdgHB6w9BgavogUFrgcEBKlsAwOo0QICqzYBAaqbAAA="
|
||||
},
|
||||
"shape": {
|
||||
"bytes": {
|
||||
"region": {
|
||||
"texture": {
|
||||
"level": 0,
|
||||
"slice": 0,
|
||||
"aspect": "color",
|
||||
"sample": 0,
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"size": [
|
||||
256,
|
||||
2,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"element": "u8",
|
||||
"row_offset": 0,
|
||||
"row_elements": 1024,
|
||||
"row_pitch": 1024,
|
||||
"rows": 2,
|
||||
"image_pitch": 2048,
|
||||
"images": 1,
|
||||
"gaps": "ignored"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "notices",
|
||||
"observed": {
|
||||
"value": "absent"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "set",
|
||||
"observed": {
|
||||
"value": {
|
||||
"nothing": "announced_nothing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "counts",
|
||||
"observed": {
|
||||
"value": {
|
||||
"fields": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"validated": "ran"
|
||||
}
|
||||
],
|
||||
"times": [
|
||||
{
|
||||
"venue": "native Metal",
|
||||
"chip": "apple-m3-max",
|
||||
"os_build": "26A434",
|
||||
"rounds": 8,
|
||||
"measured": "8 round(s) of the whole selection, in the case set's own order; a figure is the median of the rounds' own medians; Metal's leg ran at a one-minute load average of 10.89",
|
||||
"instrument": 403,
|
||||
"times": {
|
||||
"case": "srgb-storage-fragment-writes",
|
||||
"calls": 22,
|
||||
"in_calls": 35642498,
|
||||
"on_cpu": 1511293,
|
||||
"blocked": 33999251,
|
||||
"elsewhere": 5715708,
|
||||
"spend": 41352665,
|
||||
"spend_least": 40894126,
|
||||
"spend_most": 42391958,
|
||||
"per_call": [
|
||||
{
|
||||
"call": "buffer",
|
||||
"least_calls": 3,
|
||||
"most_calls": 3,
|
||||
"wall": 8542,
|
||||
"on_cpu": 8708,
|
||||
"blocked": 0,
|
||||
"wall_least": 6417,
|
||||
"wall_most": 20000,
|
||||
"wall_total": 42750,
|
||||
"on_cpu_total": 43251,
|
||||
"blocked_total": 0
|
||||
},
|
||||
{
|
||||
"call": "library",
|
||||
"least_calls": 1,
|
||||
"most_calls": 1,
|
||||
"wall": 27575542,
|
||||
"on_cpu": 701708,
|
||||
"blocked": 26745333,
|
||||
"wall_least": 26782125,
|
||||
"wall_most": 27968500,
|
||||
"wall_total": 27575542,
|
||||
"on_cpu_total": 701708,
|
||||
"blocked_total": 26745333
|
||||
},
|
||||
{
|
||||
"call": "read_texture",
|
||||
"least_calls": 4,
|
||||
"most_calls": 4,
|
||||
"wall": 1333,
|
||||
"on_cpu": 1458,
|
||||
"blocked": 0,
|
||||
"wall_least": 1083,
|
||||
"wall_most": 1584,
|
||||
"wall_total": 7459,
|
||||
"on_cpu_total": 8084,
|
||||
"blocked_total": 0
|
||||
},
|
||||
{
|
||||
"call": "render",
|
||||
"least_calls": 4,
|
||||
"most_calls": 4,
|
||||
"wall": 383792,
|
||||
"on_cpu": 27542,
|
||||
"blocked": 344167,
|
||||
"wall_least": 345500,
|
||||
"wall_most": 677500,
|
||||
"wall_total": 7677876,
|
||||
"on_cpu_total": 332917,
|
||||
"blocked_total": 7175833
|
||||
},
|
||||
{
|
||||
"call": "render_pipeline",
|
||||
"least_calls": 2,
|
||||
"most_calls": 2,
|
||||
"wall": 123583,
|
||||
"on_cpu": 123875,
|
||||
"blocked": 0,
|
||||
"wall_least": 112750,
|
||||
"wall_most": 172458,
|
||||
"wall_total": 294958,
|
||||
"on_cpu_total": 295458,
|
||||
"blocked_total": 0
|
||||
},
|
||||
{
|
||||
"call": "target",
|
||||
"least_calls": 4,
|
||||
"most_calls": 4,
|
||||
"wall": 5708,
|
||||
"on_cpu": 5834,
|
||||
"blocked": 0,
|
||||
"wall_least": 4917,
|
||||
"wall_most": 7250,
|
||||
"wall_total": 25749,
|
||||
"on_cpu_total": 26292,
|
||||
"blocked_total": 0
|
||||
},
|
||||
{
|
||||
"call": "texture",
|
||||
"least_calls": 4,
|
||||
"most_calls": 4,
|
||||
"wall": 14042,
|
||||
"on_cpu": 14208,
|
||||
"blocked": 0,
|
||||
"wall_least": 6625,
|
||||
"wall_most": 16250,
|
||||
"wall_total": 73918,
|
||||
"on_cpu_total": 74750,
|
||||
"blocked_total": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -20,8 +20,8 @@ use crate::transcript::{Node, NodeName, Observed, Sites, Transcript, Value};
|
||||
use crate::verdict::device_gap_of;
|
||||
use metal2vulkan::metal::state::DepthStencilDescriptor;
|
||||
use metal2vulkan::metal::{
|
||||
AttributeFormat, BindingAccess, CompareFunction, IndexType, PixelFormat, RenderStages,
|
||||
SamplerAddressMode, SamplerBorderColor, SamplerMinMagFilter, SamplerMipFilter,
|
||||
AttributeFormat, BindingAccess, CompareFunction, IndexType, IndirectCommandType, PixelFormat,
|
||||
RenderStages, SamplerAddressMode, SamplerBorderColor, SamplerMinMagFilter, SamplerMipFilter,
|
||||
SamplerReductionMode, StepFunction,
|
||||
};
|
||||
|
||||
@@ -715,10 +715,11 @@ pub struct Venue {
|
||||
pub lossless_compression: bool,
|
||||
/// For a CPU implementation (`DeviceKind::Cpu`), the host's widest vector instruction set
|
||||
/// ([`host_vector_isa`]), which its shader compiler targets; `None` for a GPU. The device's
|
||||
/// name and driver do not carry it, and its answers follow it: one llvmpipe build (Mesa 26.2.6,
|
||||
/// LLVM 23.1.4) stored a code from Metal's at 6,496 texels of `fetch-ordered-rgba8unorm-srgb`'s
|
||||
/// `x3` on a host with AVX-512 (a Ryzen 7 7840HS) and at 6,304 on one with AVX2 alone (an
|
||||
/// i9-13900H).
|
||||
/// name and driver do not carry it. Answers can also part by a finer property of the host than
|
||||
/// this: llvmpipe of Mesa 26.2.4 and LLVM 23.1.1 stored a code from Metal's at 6,304 texels of
|
||||
/// `fetch-ordered-rgba8unorm-srgb`'s `x3` on the x86-64 AVX-512 runner of one CI run and at
|
||||
/// 6,496 on those of two others, so the ledger's row there lists both answers
|
||||
/// ([`crate::known_gaps::KnownGap::answers`]).
|
||||
pub host: Option<String>,
|
||||
}
|
||||
|
||||
@@ -787,6 +788,16 @@ pub trait Side {
|
||||
/// Where the side runs.
|
||||
fn venue(&self) -> Venue;
|
||||
|
||||
/// The macOS release and build the side runs on, as `sw_vers -productVersion` and
|
||||
/// `-buildVersion` answer them on this host (empty where it does not answer): what record mode
|
||||
/// holds against the oracle the suite names before it takes an answer
|
||||
/// ([`crate::record::record`]). Every side runs on its host's; a test's stub states the one it
|
||||
/// stands for.
|
||||
#[cfg(target_os = "macos")]
|
||||
fn macos_release(&self) -> (String, String) {
|
||||
crate::record::sw_vers()
|
||||
}
|
||||
|
||||
/// A library of the shader's AIR, from whichever of its forms the side reads
|
||||
/// ([`ShaderSource`]).
|
||||
fn library(&mut self, source: &ShaderSource<'_>) -> Answer<Handle>;
|
||||
@@ -2155,6 +2166,22 @@ pub trait Side {
|
||||
Err(Failure::unavailable("empty_command_buffers"))
|
||||
}
|
||||
|
||||
/// The sequence of [`crate::managed_naming`] with `way`'s reader, made of `libraries`: a
|
||||
/// Managed buffer's contents synced, named and passed by a commit that does not name the
|
||||
/// buffer, then written again after the reader is encoded, and the reader's command buffer
|
||||
/// committed. Answers the bytes the reader wrote ([`crate::managed_naming::Way::reads`]). A
|
||||
/// side whose device keeps one copy of a Managed buffer answers a reader that reaches the
|
||||
/// buffer through its address alone with the venue's gap: the row asks what the device's
|
||||
/// second copy holds.
|
||||
fn managed_naming(
|
||||
&mut self,
|
||||
way: crate::managed_naming::Way,
|
||||
libraries: crate::managed_naming::Libraries,
|
||||
) -> Answer<Vec<u8>> {
|
||||
let _ = (way, libraries);
|
||||
Err(Failure::unavailable("managed_naming"))
|
||||
}
|
||||
|
||||
/// A command queue's limit on uncompleted command buffers, by the probe both sides run
|
||||
/// ([`crate::queue_slots`]): the queue is made with `max` as its
|
||||
/// `maxCommandBufferCount` (`newCommandQueue` where `max` is `None`), and at most `cap` command
|
||||
@@ -3159,9 +3186,9 @@ pub struct FragmentFilled {
|
||||
}
|
||||
|
||||
/// One execution of a kernel-encoded indirect command buffer over a range a buffer holds, which
|
||||
/// the GPU writes first: the one shape of indirect command buffer both sides build, indexed
|
||||
/// triangle draws that inherit the pipeline state and bind their own buffers, encoded by a
|
||||
/// kernel through the buffer's `gpuResourceID`.
|
||||
/// the GPU writes first: the one shape of indirect command buffer both sides build, plain or
|
||||
/// indexed triangle draws or plain or indexed patch draws that inherit the pipeline state and bind
|
||||
/// their own buffers, encoded by a kernel through the buffer's `gpuResourceID`.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct EncodedRange<'a> {
|
||||
/// The library of the kernel and of the drawing functions.
|
||||
@@ -3174,6 +3201,8 @@ pub struct EncodedRange<'a> {
|
||||
pub buffers: &'a [Handle],
|
||||
/// The commands the indirect command buffer holds, which the kernel's threads encode.
|
||||
pub commands: u32,
|
||||
/// The buffer's `commandTypes`: one kind alone, the kind the kernel encodes.
|
||||
pub command_types: IndirectCommandType,
|
||||
/// `maxVertexBufferBindCount` and `maxFragmentBufferBindCount`.
|
||||
pub bind_counts: [u32; 2],
|
||||
/// The pipeline the commands inherit: these vertex and fragment functions over one color
|
||||
@@ -3181,6 +3210,11 @@ pub struct EncodedRange<'a> {
|
||||
pub vertex: &'a str,
|
||||
pub fragment: &'a str,
|
||||
pub format: PixelFormat,
|
||||
/// That pipeline's `vertexDescriptor` and tessellation state, where the case states them (a
|
||||
/// post-tessellation vertex function that reads control points under a control-point index
|
||||
/// type); `None` leaves Metal's defaults.
|
||||
pub vertex_layout: Option<crate::render::VertexLayout<'a>>,
|
||||
pub tessellation: Option<crate::render::TessellationState>,
|
||||
/// The target's extent in texels, cleared to zero, and the row pitch of its read-back.
|
||||
pub size: [u32; 2],
|
||||
pub row_pitch: u32,
|
||||
|
||||
@@ -118,6 +118,7 @@ pub mod int_attributes;
|
||||
pub mod layered_targets;
|
||||
pub mod level_sizes;
|
||||
pub mod library_facts;
|
||||
pub mod managed_naming;
|
||||
pub mod math_routines;
|
||||
pub mod mesh_barriers;
|
||||
pub mod mesh_commands;
|
||||
@@ -184,6 +185,7 @@ pub mod sparse_heaps;
|
||||
pub mod sparse_mappings;
|
||||
pub mod sparse_tiles;
|
||||
pub mod srgb_fetch;
|
||||
pub mod srgb_storage_fragment_writes;
|
||||
pub mod srgb_storage_writes;
|
||||
pub mod stage_in_regions;
|
||||
pub mod stage_in_unread;
|
||||
@@ -590,6 +592,7 @@ pub fn all() -> Vec<Box<dyn Case>> {
|
||||
cases.extend(sparse_mappings::all());
|
||||
cases.extend(command_buffer_facts::all());
|
||||
cases.extend(empty_command_buffers::all());
|
||||
cases.extend(managed_naming::all());
|
||||
cases.extend(fresh_contents::all());
|
||||
cases.extend(sample_positions::all());
|
||||
cases.extend(
|
||||
@@ -615,6 +618,9 @@ pub fn all() -> Vec<Box<dyn Case>> {
|
||||
cases.push(Box::new(case));
|
||||
}
|
||||
cases.push(Box::new(srgb_storage_writes::SrgbStorageWrites));
|
||||
cases.push(Box::new(
|
||||
srgb_storage_fragment_writes::SrgbStorageFragmentWrites,
|
||||
));
|
||||
cases.extend(norm_storage_writes::NormStorageWrites::all());
|
||||
cases.extend(texel_swizzles::all());
|
||||
for case in swizzled_storage::all() {
|
||||
|
||||
@@ -249,19 +249,14 @@ fn unspecialized() -> HeapSizeCase {
|
||||
}
|
||||
}
|
||||
|
||||
/// The formats Metal describes no texture of alone: `RGBA16Float_XR`, `AnyDepth`, `AnyStencil` and
|
||||
/// a two-plane YCbCr format. Each answers 0 bytes at its texture type's alignment, and no texture.
|
||||
/// The formats Metal describes no texture of alone
|
||||
/// ([`WITHOUT_TEXTURES`](crate::texture_query::WITHOUT_TEXTURES)). Each answers 0 bytes at its texture type's alignment, and no texture.
|
||||
///
|
||||
/// `AnyDepth` and `AnyStencil` are asked in the 2D and cube types alone: Metal's validation stops a
|
||||
/// one-dimensional, 3D or buffer descriptor of either, which ends its process.
|
||||
fn formats_without_textures() -> HeapSizeCase {
|
||||
let mut queries = Vec::new();
|
||||
for format in [
|
||||
PixelFormat::RGBA16FloatXR,
|
||||
PixelFormat::AnyDepth,
|
||||
PixelFormat::AnyStencil,
|
||||
PixelFormat::YCBCR84202P,
|
||||
] {
|
||||
for format in crate::texture_query::WITHOUT_TEXTURES {
|
||||
let any_depth = matches!(format, PixelFormat::AnyDepth | PixelFormat::AnyStencil);
|
||||
for (texture_type, depth, slices) in STACKABLE_TYPES {
|
||||
let one_dimensional =
|
||||
|
||||
@@ -4,36 +4,57 @@
|
||||
//! The range is read when the execution runs, not when it is encoded, so each row writes it on the
|
||||
//! GPU in the execution's own command buffer, over a stale range the host wrote first that would
|
||||
//! draw every command: a side that read the range before the GPU wrote it draws all eight. The
|
||||
//! commands are the one shape both sides build ([`EncodedRange`]): indexed triangle draws that
|
||||
//! inherit the pipeline state and bind their own buffers, encoded by the owned fixture's
|
||||
//! `icb_indexed_16` kernel through the buffer's `gpuResourceID`. Command `i` draws rows `2i` and
|
||||
//! `2i + 1` of an 8 by 16 `RGBA32Uint` target, each texel its mark, the provoking vertex's
|
||||
//! `vid`, its `iid` and its tint, so the target names exactly which commands drew.
|
||||
//! commands are the one shape both sides build ([`EncodedRange`]): triangle draws that inherit the
|
||||
//! pipeline state and bind their own buffers, encoded by an owned fixture's kernel through the
|
||||
//! buffer's `gpuResourceID`. Command `i` draws rows `2i` and `2i + 1` of an 8 by 16 `RGBA32Uint`
|
||||
//! target, so the target names exactly which commands drew:
|
||||
//!
|
||||
//! | Row | The range, and what writes it |
|
||||
//! |---|---|
|
||||
//! | [`AT_ZERO`] | commands 0 to 2, a blit's copy before the pass |
|
||||
//! | [`PAST_ZERO`] | commands 5 and 6, a blit's copy before the pass |
|
||||
//! | [`DRAWN`] | commands 2 to 5, an earlier draw of the same pass, behind a memory barrier |
|
||||
//! - indexed draws (`MTLIndirectCommandTypeDrawIndexed`) of `icb_merged_indexed`'s
|
||||
//! `icb_indexed_16`, each texel its mark, the provoking vertex's `vid`, its `iid` and its tint;
|
||||
//! - plain draws (`MTLIndirectCommandTypeDraw`) of `icb_merged_draws`'s `icb_merged_triangles`,
|
||||
//! each command six vertices from vertex `6i`, one instance for an even command and two drawn
|
||||
//! over each other for an odd one, from base instance `i`, each texel its mark, the provoking
|
||||
//! vertex's `vid`, its `iid` and the base instance;
|
||||
//! - patch draws (`MTLIndirectCommandTypeDrawPatches`) of `icb_merged_patches`, each command one
|
||||
//! quad patch of one control point from patch `i`, with no patch index buffer, its factors a
|
||||
//! record of level 1, one instance for an even command and two drawn over each other for an odd
|
||||
//! one, from base instance `i`, the patch a rectangle over the command's rows, each texel its
|
||||
//! mark, the patch index, its `iid` and the base instance;
|
||||
//! - indexed patch draws (`MTLIndirectCommandTypeDrawIndexedPatches`) of `icb_merged_ipatches`,
|
||||
//! each command one quad patch of four control points from patch `i`, read through a
|
||||
//! `PerPatchControlPoint` layout under the `UInt16` control-point index type: the points are
|
||||
//! stored out of order and the indices name each corner, so a patch drawn over its rectangle
|
||||
//! read its indices; with no patch index buffer, its factors a record of level 1, instances and
|
||||
//! base instances as the patch draws', each texel its mark, the patch index, its `iid` and the
|
||||
//! base instance.
|
||||
//!
|
||||
//! Every row is bounded by construction: eight commands of two triangles each, one target of 8
|
||||
//! by 16, one kernel thread a command, and no function holds a loop.
|
||||
//! | Row | The draws | The range, and what writes it |
|
||||
//! |---|---|---|
|
||||
//! | [`AT_ZERO`] | indexed | commands 0 to 2, a blit's copy before the pass |
|
||||
//! | [`PAST_ZERO`] | indexed | commands 5 and 6, a blit's copy before the pass |
|
||||
//! | [`DRAWN`] | indexed | commands 2 to 5, an earlier draw of the same pass, behind a memory barrier |
|
||||
//! | [`PLAIN`] | plain | commands 1 to 5, a blit's copy before the pass |
|
||||
//! | [`PATCHES`] | patches | commands 1 to 5, a blit's copy before the pass |
|
||||
//! | [`INDEXED_PATCHES`] | indexed patches | commands 1 to 5, a blit's copy before the pass |
|
||||
//!
|
||||
//! Every row is bounded by construction: eight commands of two triangles each (an odd plain or
|
||||
//! patch command's two instances, four; a quad patch of level 1 is two triangles), one target of
|
||||
//! 8 by 16, one kernel thread a command, and no function holds a loop.
|
||||
|
||||
use super::indirect_commands::{fixture_inputs, shaders_of};
|
||||
use crate::allowance::Allowance;
|
||||
use crate::case::{call, made, Abort, Case, EncodedRange, Failure, Input, MetalSource, RangeWrite};
|
||||
use crate::case::{Side, TARGET_TEXEL};
|
||||
use crate::degradation::Degradation;
|
||||
use crate::fixture::Fixture;
|
||||
use crate::recording::ShaderRef;
|
||||
use crate::render::VertexStride;
|
||||
use crate::render::{TessellationState, VertexAttribute, VertexBufferLayout, VertexLayout};
|
||||
use crate::transcript::{Aspect, ByteLayout, Element, Gaps, Node, Observed, Region, Sites};
|
||||
use metal2vulkan::metal::PixelFormat;
|
||||
|
||||
/// The owned fixture whose kernel encodes the commands and whose functions they draw with.
|
||||
const FIXTURE: &str = "icb_merged_indexed";
|
||||
|
||||
/// The kernel that encodes command `tid`, and the state's two functions.
|
||||
const KERNEL: &str = "icb_indexed_16";
|
||||
const VERTEX: &str = "icb_indexed_vertex";
|
||||
const FRAGMENT: &str = "icb_indexed_fragment";
|
||||
use metal2vulkan::metal::{
|
||||
IndirectCommandType, PixelFormat, TessellationControlPointIndexType, VertexFormat,
|
||||
VertexStepFunction,
|
||||
};
|
||||
|
||||
/// The owned fixture whose rasterization-disabled vertex function writes
|
||||
/// `params[0] * (vid + 1) + params[1]` to `out[vid]` (instance 0): the earlier draw that writes
|
||||
@@ -62,10 +83,243 @@ const TINT: u32 = 0x200;
|
||||
pub const AT_ZERO: &str = "indirect-range-gpu-written-at-zero";
|
||||
pub const PAST_ZERO: &str = "indirect-range-gpu-written-past-zero";
|
||||
pub const DRAWN: &str = "indirect-range-written-by-an-earlier-draw";
|
||||
pub const PLAIN: &str = "indirect-range-gpu-written-plain-draws";
|
||||
pub const PATCHES: &str = "indirect-range-gpu-written-patch-draws";
|
||||
pub const INDEXED_PATCHES: &str = "indirect-range-gpu-written-indexed-patch-draws";
|
||||
|
||||
/// One row: its name, the range the GPU writes (location, length), and what writes it.
|
||||
/// The indexed patches' control point: a `float2` at attribute 0 of vertex buffer 2.
|
||||
const CORNER: [VertexAttribute; 1] = [VertexAttribute::new(0, VertexFormat::Float2, 0, 2)];
|
||||
|
||||
/// Vertex buffer 2 steps per patch control point, 8 bytes a point.
|
||||
const CORNERS: [VertexBufferLayout; 1] = [VertexBufferLayout {
|
||||
index: 2,
|
||||
stride: VertexStride::Bytes(8),
|
||||
step: VertexStepFunction::PerPatchControlPoint,
|
||||
rate: 1,
|
||||
}];
|
||||
|
||||
/// Where the indexed patches store corner `j` of a patch among its four points: the indices
|
||||
/// put them back in order (point `4i + PLACES[j]` is corner `j` of patch `i`).
|
||||
const PLACES: [u32; 4] = [2, 0, 3, 1];
|
||||
|
||||
/// The draws a row's commands make.
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
enum Draws {
|
||||
/// `icb_merged_indexed`'s indexed draws of 16-bit indices.
|
||||
Indexed,
|
||||
/// `icb_merged_draws`'s plain draws.
|
||||
Plain,
|
||||
/// `icb_merged_patches`'s patch draws.
|
||||
Patches,
|
||||
/// `icb_merged_ipatches`'s indexed patch draws of 16-bit control-point indices.
|
||||
IndexedPatches,
|
||||
}
|
||||
|
||||
impl Draws {
|
||||
/// The owned fixture whose kernel encodes the commands and whose functions they draw with.
|
||||
fn fixture(self) -> &'static str {
|
||||
match self {
|
||||
Draws::Indexed => "icb_merged_indexed",
|
||||
Draws::Plain => "icb_merged_draws",
|
||||
Draws::Patches => "icb_merged_patches",
|
||||
Draws::IndexedPatches => "icb_merged_ipatches",
|
||||
}
|
||||
}
|
||||
|
||||
/// The kernel that encodes command `tid`, and the state's vertex and fragment functions.
|
||||
fn functions(self) -> [&'static str; 3] {
|
||||
match self {
|
||||
Draws::Indexed => [
|
||||
"icb_indexed_16",
|
||||
"icb_indexed_vertex",
|
||||
"icb_indexed_fragment",
|
||||
],
|
||||
Draws::Plain => [
|
||||
"icb_merged_triangles",
|
||||
"icb_merged_vertex",
|
||||
"icb_merged_fragment",
|
||||
],
|
||||
Draws::Patches => [
|
||||
"icb_merged_patches",
|
||||
"icb_merged_patch_vertex",
|
||||
"icb_merged_patch_fragment",
|
||||
],
|
||||
Draws::IndexedPatches => [
|
||||
"icb_merged_ipatches",
|
||||
"icb_merged_ipatch_vertex",
|
||||
"icb_merged_ipatch_fragment",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
/// The buffer's `commandTypes`.
|
||||
fn command_types(self) -> IndirectCommandType {
|
||||
match self {
|
||||
Draws::Indexed => IndirectCommandType::DRAW_INDEXED,
|
||||
Draws::Plain => IndirectCommandType::DRAW,
|
||||
Draws::Patches => IndirectCommandType::DRAW_PATCHES,
|
||||
Draws::IndexedPatches => IndirectCommandType::DRAW_INDEXED_PATCHES,
|
||||
}
|
||||
}
|
||||
|
||||
/// `maxVertexBufferBindCount` and `maxFragmentBufferBindCount`: the vertex function's three
|
||||
/// buffers, and the indexed fragment function's tint.
|
||||
fn bind_counts(self) -> [u32; 2] {
|
||||
match self {
|
||||
Draws::Indexed => [3, 1],
|
||||
Draws::Plain | Draws::Patches | Draws::IndexedPatches => [3, 0],
|
||||
}
|
||||
}
|
||||
|
||||
/// The kernel's buffers 1 and up, by name, and how many of them, from the second, the
|
||||
/// commands read through their bindings.
|
||||
///
|
||||
/// Indexed: each command's draw (first index, index count, instances, base vertex, base
|
||||
/// instance), the marks, the frame (the target's extent and no instance step), the pixel
|
||||
/// corners of each command's quad, the tints, and two copies of a quad's six 16-bit indices,
|
||||
/// command `i` drawing from copy `i % 2`. Plain: each command's draw (vertex start, vertex
|
||||
/// count, instances, base instance), the marks, the frame, and the pixel positions of each
|
||||
/// command's six vertices, two triangles over its rows. Patches: each command's draw (patch
|
||||
/// start, patch count, instances, base instance), the marks, the frame, the pixel corners of
|
||||
/// each patch's rectangle (top left, bottom right), and the factors: a quad factor record of
|
||||
/// `half` 1.0 (four edges and two inside factors) for each patch position. Indexed patches:
|
||||
/// the patch draws, the marks, the frame, each patch's four corners in pixels stored at their
|
||||
/// [`PLACES`], the 16-bit control-point indices that name them in order, and the factors.
|
||||
fn kernel_buffers(self) -> Vec<(&'static str, Vec<u8>)> {
|
||||
let marks: Vec<u32> = (0..COMMANDS).map(|i| MARK + i).collect();
|
||||
let frame = floats(&[SIZE[0] as f32, SIZE[1] as f32, 0.0, 0.0]);
|
||||
let rows = |i: u32| ((2 * i) as f32, (2 * i + 2) as f32);
|
||||
match self {
|
||||
Draws::Indexed => {
|
||||
let draws: Vec<u32> = (0..COMMANDS)
|
||||
.flat_map(|i| [6 * (i % 2), 6, 1, 4 * i, i])
|
||||
.collect();
|
||||
let xy: Vec<f32> = (0..COMMANDS)
|
||||
.flat_map(|i| {
|
||||
let (top, bottom) = rows(i);
|
||||
[0.0, top, 8.0, top, 0.0, bottom, 8.0, bottom]
|
||||
})
|
||||
.collect();
|
||||
let tints: Vec<u32> = (0..COMMANDS).map(|i| TINT + i).collect();
|
||||
let indices: Vec<u8> = [0u16, 1, 2, 2, 1, 3]
|
||||
.repeat(2)
|
||||
.iter()
|
||||
.flat_map(|i| i.to_le_bytes())
|
||||
.collect();
|
||||
vec![
|
||||
("buffer:draws", words(&draws)),
|
||||
("buffer:marks", words(&marks)),
|
||||
("buffer:frame", frame),
|
||||
("buffer:xy", floats(&xy)),
|
||||
("buffer:tints", words(&tints)),
|
||||
("buffer:indices", indices),
|
||||
]
|
||||
}
|
||||
Draws::Plain => {
|
||||
let draws: Vec<u32> = (0..COMMANDS)
|
||||
.flat_map(|i| [6 * i, 6, 1 + i % 2, i])
|
||||
.collect();
|
||||
let xy: Vec<f32> = (0..COMMANDS)
|
||||
.flat_map(|i| {
|
||||
let (top, bottom) = rows(i);
|
||||
[
|
||||
0.0, top, 8.0, top, 0.0, bottom, 0.0, bottom, 8.0, top, 8.0, bottom,
|
||||
]
|
||||
})
|
||||
.collect();
|
||||
vec![
|
||||
("buffer:draws", words(&draws)),
|
||||
("buffer:marks", words(&marks)),
|
||||
("buffer:frame", frame),
|
||||
("buffer:xy", floats(&xy)),
|
||||
]
|
||||
}
|
||||
Draws::Patches => {
|
||||
let draws: Vec<u32> = (0..COMMANDS).flat_map(|i| [i, 1, 1 + i % 2, i]).collect();
|
||||
let xy: Vec<f32> = (0..COMMANDS)
|
||||
.flat_map(|i| {
|
||||
let (top, bottom) = rows(i);
|
||||
[0.0, top, 8.0, bottom]
|
||||
})
|
||||
.collect();
|
||||
// `half` 1.0 is 0x3c00.
|
||||
let factors: Vec<u8> = [0x3c00u16; 6]
|
||||
.repeat(COMMANDS as usize)
|
||||
.iter()
|
||||
.flat_map(|f| f.to_le_bytes())
|
||||
.collect();
|
||||
vec![
|
||||
("buffer:draws", words(&draws)),
|
||||
("buffer:marks", words(&marks)),
|
||||
("buffer:frame", frame),
|
||||
("buffer:xy", floats(&xy)),
|
||||
("buffer:factors", factors),
|
||||
]
|
||||
}
|
||||
Draws::IndexedPatches => {
|
||||
let draws: Vec<u32> = (0..COMMANDS).flat_map(|i| [i, 1, 1 + i % 2, i]).collect();
|
||||
let mut corners = vec![0f32; 8 * COMMANDS as usize];
|
||||
let mut points = Vec::new();
|
||||
for i in 0..COMMANDS {
|
||||
let (top, bottom) = rows(i);
|
||||
let corner = [[0.0, top], [8.0, top], [0.0, bottom], [8.0, bottom]];
|
||||
for (j, xy) in corner.into_iter().enumerate() {
|
||||
let at = 4 * i + PLACES[j];
|
||||
corners[2 * at as usize..][..2].copy_from_slice(&xy);
|
||||
points.extend((at as u16).to_le_bytes());
|
||||
}
|
||||
}
|
||||
// `half` 1.0 is 0x3c00.
|
||||
let factors: Vec<u8> = [0x3c00u16; 6]
|
||||
.repeat(COMMANDS as usize)
|
||||
.iter()
|
||||
.flat_map(|f| f.to_le_bytes())
|
||||
.collect();
|
||||
vec![
|
||||
("buffer:draws", words(&draws)),
|
||||
("buffer:marks", words(&marks)),
|
||||
("buffer:frame", frame),
|
||||
("buffer:corners", floats(&corners)),
|
||||
("buffer:points", points),
|
||||
("buffer:factors", factors),
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The execution's line among the inputs.
|
||||
fn execution(self) -> &'static str {
|
||||
match self {
|
||||
Draws::Indexed => "DrawIndexed, inherited state, 3 vertex and 1 fragment buffers",
|
||||
Draws::Plain => "Draw, inherited state, 3 vertex and 0 fragment buffers",
|
||||
Draws::Patches => "DrawPatches, inherited state, 3 vertex and 0 fragment buffers",
|
||||
Draws::IndexedPatches => {
|
||||
"DrawIndexedPatches, inherited state, 3 vertex and 0 fragment buffers, control \
|
||||
points a float2 at attribute 0 of buffer 2 stepped per patch control point at 8 \
|
||||
bytes, UInt16 control-point indices"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The pipeline's vertex descriptor and tessellation state: the indexed patches' control
|
||||
/// points and index type; Metal's defaults for the rest.
|
||||
fn control_points(self) -> (Option<VertexLayout<'static>>, Option<TessellationState>) {
|
||||
match self {
|
||||
Draws::IndexedPatches => (
|
||||
Some(VertexLayout::new(&CORNER, &CORNERS)),
|
||||
Some(
|
||||
TessellationState::new().indexed_by(TessellationControlPointIndexType::UInt16),
|
||||
),
|
||||
),
|
||||
Draws::Indexed | Draws::Plain | Draws::Patches => (None, None),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// One row: its name, its draws, the range the GPU writes (location, length), and what writes it.
|
||||
pub struct GpuRange {
|
||||
name: &'static str,
|
||||
draws: Draws,
|
||||
range: [u32; 2],
|
||||
drawn: bool,
|
||||
}
|
||||
@@ -78,40 +332,6 @@ fn floats(values: &[f32]) -> Vec<u8> {
|
||||
values.iter().flat_map(|v| v.to_le_bytes()).collect()
|
||||
}
|
||||
|
||||
/// The kernel's buffers 1 to 6, by name: each command's draw (first index, index count,
|
||||
/// instances, base vertex, base instance), the marks, the frame (the target's extent and no
|
||||
/// instance step), the pixel corners of each command's quad, the tints, and two copies of a
|
||||
/// quad's six 16-bit indices, command `i` drawing from copy `i % 2`.
|
||||
fn kernel_buffers() -> [(&'static str, Vec<u8>); 6] {
|
||||
let draws: Vec<u32> = (0..COMMANDS)
|
||||
.flat_map(|i| [6 * (i % 2), 6, 1, 4 * i, i])
|
||||
.collect();
|
||||
let xy: Vec<f32> = (0..COMMANDS)
|
||||
.flat_map(|i| {
|
||||
let (top, bottom) = ((2 * i) as f32, (2 * i + 2) as f32);
|
||||
[0.0, top, 8.0, top, 0.0, bottom, 8.0, bottom]
|
||||
})
|
||||
.collect();
|
||||
let marks: Vec<u32> = (0..COMMANDS).map(|i| MARK + i).collect();
|
||||
let tints: Vec<u32> = (0..COMMANDS).map(|i| TINT + i).collect();
|
||||
let indices: Vec<u8> = [0u16, 1, 2, 2, 1, 3]
|
||||
.repeat(2)
|
||||
.iter()
|
||||
.flat_map(|i| i.to_le_bytes())
|
||||
.collect();
|
||||
[
|
||||
("buffer:draws", words(&draws)),
|
||||
("buffer:marks", words(&marks)),
|
||||
(
|
||||
"buffer:frame",
|
||||
floats(&[SIZE[0] as f32, SIZE[1] as f32, 0.0, 0.0]),
|
||||
),
|
||||
("buffer:xy", floats(&xy)),
|
||||
("buffer:tints", words(&tints)),
|
||||
("buffer:indices", indices),
|
||||
]
|
||||
}
|
||||
|
||||
impl GpuRange {
|
||||
/// The bytes of the buffer the range is written from: a blit's source holds the range itself;
|
||||
/// the writer's `params` the pair whose two vertices write the location and the length,
|
||||
@@ -183,10 +403,30 @@ impl Case for GpuRange {
|
||||
MetalSource::Run
|
||||
}
|
||||
|
||||
fn allowances(&self) -> Vec<Allowance> {
|
||||
// No value is loosened. The plain draws' vertex function writes `[[point_size]]`, so their
|
||||
// render state carries the static note `device-point-size` on a device whose largest point
|
||||
// is below Metal's, whatever primitive it draws; that notice is declared. The indexed
|
||||
// draws' vertex function writes none. The patch draws' tessellating pipeline announces the
|
||||
// tessellation notices every row that draws a patch declares
|
||||
// (`tessellation_sweeps::tessellation_notices`), as do the indexed patch draws': none
|
||||
// moves a texel of a quad patch of level 1, whose two triangles cover its rectangle in
|
||||
// any order and winding.
|
||||
match self.draws {
|
||||
Draws::Indexed => Vec::new(),
|
||||
Draws::Plain => vec![crate::replay::notice_allowance(
|
||||
Degradation::DevicePointSize.code(),
|
||||
)],
|
||||
Draws::Patches | Draws::IndexedPatches => {
|
||||
super::tessellation_sweeps::tessellation_notices()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn shaders(&self) -> Result<Vec<ShaderRef>, String> {
|
||||
let mut shaders = Vec::new();
|
||||
for entry in [KERNEL, VERTEX, FRAGMENT] {
|
||||
shaders.extend(shaders_of(FIXTURE, entry)?);
|
||||
for entry in self.draws.functions() {
|
||||
shaders.extend(shaders_of(self.draws.fixture(), entry)?);
|
||||
}
|
||||
if self.drawn {
|
||||
shaders.extend(shaders_of(WRITER, WRITER)?);
|
||||
@@ -195,14 +435,14 @@ impl Case for GpuRange {
|
||||
}
|
||||
|
||||
fn inputs(&self) -> Result<Vec<Input>, String> {
|
||||
let mut inputs = fixture_inputs(FIXTURE)?;
|
||||
let mut inputs = fixture_inputs(self.draws.fixture())?;
|
||||
if self.drawn {
|
||||
for mut input in fixture_inputs(WRITER)? {
|
||||
input.name = format!("writer-{}", input.name);
|
||||
inputs.push(input);
|
||||
}
|
||||
}
|
||||
for (name, bytes) in kernel_buffers() {
|
||||
for (name, bytes) in self.draws.kernel_buffers() {
|
||||
inputs.push(Input::bytes(name, &bytes));
|
||||
}
|
||||
inputs.push(Input::bytes("buffer:range", &words(&STALE)));
|
||||
@@ -210,8 +450,9 @@ impl Case for GpuRange {
|
||||
inputs.push(Input::bytes(
|
||||
"execution",
|
||||
format!(
|
||||
"{COMMANDS} commands of DrawIndexed, inherited state, 3 vertex and 1 fragment \
|
||||
buffers; the range at offset {OFFSET}; {}; target RGBA32Uint {}x{} cleared to 0",
|
||||
"{COMMANDS} commands of {}; the range at offset {OFFSET}; {}; target RGBA32Uint \
|
||||
{}x{} cleared to 0",
|
||||
self.draws.execution(),
|
||||
match self.drawn {
|
||||
false => "copied by a blit before the pass",
|
||||
true => "written by two points of the writer, then a barrier of buffers",
|
||||
@@ -225,13 +466,13 @@ impl Case for GpuRange {
|
||||
}
|
||||
|
||||
fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> {
|
||||
let library_handle = library(side, sites, FIXTURE, "library")?;
|
||||
let library_handle = library(side, sites, self.draws.fixture(), "library")?;
|
||||
let writer = match self.drawn {
|
||||
true => Some(library(side, sites, WRITER, "writer-library")?),
|
||||
false => None,
|
||||
};
|
||||
let mut buffers = Vec::new();
|
||||
for (name, bytes) in kernel_buffers() {
|
||||
for (name, bytes) in self.draws.kernel_buffers() {
|
||||
buffers.push(made(sites, name, side.buffer(&bytes))?);
|
||||
}
|
||||
let range = made(sites, "buffer:range", side.buffer(&words(&STALE)))?;
|
||||
@@ -244,17 +485,22 @@ impl Case for GpuRange {
|
||||
},
|
||||
None => RangeWrite::Copied { from: source },
|
||||
};
|
||||
// The commands read the marks, the frame, the corners, the tints and the indices through
|
||||
// their bindings; the draws only the kernel reads.
|
||||
// The commands read every buffer after the draws through their bindings; the draws only
|
||||
// the kernel reads.
|
||||
let [kernel, vertex, fragment] = self.draws.functions();
|
||||
let (vertex_layout, tessellation) = self.draws.control_points();
|
||||
let run = EncodedRange {
|
||||
library: library_handle,
|
||||
kernel: KERNEL,
|
||||
kernel,
|
||||
buffers: &buffers,
|
||||
commands: COMMANDS,
|
||||
bind_counts: [3, 1],
|
||||
vertex: VERTEX,
|
||||
fragment: FRAGMENT,
|
||||
command_types: self.draws.command_types(),
|
||||
bind_counts: self.draws.bind_counts(),
|
||||
vertex,
|
||||
fragment,
|
||||
format: PixelFormat::RGBA32Uint,
|
||||
vertex_layout,
|
||||
tessellation,
|
||||
size: SIZE,
|
||||
row_pitch: SIZE[0] * TARGET_TEXEL,
|
||||
used: &buffers[1..],
|
||||
@@ -276,11 +522,21 @@ impl Case for GpuRange {
|
||||
/// The family's rows, in the order the report lists them.
|
||||
pub fn boxed() -> Vec<Box<dyn Case>> {
|
||||
[
|
||||
(AT_ZERO, [0, 3], false),
|
||||
(PAST_ZERO, [5, 2], false),
|
||||
(DRAWN, [2, 4], true),
|
||||
(AT_ZERO, Draws::Indexed, [0, 3], false),
|
||||
(PAST_ZERO, Draws::Indexed, [5, 2], false),
|
||||
(DRAWN, Draws::Indexed, [2, 4], true),
|
||||
(PLAIN, Draws::Plain, [1, 5], false),
|
||||
(PATCHES, Draws::Patches, [1, 5], false),
|
||||
(INDEXED_PATCHES, Draws::IndexedPatches, [1, 5], false),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|(name, range, drawn)| Box::new(GpuRange { name, range, drawn }) as Box<dyn Case>)
|
||||
.map(|(name, draws, range, drawn)| {
|
||||
Box::new(GpuRange {
|
||||
name,
|
||||
draws,
|
||||
range,
|
||||
drawn,
|
||||
}) as Box<dyn Case>
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
//! Which commit takes a Managed buffer's named range to the GPU, one case a reader
|
||||
//! ([`crate::managed_naming::Way`]): a compute slot, a declaration by `useResource:usage:`, a
|
||||
//! reach through the buffer's address alone, a vertex slot with a draw, and a blit copy's source.
|
||||
//! [`crate::managed_naming`] states the sequence and what each reader answers.
|
||||
//!
|
||||
//! # Where Metal's answer comes from
|
||||
//!
|
||||
//! Carried, from a table measured on an AMD Radeon Pro 5300M under macOS 26.7.1, 8 rounds a
|
||||
//! reader, by a probe of the same sequence (jobs 81602 and 81644): the readers that name the
|
||||
//! buffer read the bytes as of their own commit, and the reader through the address the bytes the
|
||||
//! GPU's copy last took. The oracle keeps one copy of a Managed buffer (`hasUnifiedMemory` true),
|
||||
//! so its run would answer another question, and record mode keeps the measured table. The site
|
||||
//! holds which of the sequence's three contents the reader read, which is what the table states;
|
||||
//! the probe's own bytes are not the case's.
|
||||
//!
|
||||
//! # Where it compares
|
||||
//!
|
||||
//! On a device that keeps one copy of a Managed buffer the runtime has no second copy to read
|
||||
//! through an address, and the address row reads the venue's gap there; the other rows read the
|
||||
//! bytes as of their commit in either form, as the 5300M's and a one-copy Intel UHD Graphics 630's
|
||||
//! (jobs 81603 and 81645) did.
|
||||
//!
|
||||
//! # Why it is safe
|
||||
//!
|
||||
//! Every reader reads 256 bytes of a live buffer: two kernels of one thread an element, one
|
||||
//! triangle over a 4 by 4 target, and blit copies and fills inside their buffers. Every wait is
|
||||
//! bounded.
|
||||
|
||||
use crate::case::{answered, made, Abort, Case, Failure, Input, MetalSource, Side};
|
||||
use crate::fixture::{Fixture, METAL_TEXT, RUNTIME_TEXT};
|
||||
use crate::managed_naming::{Content, Libraries, Read, Way};
|
||||
use crate::recording::ShaderRef;
|
||||
use crate::replay::NOTICES_SITE;
|
||||
use crate::transcript::{Sites, Transcript, Value};
|
||||
|
||||
/// The fixture of the compute slot's and the vertex slot's readers.
|
||||
const EXAMPLES: Fixture = Fixture {
|
||||
name: "examples/runtime_examples",
|
||||
entry: "scale_and_offset",
|
||||
};
|
||||
|
||||
/// The fixture of the readers through the address.
|
||||
const POINTERS: Fixture = Fixture {
|
||||
name: "ab_pointers",
|
||||
entry: "ab_address",
|
||||
};
|
||||
|
||||
/// The carried measurement, and where it is written down.
|
||||
const CARRIED_FROM: &str = "an AMD Radeon Pro 5300M measurement under macOS 26.7.1, 8 rounds a \
|
||||
reader (jobs 81602 and 81644), which found that a named Managed range \
|
||||
reaches the GPU at the first commit whose encoders name the buffer, \
|
||||
with its bytes as of that commit, and that a buffer no encoder names \
|
||||
keeps the bytes its GPU copy last took";
|
||||
|
||||
/// Why record mode must not replace the carried table on the oracle.
|
||||
const NEVER_RE_RECORD: &str = "the oracle keeps one copy of a Managed buffer (hasUnifiedMemory \
|
||||
true), so its run answers what one copy holds, not which commit \
|
||||
takes a range to a second copy";
|
||||
|
||||
/// The rounds the carried measurement stands on.
|
||||
const CARRIED_RUNS: u32 = 8;
|
||||
|
||||
/// One case of the family: its name, its reader, and what the 5300M's reader read.
|
||||
pub struct ManagedNaming {
|
||||
name: &'static str,
|
||||
way: Way,
|
||||
metal: Content,
|
||||
}
|
||||
|
||||
/// Every case of the family.
|
||||
pub fn all() -> Vec<Box<dyn Case>> {
|
||||
let case = |name, way, metal| -> Box<dyn Case> { Box::new(ManagedNaming { name, way, metal }) };
|
||||
vec![
|
||||
case(
|
||||
"managed-named-compute-slot",
|
||||
Way::ComputeSlot,
|
||||
Content::Later,
|
||||
),
|
||||
case("managed-named-declared", Way::Declared, Content::Later),
|
||||
case("managed-named-address-only", Way::Address, Content::Synced),
|
||||
case("managed-named-vertex-slot", Way::VertexSlot, Content::Later),
|
||||
case("managed-named-blit-source", Way::BlitSource, Content::Later),
|
||||
]
|
||||
}
|
||||
|
||||
/// The two fixtures' texts in both dialects.
|
||||
fn shaders_of() -> Result<Vec<ShaderRef>, String> {
|
||||
let mut shaders = Vec::new();
|
||||
for fixture in [EXAMPLES, POINTERS] {
|
||||
for extension in [RUNTIME_TEXT, METAL_TEXT] {
|
||||
shaders.push(ShaderRef {
|
||||
fixture: format!("{}{extension}", fixture.name),
|
||||
entry: fixture.entry.to_owned(),
|
||||
source_sha256: crate::sha256_hex(fixture.text(extension)?.as_bytes()),
|
||||
});
|
||||
}
|
||||
}
|
||||
Ok(shaders)
|
||||
}
|
||||
|
||||
impl ManagedNaming {
|
||||
/// The sites a run that read `content` emits.
|
||||
fn transcript(&self, content: Content) -> Result<Transcript, String> {
|
||||
let mut sites = Sites::new();
|
||||
sites.push(crate::case::inputs_node(&self.inputs()?));
|
||||
sites.leaf("examples", answered());
|
||||
sites.leaf("pointers", answered());
|
||||
sites.leaf("sequence", answered());
|
||||
sites.value("reads", reads(Read::Content(content)));
|
||||
sites.notices(NOTICES_SITE, &[] as &[&str]);
|
||||
Ok(sites.finish())
|
||||
}
|
||||
}
|
||||
|
||||
/// The value the `reads` site holds.
|
||||
fn reads(read: Read) -> Value {
|
||||
Value::Lines(vec![read.word().to_owned()])
|
||||
}
|
||||
|
||||
impl Case for ManagedNaming {
|
||||
fn name(&self) -> &'static str {
|
||||
self.name
|
||||
}
|
||||
|
||||
fn metal_source(&self) -> MetalSource {
|
||||
MetalSource::carried_only(CARRIED_FROM, NEVER_RE_RECORD)
|
||||
.measured_on(crate::recording::AMD_RADEON_PRO_5300M)
|
||||
}
|
||||
|
||||
fn shaders(&self) -> Result<Vec<ShaderRef>, String> {
|
||||
shaders_of()
|
||||
}
|
||||
|
||||
fn inputs(&self) -> Result<Vec<Input>, String> {
|
||||
let mut inputs = Vec::new();
|
||||
for (fixture, short) in [(EXAMPLES, "examples"), (POINTERS, "pointers")] {
|
||||
inputs.push(Input::bytes(
|
||||
format!("air:{short}"),
|
||||
fixture.text(RUNTIME_TEXT)?.as_bytes(),
|
||||
));
|
||||
inputs.push(Input::bytes(
|
||||
format!("air-typed:{short}"),
|
||||
fixture.text(METAL_TEXT)?.as_bytes(),
|
||||
));
|
||||
}
|
||||
for content in Content::ALL {
|
||||
inputs.push(Input::bytes(
|
||||
format!("contents:{content:?}"),
|
||||
&content.bytes(),
|
||||
));
|
||||
}
|
||||
inputs.push(Input::bytes("reader", self.way.name().as_bytes()));
|
||||
Ok(inputs)
|
||||
}
|
||||
|
||||
fn carried_transcript(&self) -> Result<Option<(u32, Transcript)>, String> {
|
||||
Ok(Some((CARRIED_RUNS, self.transcript(self.metal)?)))
|
||||
}
|
||||
|
||||
fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> {
|
||||
let load = |fixture: Fixture, at: &str| {
|
||||
fixture.loaded().map_err(|why| Abort {
|
||||
at: at.to_owned(),
|
||||
failure: Failure::named("FixtureNotRead", why),
|
||||
})
|
||||
};
|
||||
let (examples, pointers) = (load(EXAMPLES, "examples")?, load(POINTERS, "pointers")?);
|
||||
let examples = made(sites, "examples", side.library(&examples.source()))?;
|
||||
let pointers = made(sites, "pointers", side.library(&pointers.source()))?;
|
||||
let libraries = Libraries { examples, pointers };
|
||||
let read = made(sites, "sequence", side.managed_naming(self.way, libraries))?;
|
||||
sites.value("reads", reads(self.way.read(&read)));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
/// Five cases, one a reader, each named once, carrying the 5300M's answer: the bytes the
|
||||
/// GPU's copy last took for the reader through the address alone, the bytes as of the
|
||||
/// reader's commit for every other.
|
||||
#[test]
|
||||
fn every_reader_is_a_case_carrying_the_5300m_answer() {
|
||||
let cases = all();
|
||||
assert_eq!(cases.len(), 5);
|
||||
let mut names: Vec<&str> = cases.iter().map(|case| case.name()).collect();
|
||||
names.sort_unstable();
|
||||
names.dedup();
|
||||
assert_eq!(names.len(), 5);
|
||||
for case in &cases {
|
||||
let (runs, transcript) = (case.carried_transcript())
|
||||
.expect("a carried answer")
|
||||
.expect("carried");
|
||||
assert_eq!(runs, CARRIED_RUNS);
|
||||
assert!(case.allowances().is_empty());
|
||||
let words = format!("{transcript:?}");
|
||||
let address = case.name() == "managed-named-address-only";
|
||||
let word = match address {
|
||||
true => Content::Synced.word(),
|
||||
false => Content::Later.word(),
|
||||
};
|
||||
assert!(words.contains(word), "{}: {words}", case.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,12 +47,23 @@
|
||||
//! outside the pixel is a value Metal asserts on and that reaches the sample grid. So they have no
|
||||
//! oracle value here. [`crate::render::forbidden_positions`] refuses the two
|
||||
//! fatal shapes from the input's own shape, so a case cannot build one by accident.
|
||||
//!
|
||||
//! **Carried from a discrete Mac** — the `EIGHT` table, the family's pass at 8 samples. The oracle
|
||||
//! renders no 8 samples (an Apple M3 Max under macOS 27.0.1 answers `supportsTextureSampleCount:`
|
||||
//! no for 8, job 82550), and a Mac with an AMD GPU does: an AMD Radeon Pro 5300M under macOS 26.7.1
|
||||
//! ran the family's pass at 8 samples, plain and under Metal's API validation layer, which passed
|
||||
//! it (job 82284, the probe `sample_positions_8.m` of the usage-edges probes). Each row carries the
|
||||
//! resolved texel the probe read, so the bytes compare as a recorded row's do. Every row's coverage
|
||||
//! avoids a resolve that halves a code: where the 5300M's average lies halfway between two codes it
|
||||
//! rounds to the even one (4 of 8 samples: red 0, alpha 128), the M3 Max rounds a half up (2 of 4:
|
||||
//! red 1), and that rounding is the device's own (`PrecisionNote::DeviceRoundedResolve`), so a row
|
||||
//! there would compare two devices' rounding rather than where the samples are.
|
||||
|
||||
use crate::allowance::{Allowance, Justification, Loosening};
|
||||
use crate::case::{answered, Abort, Case, Failure, Input, MetalSource, Side};
|
||||
use crate::degradation::Degradation;
|
||||
use crate::fixture::{Fixture, METAL_TEXT, RUNTIME_TEXT};
|
||||
use crate::recording::{ShaderRef, APPLE_M4};
|
||||
use crate::recording::{ShaderRef, AMD_RADEON_PRO_5300M, APPLE_M4};
|
||||
use crate::render::{
|
||||
ColorState, PassColor, Plane, ReadAt, RenderPass, RenderPipelineSpec, RenderStep, RenderWork,
|
||||
TargetSpec,
|
||||
@@ -223,6 +234,71 @@ const FEWER: &[Shape] = &[
|
||||
),
|
||||
];
|
||||
|
||||
/// Eight positions at `(x, 0.5)`.
|
||||
macro_rules! eight {
|
||||
($x:expr) => {
|
||||
&[
|
||||
at($x, 0.5),
|
||||
at($x, 0.5),
|
||||
at($x, 0.5),
|
||||
at($x, 0.5),
|
||||
at($x, 0.5),
|
||||
at($x, 0.5),
|
||||
at($x, 0.5),
|
||||
at($x, 0.5),
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
/// One row of the family at 8 samples, and the resolved texel an AMD Radeon Pro 5300M read.
|
||||
struct Measured {
|
||||
shape: Shape,
|
||||
texel: [u8; TEXEL as usize],
|
||||
}
|
||||
|
||||
/// The rows at 8 samples, carried from the 5300M (job 82284).
|
||||
///
|
||||
/// The device's own positions are Vulkan's standard 8 (each `x` an odd sixteenth, as the 5300M's
|
||||
/// `getDefaultSamplePositions:count:` answers too), so an edge at 5/8 of the pixel covers five of
|
||||
/// them: alpha 5/8 of 255 and red 5/8 of a code, each to the nearest code.
|
||||
const EIGHT: &[Measured] = &[
|
||||
Measured {
|
||||
shape: Shape::new("sample-positions-8x-default", 8, &[], 0.25, 5),
|
||||
texel: [1, 0, 0, 0x9f],
|
||||
},
|
||||
Measured {
|
||||
shape: Shape::new("sample-positions-8x-custom-left", 8, eight!(0.25), 0.0, 8),
|
||||
texel: [1, 0, 0, 0xff],
|
||||
},
|
||||
Measured {
|
||||
shape: Shape::new(
|
||||
"sample-positions-8x-custom-mixed",
|
||||
8,
|
||||
&[
|
||||
at(0.25, 0.5),
|
||||
at(0.75, 0.5),
|
||||
at(0.75, 0.5),
|
||||
at(0.75, 0.5),
|
||||
at(0.75, 0.5),
|
||||
at(0.75, 0.5),
|
||||
at(0.75, 0.5),
|
||||
at(0.75, 0.5),
|
||||
],
|
||||
0.0,
|
||||
1,
|
||||
),
|
||||
texel: [0, 0, 0, 0x20],
|
||||
},
|
||||
];
|
||||
|
||||
/// Where the 8-sample rows' Metal answer was measured, and why record mode must not replace it.
|
||||
const EIGHT_FROM: &str =
|
||||
"an AMD Radeon Pro 5300M under macOS 26.7.1 (job 82284): the family's pass \
|
||||
at 8 samples, plain and under Metal's API validation layer, one run each";
|
||||
const EIGHT_NEVER_RE_RECORD: &str = "the oracle renders no 8 samples (an Apple M3 Max answers \
|
||||
supportsTextureSampleCount: no for 8), so a record run there \
|
||||
must not encode an 8-sample texture";
|
||||
|
||||
/// Where the carried rows' Metal answer was measured, and why record mode must not replace it.
|
||||
const CARRIED_FROM: &str = "a Metal probe of custom sample positions on an Apple M4";
|
||||
const NEVER_RE_RECORD: &str = "fewer custom sample positions than the pass's samples is a count \
|
||||
@@ -535,26 +611,7 @@ impl Case for Fewer {
|
||||
}
|
||||
|
||||
fn carried_transcript(&self) -> Result<Option<(u32, Transcript)>, String> {
|
||||
let mut sites = Sites::new();
|
||||
sites.push(crate::case::inputs_node(&self.inputs()?));
|
||||
for call in SETUP_SITES {
|
||||
sites.leaf(call, answered());
|
||||
}
|
||||
let mut calls = Node::branch("calls", Vec::new());
|
||||
for (piece, call) in ["renderCommandEncoder", "copyFromTextureToBuffer"]
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
{
|
||||
calls = calls.with(Node::leaf(
|
||||
format!("{piece}-{call}"),
|
||||
Observed::value(Value::ok(Value::Absent)),
|
||||
));
|
||||
}
|
||||
sites.push(calls);
|
||||
sites.leaf(
|
||||
"status",
|
||||
Observed::value(Value::ok(Value::unit_variant("Completed"))),
|
||||
);
|
||||
let mut sites = carried_sites(self.shape)?;
|
||||
sites.leaf(
|
||||
"coverage",
|
||||
Observed::value(Value::Lines(vec![format!(
|
||||
@@ -576,6 +633,83 @@ impl Case for Fewer {
|
||||
}
|
||||
}
|
||||
|
||||
/// The sites a carried row's run emits before its answer: the inputs, every set-up call answered,
|
||||
/// both pieces of work answered and the command buffer completed.
|
||||
fn carried_sites(shape: &Shape) -> Result<Sites, String> {
|
||||
let mut sites = Sites::new();
|
||||
sites.push(crate::case::inputs_node(&inputs(shape)?));
|
||||
for call in SETUP_SITES {
|
||||
sites.leaf(call, answered());
|
||||
}
|
||||
let mut calls = Node::branch("calls", Vec::new());
|
||||
for (piece, call) in ["renderCommandEncoder", "copyFromTextureToBuffer"]
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
{
|
||||
calls = calls.with(Node::leaf(
|
||||
format!("{piece}-{call}"),
|
||||
Observed::value(Value::ok(Value::Absent)),
|
||||
));
|
||||
}
|
||||
sites.push(calls);
|
||||
sites.leaf(
|
||||
"status",
|
||||
Observed::value(Value::ok(Value::unit_variant("Completed"))),
|
||||
);
|
||||
Ok(sites)
|
||||
}
|
||||
|
||||
/// One row at 8 samples, whose Metal answer is carried from the 5300M: the resolved texel and the
|
||||
/// coverage it comes to, as a recorded row holds them.
|
||||
pub struct Eight {
|
||||
row: &'static Measured,
|
||||
}
|
||||
|
||||
impl Case for Eight {
|
||||
fn name(&self) -> &'static str {
|
||||
self.row.shape.name
|
||||
}
|
||||
|
||||
fn metal_source(&self) -> MetalSource {
|
||||
MetalSource::carried_only(EIGHT_FROM, EIGHT_NEVER_RE_RECORD)
|
||||
.measured_on(AMD_RADEON_PRO_5300M)
|
||||
}
|
||||
|
||||
fn allowances(&self) -> Vec<Allowance> {
|
||||
allowances()
|
||||
}
|
||||
|
||||
fn shaders(&self) -> Result<Vec<ShaderRef>, String> {
|
||||
shaders()
|
||||
}
|
||||
|
||||
fn inputs(&self) -> Result<Vec<Input>, String> {
|
||||
inputs(&self.row.shape)
|
||||
}
|
||||
|
||||
fn carried_transcript(&self) -> Result<Option<(u32, Transcript)>, String> {
|
||||
let shape = &self.row.shape;
|
||||
let mut sites = carried_sites(shape)?;
|
||||
sites.leaf(
|
||||
"coverage",
|
||||
Observed::value(coverage(&self.row.texel, shape.samples)),
|
||||
);
|
||||
sites.leaf(
|
||||
"resolved",
|
||||
Observed::bytes(self.row.texel.to_vec(), layout()),
|
||||
);
|
||||
sites.notices(NOTICES_SITE, &[] as &[&str]);
|
||||
Ok(Some((MEASURED_RUNS, sites.finish())))
|
||||
}
|
||||
|
||||
fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> {
|
||||
Coverage {
|
||||
shape: &self.row.shape,
|
||||
}
|
||||
.run(side, sites)
|
||||
}
|
||||
}
|
||||
|
||||
/// Every case of the family, in the order the report lists them.
|
||||
pub fn all() -> Vec<Box<dyn Case>> {
|
||||
let mut cases: Vec<Box<dyn Case>> = Vec::new();
|
||||
@@ -585,6 +719,9 @@ pub fn all() -> Vec<Box<dyn Case>> {
|
||||
for shape in FEWER {
|
||||
cases.push(Box::new(Fewer { shape }));
|
||||
}
|
||||
for row in EIGHT {
|
||||
cases.push(Box::new(Eight { row }));
|
||||
}
|
||||
cases
|
||||
}
|
||||
|
||||
@@ -695,13 +832,56 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// Every 8-sample row carries the 5300M's texel at the coverage its table states, alpha and red
|
||||
/// each the covered fraction of its full code to the nearest code, never halfway; forbids record mode from
|
||||
/// replacing it; and states the sites a run of the row emits, the resolved texel's included.
|
||||
#[test]
|
||||
fn every_eight_sample_row_carries_the_5300m_texel_at_its_coverage() {
|
||||
for row in EIGHT {
|
||||
let shape = &row.shape;
|
||||
assert_eq!(shape.samples, 8, "{}", shape.name);
|
||||
let nearest = |code: u64| {
|
||||
let eighths = code * shape.covered;
|
||||
assert_ne!(eighths % 8, 4, "{}: halfway between two codes", shape.name);
|
||||
((code * shape.covered + 4) / 8) as u8
|
||||
};
|
||||
assert_eq!(
|
||||
row.texel,
|
||||
[nearest(1), 0, 0, nearest(255)],
|
||||
"{}",
|
||||
shape.name
|
||||
);
|
||||
let case = Eight { row };
|
||||
assert!(case.metal_source().forbidden().is_some(), "{}", shape.name);
|
||||
let (runs, transcript) = case
|
||||
.carried_transcript()
|
||||
.unwrap()
|
||||
.unwrap_or_else(|| panic!("{}: no carried transcript", shape.name));
|
||||
assert_eq!(runs, MEASURED_RUNS);
|
||||
assert_eq!(
|
||||
site(shape.name, &transcript, "coverage").observed.value,
|
||||
Value::Lines(vec![format!("{} of 8 samples", shape.covered)])
|
||||
);
|
||||
assert_eq!(
|
||||
site(shape.name, &transcript, "resolved").observed.value,
|
||||
Value::Bytes(row.texel.to_vec())
|
||||
);
|
||||
for call in SETUP_SITES {
|
||||
site(shape.name, &transcript, call);
|
||||
}
|
||||
site(shape.name, &transcript, "calls/1-copyFromTextureToBuffer");
|
||||
site(shape.name, &transcript, "status");
|
||||
}
|
||||
}
|
||||
|
||||
/// Every row of the family states positions the Metal leg's guard takes, or none at all.
|
||||
///
|
||||
/// This is the separation made mechanical: a row whose count passes the pass's samples, or
|
||||
/// whose coordinate leaves the pixel, cannot be added to either table without failing here.
|
||||
#[test]
|
||||
fn no_row_states_a_shape_the_metal_leg_may_not_encode() {
|
||||
for shape in COVERAGE.iter().chain(FEWER) {
|
||||
let eight = EIGHT.iter().map(|row| &row.shape);
|
||||
for shape in COVERAGE.iter().chain(FEWER).chain(eight) {
|
||||
assert!(
|
||||
crate::render::forbidden_positions(shape.positions, shape.samples).is_none(),
|
||||
"{}: the guard refuses its positions",
|
||||
@@ -717,8 +897,11 @@ mod tests {
|
||||
/// a near-equivalent. A case that loosened its coverage or its texel would fail here.
|
||||
#[test]
|
||||
fn every_case_is_tabled_and_loosens_its_notices_alone() {
|
||||
let named: Vec<&str> = COVERAGE.iter().chain(FEWER).map(|row| row.name).collect();
|
||||
assert_eq!(named.len(), COVERAGE.len() + FEWER.len());
|
||||
let eight = EIGHT.iter().map(|row| &row.shape);
|
||||
let named: Vec<&str> = (COVERAGE.iter().chain(FEWER).chain(eight))
|
||||
.map(|row| row.name)
|
||||
.collect();
|
||||
assert_eq!(named.len(), COVERAGE.len() + FEWER.len() + EIGHT.len());
|
||||
for case in all() {
|
||||
assert!(
|
||||
named.contains(&case.name()),
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
//! `srgb-storage-fragment-writes`: what a fragment function's `access::write` stores into an 8-bit
|
||||
//! sRGB texture, the fragment twin of [`srgb_storage_writes`](super::srgb_storage_writes).
|
||||
//!
|
||||
//! The promise is that case's: Metal writes `RGBA8Unorm_sRGB` and `BGRA8Unorm_sRGB` on every Metal
|
||||
//! 3 device, and the Metal Shading Language specification (8.7.7) encodes the write from linear to
|
||||
//! sRGB, alpha linear. `read_write` access is not promised for either format, so this case writes
|
||||
//! only.
|
||||
//!
|
||||
//! The functions are the owned fixture `fpv_srgb_draw_storage`'s `fpv_srgb_fragment_write` and
|
||||
//! `fpv_srgb_fragment_write_half`, drawn behind `fpv_srgb_cover`, one triangle over the whole of
|
||||
//! a [`WIDTH`] by [`HEIGHT`] `RGBA8Unorm` attachment: each pixel's fragment writes buffer 0's
|
||||
//! `float4` or `half4` of its pixel, element `y * WIDTH + x`, at its own texel of the texture at
|
||||
//! fragment texture slot 0. The values, the formats, the texture and the layout its bytes are read
|
||||
//! under are the kernel case's, so the two cases' stored bytes compare one to one: the case
|
||||
//! records the texture's bytes by `getBytes:`, one code a channel.
|
||||
//!
|
||||
//! One pass a sweep, one fragment a texel, no loop and no sampling: nothing here can fault a GPU.
|
||||
|
||||
use super::srgb_storage_writes::{
|
||||
request, stored_layout, values, width_bytes, FORMATS, HEIGHT, WIDTH,
|
||||
};
|
||||
use crate::case::{call, made, Abort, Case, Failure, Input, MetalSource, Side};
|
||||
use crate::fixture::{Fixture, METAL_TEXT, RUNTIME_TEXT};
|
||||
use crate::recording::ShaderRef;
|
||||
use crate::render::{
|
||||
ColorState, PassColor, RenderPass, RenderPipelineSpec, RenderStep, RenderWork, TargetSpec,
|
||||
};
|
||||
use crate::transcript::{Digest, Node, Observed, Sites, Value};
|
||||
use metal2vulkan::metal::{PixelFormat, PrimitiveType};
|
||||
|
||||
/// The fixture the functions live in.
|
||||
const FIXTURE: &str = "fpv_srgb_draw_storage";
|
||||
|
||||
/// The vertex function: one triangle over the whole viewport.
|
||||
const COVER: &str = "fpv_srgb_cover";
|
||||
|
||||
/// The fragment functions the case draws: a `float4` write and a `half4` write.
|
||||
const FRAGMENTS: [&str; 2] = ["fpv_srgb_fragment_write", "fpv_srgb_fragment_write_half"];
|
||||
|
||||
/// The attachment's format, which the fragments' returned colour lands in and nothing reads.
|
||||
const ATTACHMENT: PixelFormat = PixelFormat::RGBA8Unorm;
|
||||
|
||||
/// The one colour attachment every pipeline carries.
|
||||
const COLORS: [Option<ColorState>; 1] = [Some(ColorState::new(ATTACHMENT))];
|
||||
|
||||
/// The attachment: [`WIDTH`] by [`HEIGHT`], so a fragment is a texel of the written texture.
|
||||
fn attachment() -> TargetSpec {
|
||||
TargetSpec::read(ATTACHMENT, [WIDTH, HEIGHT])
|
||||
}
|
||||
|
||||
/// The case.
|
||||
pub struct SrgbStorageFragmentWrites;
|
||||
|
||||
impl Case for SrgbStorageFragmentWrites {
|
||||
fn name(&self) -> &'static str {
|
||||
"srgb-storage-fragment-writes"
|
||||
}
|
||||
|
||||
fn metal_source(&self) -> MetalSource {
|
||||
MetalSource::Run
|
||||
}
|
||||
|
||||
fn shaders(&self) -> Result<Vec<ShaderRef>, String> {
|
||||
let fixture = Fixture::new(FIXTURE);
|
||||
let mut shaders = Vec::new();
|
||||
for fragment in FRAGMENTS {
|
||||
for extension in [RUNTIME_TEXT, METAL_TEXT] {
|
||||
shaders.push(ShaderRef {
|
||||
fixture: format!("{FIXTURE}{extension}"),
|
||||
entry: format!("{COVER}+{fragment}"),
|
||||
source_sha256: crate::sha256_hex(fixture.text(extension)?.as_bytes()),
|
||||
});
|
||||
}
|
||||
}
|
||||
Ok(shaders)
|
||||
}
|
||||
|
||||
fn inputs(&self) -> Result<Vec<Input>, String> {
|
||||
let fixture = Fixture::new(FIXTURE);
|
||||
let mut inputs = vec![
|
||||
Input {
|
||||
name: "air".to_owned(),
|
||||
digest: Digest::sha256(fixture.text(RUNTIME_TEXT)?.as_bytes()),
|
||||
},
|
||||
Input {
|
||||
name: "air-typed".to_owned(),
|
||||
digest: Digest::sha256(fixture.text(METAL_TEXT)?.as_bytes()),
|
||||
},
|
||||
Input::bytes("buffer:1", &width_bytes()),
|
||||
Input::bytes("attachment", &attachment().words()),
|
||||
];
|
||||
for fragment in FRAGMENTS {
|
||||
let pipeline = RenderPipelineSpec::new(COVER, fragment, &COLORS);
|
||||
inputs.push(Input::bytes(
|
||||
format!("{fragment}/pipeline"),
|
||||
&pipeline.words(),
|
||||
));
|
||||
inputs.push(Input::bytes(
|
||||
format!("{fragment}/buffer:0"),
|
||||
&values(fragment),
|
||||
));
|
||||
}
|
||||
for format in FORMATS {
|
||||
inputs.push(Input::bytes(format.name(), &request(format).words()));
|
||||
}
|
||||
Ok(inputs)
|
||||
}
|
||||
|
||||
fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> {
|
||||
let loaded = Fixture::new(FIXTURE).loaded().map_err(|why| Abort {
|
||||
at: "library".to_owned(),
|
||||
failure: Failure::named("FixtureNotRead", why),
|
||||
})?;
|
||||
let library = made(sites, "library", side.library(&loaded.source()))?;
|
||||
let shape = made(sites, "buffer/width", side.buffer(&width_bytes()))?;
|
||||
for fragment in FRAGMENTS {
|
||||
let pipeline = made(
|
||||
sites,
|
||||
&format!("{fragment}/pipeline"),
|
||||
side.render_pipeline(library, &RenderPipelineSpec::new(COVER, fragment, &COLORS)),
|
||||
)?;
|
||||
let values = made(
|
||||
sites,
|
||||
&format!("{fragment}/buffer/0"),
|
||||
side.buffer(&values(fragment)),
|
||||
)?;
|
||||
for format in FORMATS {
|
||||
let at = |site: &str| format!("{}/{fragment}/{site}", format.name());
|
||||
let texture = made(sites, &at("texture"), side.texture(&request(format)))?;
|
||||
let into = made(sites, &at("attachment"), side.target(&attachment()))?;
|
||||
let steps = vec![
|
||||
RenderStep::Pipeline(pipeline),
|
||||
RenderStep::FragmentTexture { texture, index: 0 },
|
||||
RenderStep::FragmentBuffer {
|
||||
buffer: values,
|
||||
offset: 0,
|
||||
index: 0,
|
||||
},
|
||||
RenderStep::FragmentBuffer {
|
||||
buffer: shape,
|
||||
offset: 0,
|
||||
index: 1,
|
||||
},
|
||||
RenderStep::Draw {
|
||||
primitive: PrimitiveType::Triangle,
|
||||
first: 0,
|
||||
count: 3,
|
||||
instances: 1,
|
||||
},
|
||||
];
|
||||
let pass = RenderWork::Pass(
|
||||
RenderPass::clearing(vec![PassColor::cleared(into, [0.0; 4])]).drawing(steps),
|
||||
);
|
||||
let outcome = call(sites, &at("draw"), side.render(&[pass]), |outcome| {
|
||||
outcome.status.clone()
|
||||
})?;
|
||||
let refused = outcome.refused.first().and_then(Option::as_ref);
|
||||
sites.push(Node::leaf(
|
||||
at("pass"),
|
||||
Observed::value(match refused {
|
||||
Some(failure) => failure.recorded(),
|
||||
None => Value::ok(Value::Absent),
|
||||
}),
|
||||
));
|
||||
if let Some(failure) = refused {
|
||||
return Err(Abort {
|
||||
at: at("pass"),
|
||||
failure: failure.clone(),
|
||||
});
|
||||
}
|
||||
let stored = call(
|
||||
sites,
|
||||
&at("texels"),
|
||||
side.read_texture(texture, [WIDTH, HEIGHT], WIDTH * 4),
|
||||
|_| Value::Absent,
|
||||
)?;
|
||||
sites.push(Node::leaf(
|
||||
at("stored"),
|
||||
Observed::bytes(stored, stored_layout()),
|
||||
));
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -35,8 +35,9 @@ const FIXTURE: &str = "fpv_srgb_storage";
|
||||
/// The kernels the case runs: a `float4` write and a `half4` write.
|
||||
const KERNELS: [&str; 2] = ["fpv_srgb_write", "fpv_srgb_write_half"];
|
||||
|
||||
/// The formats the case writes.
|
||||
const FORMATS: [PixelFormat; 2] = [PixelFormat::RGBA8UnormSRGB, PixelFormat::BGRA8UnormSRGB];
|
||||
/// The formats the case, and its fragment twin, write.
|
||||
pub(crate) const FORMATS: [PixelFormat; 2] =
|
||||
[PixelFormat::RGBA8UnormSRGB, PixelFormat::BGRA8UnormSRGB];
|
||||
|
||||
/// The texture's width, which buffer 1 holds.
|
||||
pub const WIDTH: u32 = 256;
|
||||
@@ -86,9 +87,11 @@ pub fn texels() -> Vec<[f32; 4]> {
|
||||
out
|
||||
}
|
||||
|
||||
/// Buffer 0's bytes for `kernel`: each texel's `float4`, or its `half4`.
|
||||
fn values(kernel: &str) -> Vec<u8> {
|
||||
let half = kernel.ends_with("_half");
|
||||
/// Buffer 0's bytes for `function`, a kernel here or a fragment function of the fragment twin
|
||||
/// (`srgb-storage-fragment-writes`): each texel's `float4`, or its `half4` where the name ends in
|
||||
/// `_half`.
|
||||
pub(crate) fn values(function: &str) -> Vec<u8> {
|
||||
let half = function.ends_with("_half");
|
||||
let mut bytes = Vec::new();
|
||||
for value in texels().into_iter().flatten() {
|
||||
match half {
|
||||
@@ -100,17 +103,17 @@ fn values(kernel: &str) -> Vec<u8> {
|
||||
}
|
||||
|
||||
/// Buffer 1's bytes: the row's width, as the kernels' `constant uint &width`.
|
||||
fn width_bytes() -> Vec<u8> {
|
||||
pub(crate) fn width_bytes() -> Vec<u8> {
|
||||
WIDTH.to_le_bytes().to_vec()
|
||||
}
|
||||
|
||||
/// The texture a sweep writes: shared storage, written by shaders alone.
|
||||
fn request(format: PixelFormat) -> TextureRequest<'static> {
|
||||
pub(crate) fn request(format: PixelFormat) -> TextureRequest<'static> {
|
||||
TextureRequest::read_2d(format.as_raw(), WIDTH, HEIGHT).used(TextureUsage::SHADER_WRITE)
|
||||
}
|
||||
|
||||
/// The layout the stored bytes are read under: one row a texel row, one code a channel.
|
||||
fn stored_layout() -> ByteLayout {
|
||||
pub(crate) fn stored_layout() -> ByteLayout {
|
||||
let pitch = WIDTH * 4;
|
||||
ByteLayout {
|
||||
region: Region::Texture {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//! The degrade-notice codes the suite's cases name: `metal2vulkan-degrade-<kind>`, one per kind,
|
||||
//! and the kind each of the runtime's precision notes announces as.
|
||||
//! each its precision note's code as the translator states it (`PrecisionNote::code`), and the
|
||||
//! kind each of the runtime's precision notes announces as.
|
||||
//!
|
||||
//! A case loosens a field by naming a code ([`crate::allowance`]), and the comparison holds it
|
||||
//! there only where the run announced that code. The runtime's side announces the codes of
|
||||
@@ -11,170 +12,172 @@ use metal2vulkan::pipeline::PrecisionNote;
|
||||
/// A kind of degrade notice, by its code ([`Degradation::code`]).
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub enum Degradation {
|
||||
/// `metal2vulkan-degrade-device-rounded-resolve`.
|
||||
/// [`PrecisionNote::DeviceRoundedResolve`].
|
||||
DeviceRoundedResolve,
|
||||
/// `metal2vulkan-degrade-device-reconvergence`.
|
||||
/// [`PrecisionNote::DeviceReconvergence`].
|
||||
DeviceReconvergence,
|
||||
/// `metal2vulkan-degrade-simdgroup-access-order`.
|
||||
/// [`PrecisionNote::SimdgroupAccessOrder`].
|
||||
SimdgroupAccessOrder,
|
||||
/// `metal2vulkan-degrade-device-filtered-mipmaps`.
|
||||
/// [`PrecisionNote::DeviceFilteredMipmaps`].
|
||||
DeviceFilteredMipmaps,
|
||||
/// `metal2vulkan-degrade-capped-lod-bias`.
|
||||
/// [`PrecisionNote::CappedLodBias`].
|
||||
CappedLodBias,
|
||||
/// `metal2vulkan-degrade-snorm-minimum-kept`.
|
||||
/// [`PrecisionNote::SnormMinimumKept`].
|
||||
SnormMinimumKept,
|
||||
/// `metal2vulkan-degrade-shared-exponent-kept`.
|
||||
/// [`PrecisionNote::SharedExponentKept`].
|
||||
SharedExponentKept,
|
||||
/// `metal2vulkan-degrade-compressed-texel-decode`.
|
||||
/// [`PrecisionNote::CompressedTexelDecode`].
|
||||
CompressedTexelDecode,
|
||||
/// `metal2vulkan-degrade-depth-denormals`.
|
||||
/// [`PrecisionNote::DepthDenormals`].
|
||||
DepthDenormals,
|
||||
/// `metal2vulkan-degrade-f16-fma-double-rounding`.
|
||||
/// [`PrecisionNote::F16FmaDoubleRounding`].
|
||||
F16FmaDoubleRounding,
|
||||
/// `metal2vulkan-degrade-f16-int-conv-double-rounding`.
|
||||
/// [`PrecisionNote::F16IntConvDoubleRounding`].
|
||||
F16IntConvDoubleRounding,
|
||||
/// `metal2vulkan-degrade-grad-from-bias`.
|
||||
/// [`PrecisionNote::GradFromBias`].
|
||||
GradFromBias,
|
||||
/// `metal2vulkan-degrade-device-transcendentals`.
|
||||
/// [`PrecisionNote::DeviceTranscendentals`].
|
||||
DeviceTranscendentals,
|
||||
/// `metal2vulkan-degrade-reduction-order`.
|
||||
/// [`PrecisionNote::ReductionOrder`].
|
||||
ReductionOrder,
|
||||
/// `metal2vulkan-degrade-device-denormals`.
|
||||
/// [`PrecisionNote::DeviceDenormals`].
|
||||
DeviceDenormals,
|
||||
/// `metal2vulkan-degrade-pixel-sampler-scaling`.
|
||||
/// [`PrecisionNote::PixelSamplerScaling`].
|
||||
PixelSamplerScaling,
|
||||
/// `metal2vulkan-degrade-device-arithmetic`.
|
||||
/// [`PrecisionNote::DeviceArithmetic`].
|
||||
DeviceArithmetic,
|
||||
/// `metal2vulkan-degrade-device-signed-zero-inf-nan`.
|
||||
/// [`PrecisionNote::DeviceSignedZeroInfNan`].
|
||||
DeviceSignedZeroInfNan,
|
||||
/// `metal2vulkan-degrade-device-ray-intersection`.
|
||||
/// [`PrecisionNote::DeviceRayIntersection`].
|
||||
DeviceRayIntersection,
|
||||
/// `metal2vulkan-degrade-fast-math-rewrites`.
|
||||
/// [`PrecisionNote::FastMathRewrites`].
|
||||
FastMathRewrites,
|
||||
/// `metal2vulkan-degrade-tessellation-winding`.
|
||||
/// [`PrecisionNote::TessellationWinding`].
|
||||
TessellationWinding,
|
||||
/// `metal2vulkan-degrade-tessellation-fractional-spacing`.
|
||||
/// [`PrecisionNote::TessellationFractionalSpacing`].
|
||||
TessellationFractionalSpacing,
|
||||
/// `metal2vulkan-degrade-tessellation-factor-edge-cases`.
|
||||
/// [`PrecisionNote::TessellationFactorEdgeCases`].
|
||||
TessellationFactorEdgeCases,
|
||||
/// `metal2vulkan-degrade-tessellation-factor-scale`.
|
||||
/// [`PrecisionNote::TessellationFactorScale`].
|
||||
TessellationFactorScale,
|
||||
/// `metal2vulkan-degrade-tessellation-factor-instance`.
|
||||
/// [`PrecisionNote::TessellationFactorInstance`].
|
||||
TessellationFactorInstance,
|
||||
/// `metal2vulkan-degrade-fp8-value`.
|
||||
/// [`PrecisionNote::Fp8Value`].
|
||||
Fp8Value,
|
||||
/// `metal2vulkan-degrade-multisample-position`.
|
||||
/// [`PrecisionNote::MultisamplePosition`].
|
||||
MultisamplePosition,
|
||||
/// `metal2vulkan-degrade-bicubic-filter-arithmetic`.
|
||||
/// [`PrecisionNote::BicubicFilterArithmetic`].
|
||||
BicubicFilterArithmetic,
|
||||
/// `metal2vulkan-degrade-sparse-residency`.
|
||||
/// [`PrecisionNote::SparseResidency`].
|
||||
SparseResidency,
|
||||
/// `metal2vulkan-degrade-device-nan-encoding`.
|
||||
/// [`PrecisionNote::DeviceNanEncoding`].
|
||||
DeviceNanEncoding,
|
||||
/// `metal2vulkan-degrade-restricted-depth-range`.
|
||||
/// [`PrecisionNote::RestrictedDepthRange`].
|
||||
RestrictedDepthRange,
|
||||
/// `metal2vulkan-degrade-cube-gradient-footprint`.
|
||||
/// [`PrecisionNote::CubeGradientFootprint`].
|
||||
CubeGradientFootprint,
|
||||
/// `metal2vulkan-degrade-half-texel-conversion`.
|
||||
/// [`PrecisionNote::HalfTexelConversion`].
|
||||
HalfTexelConversion,
|
||||
/// `metal2vulkan-degrade-srgb-texel-decode`.
|
||||
/// [`PrecisionNote::SrgbTexelDecode`].
|
||||
SrgbTexelDecode,
|
||||
/// `metal2vulkan-degrade-function-storage-assumed`.
|
||||
/// [`PrecisionNote::FunctionStorageAssumed`].
|
||||
FunctionStorageAssumed,
|
||||
/// `metal2vulkan-degrade-quads-counted-before-discard`.
|
||||
/// [`PrecisionNote::QuadsCountedBeforeDiscard`].
|
||||
QuadsCountedBeforeDiscard,
|
||||
/// `metal2vulkan-degrade-view-base-texel-offset`.
|
||||
/// [`PrecisionNote::ViewBaseTexelOffset`].
|
||||
ViewBaseTexelOffset,
|
||||
/// `metal2vulkan-degrade-device-color-conversion`.
|
||||
/// [`PrecisionNote::DeviceColorConversion`].
|
||||
DeviceColorConversion,
|
||||
/// `metal2vulkan-degrade-device-interpolation`.
|
||||
/// [`PrecisionNote::DeviceInterpolation`].
|
||||
DeviceInterpolation,
|
||||
/// `metal2vulkan-degrade-device-interpolation-offset`.
|
||||
/// [`PrecisionNote::DeviceInterpolationOffset`].
|
||||
DeviceInterpolationOffset,
|
||||
/// `metal2vulkan-degrade-extrapolated-interpolation`.
|
||||
/// [`PrecisionNote::ExtrapolatedInterpolation`].
|
||||
ExtrapolatedInterpolation,
|
||||
/// `metal2vulkan-degrade-quads-split-by-clipping`.
|
||||
/// [`PrecisionNote::QuadsSplitByClipping`].
|
||||
QuadsSplitByClipping,
|
||||
/// `metal2vulkan-degrade-fragment-simdgroup-grouping`.
|
||||
/// [`PrecisionNote::FragmentSimdgroupGrouping`].
|
||||
FragmentSimdgroupGrouping,
|
||||
/// `metal2vulkan-degrade-blended-write-rounding`.
|
||||
/// [`PrecisionNote::BlendedWriteRounding`].
|
||||
BlendedWriteRounding,
|
||||
/// `metal2vulkan-degrade-rotated-blend-rounding`.
|
||||
/// [`PrecisionNote::RotatedBlendRounding`].
|
||||
RotatedBlendRounding,
|
||||
/// `metal2vulkan-degrade-linked-sampler-numbering`.
|
||||
/// [`PrecisionNote::LinkedSamplerNumbering`].
|
||||
LinkedSamplerNumbering,
|
||||
/// `metal2vulkan-degrade-argument-pixel-sampler-scaling`.
|
||||
/// [`PrecisionNote::ArgumentPixelSamplerScaling`].
|
||||
ArgumentPixelSamplerScaling,
|
||||
/// `metal2vulkan-degrade-half-output-precision`.
|
||||
/// [`PrecisionNote::HalfOutputPrecision`].
|
||||
HalfOutputPrecision,
|
||||
/// `metal2vulkan-degrade-anisotropic-filter`.
|
||||
/// [`PrecisionNote::AnisotropicFilter`].
|
||||
AnisotropicFilter,
|
||||
/// `metal2vulkan-degrade-device-anisotropic-filter`.
|
||||
/// [`PrecisionNote::DeviceAnisotropicFilter`].
|
||||
DeviceAnisotropicFilter,
|
||||
/// `metal2vulkan-degrade-device-point-size`.
|
||||
/// [`PrecisionNote::DevicePointSize`].
|
||||
DevicePointSize,
|
||||
/// `metal2vulkan-degrade-clipped-coverage-split`.
|
||||
/// [`PrecisionNote::ClippedCoverageSplit`].
|
||||
ClippedCoverageSplit,
|
||||
/// `metal2vulkan-degrade-looped-sample-outputs`.
|
||||
/// [`PrecisionNote::LoopedSampleOutputs`].
|
||||
LoopedSampleOutputs,
|
||||
/// `metal2vulkan-degrade-half-output-fast-math-blend`.
|
||||
/// [`PrecisionNote::HalfOutputFastMathBlend`].
|
||||
HalfOutputFastMathBlend,
|
||||
/// `metal2vulkan-degrade-device-sampling`.
|
||||
/// [`PrecisionNote::DeviceSampling`].
|
||||
DeviceSampling,
|
||||
/// `metal2vulkan-degrade-native-transcendentals`.
|
||||
/// [`PrecisionNote::NativeTranscendentals`].
|
||||
NativeTranscendentals,
|
||||
/// `metal2vulkan-degrade-native-division`.
|
||||
/// [`PrecisionNote::NativeDivision`].
|
||||
NativeDivision,
|
||||
/// `metal2vulkan-degrade-native-fma`.
|
||||
/// [`PrecisionNote::NativeFma`].
|
||||
NativeFma,
|
||||
/// `metal2vulkan-degrade-device-texel-conversion`.
|
||||
/// [`PrecisionNote::DeviceTexelConversion`].
|
||||
DeviceTexelConversion,
|
||||
/// `metal2vulkan-degrade-device-vertex-conversion`.
|
||||
/// [`PrecisionNote::DeviceVertexConversion`].
|
||||
DeviceVertexConversion,
|
||||
/// `metal2vulkan-degrade-native-half-conversion`.
|
||||
/// [`PrecisionNote::NativeHalfConversion`].
|
||||
NativeHalfConversion,
|
||||
/// `metal2vulkan-degrade-native-half-quantize`.
|
||||
/// [`PrecisionNote::NativeHalfQuantize`].
|
||||
NativeHalfQuantize,
|
||||
/// `metal2vulkan-degrade-native-nan-encoding`.
|
||||
/// [`PrecisionNote::NativeNanEncoding`].
|
||||
NativeNanEncoding,
|
||||
/// `metal2vulkan-degrade-native-min-max`.
|
||||
/// [`PrecisionNote::NativeMinMax`].
|
||||
NativeMinMax,
|
||||
/// `metal2vulkan-degrade-native-dot`.
|
||||
/// [`PrecisionNote::NativeDot`].
|
||||
NativeDot,
|
||||
/// `metal2vulkan-degrade-native-mix`.
|
||||
/// [`PrecisionNote::NativeMix`].
|
||||
NativeMix,
|
||||
/// `metal2vulkan-degrade-device-pack-conversion`.
|
||||
/// [`PrecisionNote::DevicePackConversion`].
|
||||
DevicePackConversion,
|
||||
/// `metal2vulkan-degrade-tessellation-triangle-order`.
|
||||
/// [`PrecisionNote::TessellationTriangleOrder`].
|
||||
TessellationTriangleOrder,
|
||||
/// `metal2vulkan-degrade-unmeasured-group-speculation`.
|
||||
/// [`PrecisionNote::UnmeasuredGroupSpeculation`].
|
||||
UnmeasuredGroupSpeculation,
|
||||
/// `metal2vulkan-degrade-device-sample-level`.
|
||||
/// [`PrecisionNote::DeviceSampleLevel`].
|
||||
DeviceSampleLevel,
|
||||
/// `metal2vulkan-degrade-coverage-reads-rounded-alpha`.
|
||||
/// [`PrecisionNote::CoverageReadsRoundedAlpha`].
|
||||
CoverageReadsRoundedAlpha,
|
||||
/// `metal2vulkan-degrade-device-alpha-coverage`.
|
||||
/// [`PrecisionNote::DeviceAlphaCoverage`].
|
||||
DeviceAlphaCoverage,
|
||||
/// `metal2vulkan-degrade-unordered-fetch-within-draw`.
|
||||
/// [`PrecisionNote::UnorderedFetchWithinDraw`].
|
||||
UnorderedFetchWithinDraw,
|
||||
/// `metal2vulkan-degrade-native-logic-operation`.
|
||||
/// [`PrecisionNote::NativeLogicOperation`].
|
||||
NativeLogicOperation,
|
||||
/// `metal2vulkan-degrade-device-depth-bias`.
|
||||
/// [`PrecisionNote::DeviceDepthBias`].
|
||||
DeviceDepthBias,
|
||||
/// `metal2vulkan-degrade-swizzled-opaque-black-border`.
|
||||
/// [`PrecisionNote::SwizzledOpaqueBlackBorder`].
|
||||
SwizzledOpaqueBlackBorder,
|
||||
/// `metal2vulkan-degrade-device-line-rasterization`.
|
||||
/// [`PrecisionNote::DeviceLineRasterization`].
|
||||
DeviceLineRasterization,
|
||||
/// `metal2vulkan-degrade-device-fragment-runs`.
|
||||
/// [`PrecisionNote::DeviceFragmentRuns`].
|
||||
DeviceFragmentRuns,
|
||||
/// `metal2vulkan-degrade-device-occlusion-count`.
|
||||
/// [`PrecisionNote::DeviceOcclusionCount`].
|
||||
DeviceOcclusionCount,
|
||||
/// `metal2vulkan-degrade-vertex-simdgroup-grouping`.
|
||||
/// [`PrecisionNote::VertexSimdgroupGrouping`].
|
||||
VertexSimdgroupGrouping,
|
||||
/// `metal2vulkan-degrade-restricted-depth-upload`.
|
||||
/// [`PrecisionNote::RestrictedDepthUpload`].
|
||||
RestrictedDepthUpload,
|
||||
/// `metal2vulkan-degrade-stencil-output-overlap`.
|
||||
/// [`PrecisionNote::StencilOutputOverlap`].
|
||||
StencilOutputOverlap,
|
||||
/// [`PrecisionNote::DeviceHalfDenormals`].
|
||||
DeviceHalfDenormals,
|
||||
}
|
||||
|
||||
impl Degradation {
|
||||
@@ -262,135 +265,103 @@ impl Degradation {
|
||||
Degradation::VertexSimdgroupGrouping,
|
||||
Degradation::RestrictedDepthUpload,
|
||||
Degradation::StencilOutputOverlap,
|
||||
Degradation::DeviceHalfDenormals,
|
||||
];
|
||||
|
||||
/// The kind's code, `metal2vulkan-degrade-<kind>`.
|
||||
/// The kind's code, `metal2vulkan-degrade-<kind>`: its precision note's, which the translator
|
||||
/// states ([`PrecisionNote::code`]).
|
||||
pub const fn code(self) -> &'static str {
|
||||
self.note().code()
|
||||
}
|
||||
|
||||
/// The precision note the kind is: [`Degradation::from_precision_note`] taken back.
|
||||
pub const fn note(self) -> PrecisionNote {
|
||||
match self {
|
||||
Degradation::DeviceRoundedResolve => "metal2vulkan-degrade-device-rounded-resolve",
|
||||
Degradation::DeviceReconvergence => "metal2vulkan-degrade-device-reconvergence",
|
||||
Degradation::SimdgroupAccessOrder => "metal2vulkan-degrade-simdgroup-access-order",
|
||||
Degradation::DeviceFilteredMipmaps => "metal2vulkan-degrade-device-filtered-mipmaps",
|
||||
Degradation::CappedLodBias => "metal2vulkan-degrade-capped-lod-bias",
|
||||
Degradation::SnormMinimumKept => "metal2vulkan-degrade-snorm-minimum-kept",
|
||||
Degradation::SharedExponentKept => "metal2vulkan-degrade-shared-exponent-kept",
|
||||
Degradation::CompressedTexelDecode => "metal2vulkan-degrade-compressed-texel-decode",
|
||||
Degradation::DepthDenormals => "metal2vulkan-degrade-depth-denormals",
|
||||
Degradation::F16FmaDoubleRounding => "metal2vulkan-degrade-f16-fma-double-rounding",
|
||||
Degradation::F16IntConvDoubleRounding => {
|
||||
"metal2vulkan-degrade-f16-int-conv-double-rounding"
|
||||
}
|
||||
Degradation::GradFromBias => "metal2vulkan-degrade-grad-from-bias",
|
||||
Degradation::DeviceTranscendentals => "metal2vulkan-degrade-device-transcendentals",
|
||||
Degradation::ReductionOrder => "metal2vulkan-degrade-reduction-order",
|
||||
Degradation::DeviceDenormals => "metal2vulkan-degrade-device-denormals",
|
||||
Degradation::PixelSamplerScaling => "metal2vulkan-degrade-pixel-sampler-scaling",
|
||||
Degradation::DeviceArithmetic => "metal2vulkan-degrade-device-arithmetic",
|
||||
Degradation::DeviceSignedZeroInfNan => {
|
||||
"metal2vulkan-degrade-device-signed-zero-inf-nan"
|
||||
}
|
||||
Degradation::DeviceRayIntersection => "metal2vulkan-degrade-device-ray-intersection",
|
||||
Degradation::FastMathRewrites => "metal2vulkan-degrade-fast-math-rewrites",
|
||||
Degradation::TessellationWinding => "metal2vulkan-degrade-tessellation-winding",
|
||||
Degradation::DeviceRoundedResolve => PrecisionNote::DeviceRoundedResolve,
|
||||
Degradation::DeviceReconvergence => PrecisionNote::DeviceReconvergence,
|
||||
Degradation::SimdgroupAccessOrder => PrecisionNote::SimdgroupAccessOrder,
|
||||
Degradation::DeviceFilteredMipmaps => PrecisionNote::DeviceFilteredMipmaps,
|
||||
Degradation::CappedLodBias => PrecisionNote::CappedLodBias,
|
||||
Degradation::SnormMinimumKept => PrecisionNote::SnormMinimumKept,
|
||||
Degradation::SharedExponentKept => PrecisionNote::SharedExponentKept,
|
||||
Degradation::CompressedTexelDecode => PrecisionNote::CompressedTexelDecode,
|
||||
Degradation::DepthDenormals => PrecisionNote::DepthDenormals,
|
||||
Degradation::F16FmaDoubleRounding => PrecisionNote::F16FmaDoubleRounding,
|
||||
Degradation::F16IntConvDoubleRounding => PrecisionNote::F16IntConvDoubleRounding,
|
||||
Degradation::GradFromBias => PrecisionNote::GradFromBias,
|
||||
Degradation::DeviceTranscendentals => PrecisionNote::DeviceTranscendentals,
|
||||
Degradation::ReductionOrder => PrecisionNote::ReductionOrder,
|
||||
Degradation::DeviceDenormals => PrecisionNote::DeviceDenormals,
|
||||
Degradation::PixelSamplerScaling => PrecisionNote::PixelSamplerScaling,
|
||||
Degradation::DeviceArithmetic => PrecisionNote::DeviceArithmetic,
|
||||
Degradation::DeviceSignedZeroInfNan => PrecisionNote::DeviceSignedZeroInfNan,
|
||||
Degradation::DeviceRayIntersection => PrecisionNote::DeviceRayIntersection,
|
||||
Degradation::FastMathRewrites => PrecisionNote::FastMathRewrites,
|
||||
Degradation::TessellationWinding => PrecisionNote::TessellationWinding,
|
||||
Degradation::TessellationFractionalSpacing => {
|
||||
"metal2vulkan-degrade-tessellation-fractional-spacing"
|
||||
PrecisionNote::TessellationFractionalSpacing
|
||||
}
|
||||
Degradation::TessellationFactorEdgeCases => {
|
||||
"metal2vulkan-degrade-tessellation-factor-edge-cases"
|
||||
}
|
||||
Degradation::TessellationFactorScale => {
|
||||
"metal2vulkan-degrade-tessellation-factor-scale"
|
||||
}
|
||||
Degradation::TessellationFactorInstance => {
|
||||
"metal2vulkan-degrade-tessellation-factor-instance"
|
||||
}
|
||||
Degradation::Fp8Value => "metal2vulkan-degrade-fp8-value",
|
||||
Degradation::MultisamplePosition => "metal2vulkan-degrade-multisample-position",
|
||||
Degradation::BicubicFilterArithmetic => {
|
||||
"metal2vulkan-degrade-bicubic-filter-arithmetic"
|
||||
}
|
||||
Degradation::SparseResidency => "metal2vulkan-degrade-sparse-residency",
|
||||
Degradation::DeviceNanEncoding => "metal2vulkan-degrade-device-nan-encoding",
|
||||
Degradation::RestrictedDepthRange => "metal2vulkan-degrade-restricted-depth-range",
|
||||
Degradation::CubeGradientFootprint => "metal2vulkan-degrade-cube-gradient-footprint",
|
||||
Degradation::HalfTexelConversion => "metal2vulkan-degrade-half-texel-conversion",
|
||||
Degradation::SrgbTexelDecode => "metal2vulkan-degrade-srgb-texel-decode",
|
||||
Degradation::FunctionStorageAssumed => "metal2vulkan-degrade-function-storage-assumed",
|
||||
Degradation::QuadsCountedBeforeDiscard => {
|
||||
"metal2vulkan-degrade-quads-counted-before-discard"
|
||||
}
|
||||
Degradation::ViewBaseTexelOffset => "metal2vulkan-degrade-view-base-texel-offset",
|
||||
Degradation::DeviceColorConversion => "metal2vulkan-degrade-device-color-conversion",
|
||||
Degradation::DeviceInterpolation => "metal2vulkan-degrade-device-interpolation",
|
||||
Degradation::DeviceInterpolationOffset => {
|
||||
"metal2vulkan-degrade-device-interpolation-offset"
|
||||
}
|
||||
Degradation::ExtrapolatedInterpolation => {
|
||||
"metal2vulkan-degrade-extrapolated-interpolation"
|
||||
}
|
||||
Degradation::QuadsSplitByClipping => "metal2vulkan-degrade-quads-split-by-clipping",
|
||||
Degradation::FragmentSimdgroupGrouping => {
|
||||
"metal2vulkan-degrade-fragment-simdgroup-grouping"
|
||||
}
|
||||
Degradation::BlendedWriteRounding => "metal2vulkan-degrade-blended-write-rounding",
|
||||
Degradation::RotatedBlendRounding => "metal2vulkan-degrade-rotated-blend-rounding",
|
||||
Degradation::LinkedSamplerNumbering => "metal2vulkan-degrade-linked-sampler-numbering",
|
||||
Degradation::ArgumentPixelSamplerScaling => {
|
||||
"metal2vulkan-degrade-argument-pixel-sampler-scaling"
|
||||
}
|
||||
Degradation::HalfOutputPrecision => "metal2vulkan-degrade-half-output-precision",
|
||||
Degradation::AnisotropicFilter => "metal2vulkan-degrade-anisotropic-filter",
|
||||
Degradation::DeviceAnisotropicFilter => {
|
||||
"metal2vulkan-degrade-device-anisotropic-filter"
|
||||
}
|
||||
Degradation::DevicePointSize => "metal2vulkan-degrade-device-point-size",
|
||||
Degradation::ClippedCoverageSplit => "metal2vulkan-degrade-clipped-coverage-split",
|
||||
Degradation::LoopedSampleOutputs => "metal2vulkan-degrade-looped-sample-outputs",
|
||||
Degradation::HalfOutputFastMathBlend => {
|
||||
"metal2vulkan-degrade-half-output-fast-math-blend"
|
||||
}
|
||||
Degradation::DeviceSampling => "metal2vulkan-degrade-device-sampling",
|
||||
Degradation::NativeTranscendentals => "metal2vulkan-degrade-native-transcendentals",
|
||||
Degradation::NativeDivision => "metal2vulkan-degrade-native-division",
|
||||
Degradation::NativeFma => "metal2vulkan-degrade-native-fma",
|
||||
Degradation::DeviceTexelConversion => "metal2vulkan-degrade-device-texel-conversion",
|
||||
Degradation::DeviceVertexConversion => "metal2vulkan-degrade-device-vertex-conversion",
|
||||
Degradation::NativeHalfConversion => "metal2vulkan-degrade-native-half-conversion",
|
||||
Degradation::NativeHalfQuantize => "metal2vulkan-degrade-native-half-quantize",
|
||||
Degradation::NativeNanEncoding => "metal2vulkan-degrade-native-nan-encoding",
|
||||
Degradation::NativeMinMax => "metal2vulkan-degrade-native-min-max",
|
||||
Degradation::NativeDot => "metal2vulkan-degrade-native-dot",
|
||||
Degradation::NativeMix => "metal2vulkan-degrade-native-mix",
|
||||
Degradation::DevicePackConversion => "metal2vulkan-degrade-device-pack-conversion",
|
||||
Degradation::TessellationTriangleOrder => {
|
||||
"metal2vulkan-degrade-tessellation-triangle-order"
|
||||
}
|
||||
Degradation::UnmeasuredGroupSpeculation => {
|
||||
"metal2vulkan-degrade-unmeasured-group-speculation"
|
||||
}
|
||||
Degradation::DeviceSampleLevel => "metal2vulkan-degrade-device-sample-level",
|
||||
Degradation::CoverageReadsRoundedAlpha => {
|
||||
"metal2vulkan-degrade-coverage-reads-rounded-alpha"
|
||||
}
|
||||
Degradation::DeviceAlphaCoverage => "metal2vulkan-degrade-device-alpha-coverage",
|
||||
Degradation::UnorderedFetchWithinDraw => {
|
||||
"metal2vulkan-degrade-unordered-fetch-within-draw"
|
||||
}
|
||||
Degradation::NativeLogicOperation => "metal2vulkan-degrade-native-logic-operation",
|
||||
Degradation::DeviceDepthBias => "metal2vulkan-degrade-device-depth-bias",
|
||||
Degradation::SwizzledOpaqueBlackBorder => {
|
||||
"metal2vulkan-degrade-swizzled-opaque-black-border"
|
||||
}
|
||||
Degradation::DeviceLineRasterization => {
|
||||
"metal2vulkan-degrade-device-line-rasterization"
|
||||
}
|
||||
Degradation::DeviceFragmentRuns => "metal2vulkan-degrade-device-fragment-runs",
|
||||
Degradation::DeviceOcclusionCount => "metal2vulkan-degrade-device-occlusion-count",
|
||||
Degradation::VertexSimdgroupGrouping => {
|
||||
"metal2vulkan-degrade-vertex-simdgroup-grouping"
|
||||
}
|
||||
Degradation::RestrictedDepthUpload => "metal2vulkan-degrade-restricted-depth-upload",
|
||||
Degradation::StencilOutputOverlap => "metal2vulkan-degrade-stencil-output-overlap",
|
||||
Degradation::TessellationFactorEdgeCases => PrecisionNote::TessellationFactorEdgeCases,
|
||||
Degradation::TessellationFactorScale => PrecisionNote::TessellationFactorScale,
|
||||
Degradation::TessellationFactorInstance => PrecisionNote::TessellationFactorInstance,
|
||||
Degradation::Fp8Value => PrecisionNote::Fp8Value,
|
||||
Degradation::MultisamplePosition => PrecisionNote::MultisamplePosition,
|
||||
Degradation::BicubicFilterArithmetic => PrecisionNote::BicubicFilterArithmetic,
|
||||
Degradation::SparseResidency => PrecisionNote::SparseResidency,
|
||||
Degradation::DeviceNanEncoding => PrecisionNote::DeviceNanEncoding,
|
||||
Degradation::RestrictedDepthRange => PrecisionNote::RestrictedDepthRange,
|
||||
Degradation::CubeGradientFootprint => PrecisionNote::CubeGradientFootprint,
|
||||
Degradation::HalfTexelConversion => PrecisionNote::HalfTexelConversion,
|
||||
Degradation::SrgbTexelDecode => PrecisionNote::SrgbTexelDecode,
|
||||
Degradation::FunctionStorageAssumed => PrecisionNote::FunctionStorageAssumed,
|
||||
Degradation::QuadsCountedBeforeDiscard => PrecisionNote::QuadsCountedBeforeDiscard,
|
||||
Degradation::ViewBaseTexelOffset => PrecisionNote::ViewBaseTexelOffset,
|
||||
Degradation::DeviceColorConversion => PrecisionNote::DeviceColorConversion,
|
||||
Degradation::DeviceInterpolation => PrecisionNote::DeviceInterpolation,
|
||||
Degradation::DeviceInterpolationOffset => PrecisionNote::DeviceInterpolationOffset,
|
||||
Degradation::ExtrapolatedInterpolation => PrecisionNote::ExtrapolatedInterpolation,
|
||||
Degradation::QuadsSplitByClipping => PrecisionNote::QuadsSplitByClipping,
|
||||
Degradation::FragmentSimdgroupGrouping => PrecisionNote::FragmentSimdgroupGrouping,
|
||||
Degradation::BlendedWriteRounding => PrecisionNote::BlendedWriteRounding,
|
||||
Degradation::RotatedBlendRounding => PrecisionNote::RotatedBlendRounding,
|
||||
Degradation::LinkedSamplerNumbering => PrecisionNote::LinkedSamplerNumbering,
|
||||
Degradation::ArgumentPixelSamplerScaling => PrecisionNote::ArgumentPixelSamplerScaling,
|
||||
Degradation::HalfOutputPrecision => PrecisionNote::HalfOutputPrecision,
|
||||
Degradation::AnisotropicFilter => PrecisionNote::AnisotropicFilter,
|
||||
Degradation::DeviceAnisotropicFilter => PrecisionNote::DeviceAnisotropicFilter,
|
||||
Degradation::DevicePointSize => PrecisionNote::DevicePointSize,
|
||||
Degradation::ClippedCoverageSplit => PrecisionNote::ClippedCoverageSplit,
|
||||
Degradation::LoopedSampleOutputs => PrecisionNote::LoopedSampleOutputs,
|
||||
Degradation::HalfOutputFastMathBlend => PrecisionNote::HalfOutputFastMathBlend,
|
||||
Degradation::DeviceSampling => PrecisionNote::DeviceSampling,
|
||||
Degradation::NativeTranscendentals => PrecisionNote::NativeTranscendentals,
|
||||
Degradation::NativeDivision => PrecisionNote::NativeDivision,
|
||||
Degradation::NativeFma => PrecisionNote::NativeFma,
|
||||
Degradation::DeviceTexelConversion => PrecisionNote::DeviceTexelConversion,
|
||||
Degradation::DeviceVertexConversion => PrecisionNote::DeviceVertexConversion,
|
||||
Degradation::NativeHalfConversion => PrecisionNote::NativeHalfConversion,
|
||||
Degradation::NativeHalfQuantize => PrecisionNote::NativeHalfQuantize,
|
||||
Degradation::NativeNanEncoding => PrecisionNote::NativeNanEncoding,
|
||||
Degradation::NativeMinMax => PrecisionNote::NativeMinMax,
|
||||
Degradation::NativeDot => PrecisionNote::NativeDot,
|
||||
Degradation::NativeMix => PrecisionNote::NativeMix,
|
||||
Degradation::DevicePackConversion => PrecisionNote::DevicePackConversion,
|
||||
Degradation::TessellationTriangleOrder => PrecisionNote::TessellationTriangleOrder,
|
||||
Degradation::UnmeasuredGroupSpeculation => PrecisionNote::UnmeasuredGroupSpeculation,
|
||||
Degradation::DeviceSampleLevel => PrecisionNote::DeviceSampleLevel,
|
||||
Degradation::CoverageReadsRoundedAlpha => PrecisionNote::CoverageReadsRoundedAlpha,
|
||||
Degradation::DeviceAlphaCoverage => PrecisionNote::DeviceAlphaCoverage,
|
||||
Degradation::UnorderedFetchWithinDraw => PrecisionNote::UnorderedFetchWithinDraw,
|
||||
Degradation::NativeLogicOperation => PrecisionNote::NativeLogicOperation,
|
||||
Degradation::DeviceDepthBias => PrecisionNote::DeviceDepthBias,
|
||||
Degradation::SwizzledOpaqueBlackBorder => PrecisionNote::SwizzledOpaqueBlackBorder,
|
||||
Degradation::DeviceLineRasterization => PrecisionNote::DeviceLineRasterization,
|
||||
Degradation::DeviceFragmentRuns => PrecisionNote::DeviceFragmentRuns,
|
||||
Degradation::DeviceOcclusionCount => PrecisionNote::DeviceOcclusionCount,
|
||||
Degradation::VertexSimdgroupGrouping => PrecisionNote::VertexSimdgroupGrouping,
|
||||
Degradation::RestrictedDepthUpload => PrecisionNote::RestrictedDepthUpload,
|
||||
Degradation::StencilOutputOverlap => PrecisionNote::StencilOutputOverlap,
|
||||
Degradation::DeviceHalfDenormals => PrecisionNote::DeviceHalfDenormals,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -481,6 +452,7 @@ impl Degradation {
|
||||
PrecisionNote::VertexSimdgroupGrouping => Degradation::VertexSimdgroupGrouping,
|
||||
PrecisionNote::RestrictedDepthUpload => Degradation::RestrictedDepthUpload,
|
||||
PrecisionNote::StencilOutputOverlap => Degradation::StencilOutputOverlap,
|
||||
PrecisionNote::DeviceHalfDenormals => Degradation::DeviceHalfDenormals,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,16 @@
|
||||
//! A row is held only against the cases a run selected, so replaying one case does not read every
|
||||
//! other row as fixed.
|
||||
//!
|
||||
//! # More than one answer
|
||||
//!
|
||||
//! A row's answer is one answer, except where the hosts a venue's description covers answer the
|
||||
//! site differently by a property that description does not state: llvmpipe of one Mesa and LLVM
|
||||
//! stores the `x3` sites of `fetch-ordered-*-srgb` at 6,304 elements on one x86-64 AVX-512 host
|
||||
//! and at 6,496 on others. Such a row lists each answer recorded there, with [`ANSWER_SEPARATOR`]
|
||||
//! between them, and its gap names the run each came from. It covers each answer it lists and no
|
||||
//! other, and is held while the run answers any of them ([`KnownGap::answers`]): a third answer is
|
||||
//! still a new gap, and a site that no longer diverges still reads the row as fixed.
|
||||
//!
|
||||
//! # Typed reasons
|
||||
//!
|
||||
//! Three reasons are the ledger's own vocabulary ([`Reason`]), stated at the head of a row's last
|
||||
@@ -74,6 +84,9 @@ pub const LEDGER_FILE: &str = "known-gaps-rt.tsv";
|
||||
/// The venue field of a row that applies to every venue.
|
||||
pub const EVERY_VENUE: &str = "*";
|
||||
|
||||
/// What stands between the answers of a row that lists more than one ([`KnownGap::answers`]).
|
||||
pub const ANSWER_SEPARATOR: &str = " | ";
|
||||
|
||||
/// The verdict a row expects at its site.
|
||||
///
|
||||
/// Only these two. A case with no Metal answer, a stale recording and a case the venue could not
|
||||
@@ -135,7 +148,9 @@ pub struct KnownGap {
|
||||
/// What the run answers there, as the report prints it: our typed error for a refusal, and for
|
||||
/// a divergence the one leaf fact that moved, which names Metal's value and ours. Part of the
|
||||
/// row's identity, so a gap that changed into another gap at the same site is a new gap rather
|
||||
/// than this one.
|
||||
/// than this one. Where the venue's hosts answer the site differently by a property its
|
||||
/// description does not state, it lists each answer recorded there, with [`ANSWER_SEPARATOR`]
|
||||
/// between them ([`KnownGap::answers`]).
|
||||
pub answer: String,
|
||||
/// The gap the row is waiting on, in words: what Metal does, what we do instead, and where the
|
||||
/// fix belongs. Not compared — it is what a reader needs — but a row must carry one.
|
||||
@@ -150,10 +165,17 @@ impl KnownGap {
|
||||
Reason::of(&self.waiting_on).unwrap_or(Reason::Words)
|
||||
}
|
||||
|
||||
/// What identifies the row within a venue: the case, the verdict it expects, the site and the
|
||||
/// answer there.
|
||||
fn key(&self) -> (&str, Expects, &str, &str) {
|
||||
(&self.case, self.expects, &self.site, &self.answer)
|
||||
/// The answers the row covers at its site: its answer, or each of the answers it lists with
|
||||
/// [`ANSWER_SEPARATOR`] between them.
|
||||
pub fn answers(&self) -> impl Iterator<Item = &str> {
|
||||
self.answer.split(ANSWER_SEPARATOR).map(str::trim)
|
||||
}
|
||||
|
||||
/// Whether the row, within a venue it covers, is the gap a run held: the same case, verdict
|
||||
/// and site, and one of its answers.
|
||||
fn covers(&self, (case, expects, site, answer): (&str, Expects, &str, &str)) -> bool {
|
||||
(self.case.as_str(), self.expects, self.site.as_str()) == (case, expects, site)
|
||||
&& self.answers().any(|listed| listed == answer)
|
||||
}
|
||||
|
||||
/// Whether the row is expected on `venue`.
|
||||
@@ -623,7 +645,7 @@ pub fn against(rows: &[Replayed], ledger: &[KnownGap]) -> Vec<Expectation> {
|
||||
for (case, expects, site, answer) in gaps {
|
||||
let listed = ledger.iter().any(|gap| {
|
||||
gap.covers_venue(&row.venue)
|
||||
&& gap.key() == (case, *expects, site.as_str(), answer.as_str())
|
||||
&& gap.covers((case, *expects, site.as_str(), answer.as_str()))
|
||||
});
|
||||
if !listed {
|
||||
let listed = ledger
|
||||
@@ -654,7 +676,7 @@ pub fn against(rows: &[Replayed], ledger: &[KnownGap]) -> Vec<Expectation> {
|
||||
continue;
|
||||
}
|
||||
let still = gaps.iter().any(|(case, expects, site, answer)| {
|
||||
(*case, *expects, site.as_str(), answer.as_str()) == gap.key()
|
||||
gap.covers((case, *expects, site.as_str(), answer.as_str()))
|
||||
});
|
||||
if !still {
|
||||
let now = if matches!(row.verdict, Verdict::LacksFeature { .. }) {
|
||||
|
||||
@@ -72,6 +72,7 @@ pub mod host_pages;
|
||||
pub mod indirect_commands;
|
||||
pub mod known_gaps;
|
||||
pub mod library_facts;
|
||||
pub mod managed_naming;
|
||||
pub mod measured;
|
||||
pub mod mesh_descriptors;
|
||||
pub mod pass_descriptors;
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
//! Which commit takes a Managed buffer's named range to the GPU, on a device that keeps two copies
|
||||
//! of it.
|
||||
//!
|
||||
//! `MTLBuffer.h` has a write into a Managed buffer's `contents` make the range "undefined for any
|
||||
//! accesses by the GPU" until a `didModifyRange:` "followed by a commit of the MTLCommandBuffer that
|
||||
//! will access the buffer". What a discrete Mac GPU answers beyond that is measured: one sequence
|
||||
//! a row, each the same up to its reader.
|
||||
//!
|
||||
//! 1. A Managed buffer of [`LENGTH`] bytes, [`Content::Synced`] written, named and taken by a
|
||||
//! committed blit that copies it, waited for.
|
||||
//! 2. [`Content::Named`] written and named; a command buffer whose one blit fills another buffer
|
||||
//! is committed and waited for.
|
||||
//! 3. The row's reader ([`Way`]) is encoded into a command buffer, [`Content::Later`] is written
|
||||
//! with no second name, and that command buffer is committed and waited for.
|
||||
//!
|
||||
//! The reader answers what it read ([`Way::reads`]), so the row's site is which of the three
|
||||
//! contents it saw ([`Read`]). On an AMD Radeon Pro 5300M under macOS 26.7.1, 8 rounds each, the
|
||||
//! readers that name the buffer (a compute slot, `useResource:`, a vertex slot with a draw, a blit
|
||||
//! copy's source) read [`Content::Later`]: the range is taken at the first commit whose encoders
|
||||
//! name the buffer, with its bytes as of that commit, and the commit of step 2 took nothing. A
|
||||
//! reader that reaches the buffer through its address alone reads [`Content::Synced`], the bytes
|
||||
//! the GPU's copy last took. An Intel UHD Graphics 630, which keeps one copy, read
|
||||
//! [`Content::Later`] everywhere.
|
||||
|
||||
/// The bytes of the Managed buffer: 16 `float4` colours.
|
||||
pub const LENGTH: usize = 256;
|
||||
|
||||
/// The `float4` elements the buffer holds.
|
||||
pub const ELEMENTS: usize = LENGTH / 16;
|
||||
|
||||
/// The side of the render row's target, in texels.
|
||||
pub const TARGET_SIDE: u32 = 4;
|
||||
|
||||
/// The three contents the sequence writes, each [`LENGTH`] bytes of one colour.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum Content {
|
||||
/// Written, named and taken first: opaque red.
|
||||
Synced,
|
||||
/// Written and named after it, before a commit that does not name the buffer: opaque green.
|
||||
Named,
|
||||
/// Written after the reader is encoded, with no second name: opaque blue.
|
||||
Later,
|
||||
}
|
||||
|
||||
impl Content {
|
||||
/// The contents in the order the sequence writes them.
|
||||
pub const ALL: [Content; 3] = [Content::Synced, Content::Named, Content::Later];
|
||||
|
||||
/// The colour every element holds.
|
||||
pub const fn color(self) -> [f32; 4] {
|
||||
match self {
|
||||
Content::Synced => [1.0, 0.0, 0.0, 1.0],
|
||||
Content::Named => [0.0, 1.0, 0.0, 1.0],
|
||||
Content::Later => [0.0, 0.0, 1.0, 1.0],
|
||||
}
|
||||
}
|
||||
|
||||
/// The buffer's bytes.
|
||||
pub fn bytes(self) -> Vec<u8> {
|
||||
let element: Vec<u8> = self.color().iter().flat_map(|c| c.to_le_bytes()).collect();
|
||||
element.repeat(ELEMENTS)
|
||||
}
|
||||
|
||||
/// The word the row's site holds where the reader read this content.
|
||||
pub const fn word(self) -> &'static str {
|
||||
match self {
|
||||
Content::Synced => "the bytes the GPU's copy last took",
|
||||
Content::Named => "the bytes as the range was named",
|
||||
Content::Later => "the bytes as of the reader's commit",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The reader of a row: how its command buffer reaches the Managed buffer.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum Way {
|
||||
/// `scale_and_offset` (`examples/runtime_examples`) with the buffer at its slot 0, scale 1:
|
||||
/// its output is each element's word plus its index.
|
||||
ComputeSlot,
|
||||
/// `ab_address` (`ab_pointers`), the buffer's `gpuAddress` in a constant buffer at slot 0, the
|
||||
/// buffer declared by `useResource:usage:` read: its output is the buffer's words.
|
||||
Declared,
|
||||
/// `ab_address` as [`Way::Declared`], the buffer named to no encoder.
|
||||
Address,
|
||||
/// `colored_vertex` and `colored_fragment` (`examples/runtime_examples`) with the buffer as
|
||||
/// the colours at vertex slot 1, a triangle over the whole [`TARGET_SIDE`] square target
|
||||
/// drawn: its target's texels, copied out by a blit.
|
||||
VertexSlot,
|
||||
/// A blit copy of the buffer's [`LENGTH`] bytes into a Shared buffer.
|
||||
BlitSource,
|
||||
}
|
||||
|
||||
impl Way {
|
||||
/// The word a row's name and inputs carry.
|
||||
pub const fn name(self) -> &'static str {
|
||||
match self {
|
||||
Way::ComputeSlot => "compute-slot",
|
||||
Way::Declared => "declared",
|
||||
Way::Address => "address",
|
||||
Way::VertexSlot => "vertex-slot",
|
||||
Way::BlitSource => "blit-source",
|
||||
}
|
||||
}
|
||||
|
||||
/// What the reader answers where the buffer holds `content`.
|
||||
pub fn reads(self, content: Content) -> Vec<u8> {
|
||||
match self {
|
||||
Way::ComputeSlot => {
|
||||
let bytes = content.bytes();
|
||||
let (words, _) = bytes.as_chunks::<4>();
|
||||
let floats = (words.iter().enumerate())
|
||||
.map(|(index, word)| f32::from_le_bytes(*word) + index as f32);
|
||||
floats.flat_map(f32::to_le_bytes).collect()
|
||||
}
|
||||
Way::Declared | Way::Address | Way::BlitSource => content.bytes(),
|
||||
Way::VertexSlot => {
|
||||
let texel = content.color().map(|c| (c * 255.0) as u8);
|
||||
texel.repeat((TARGET_SIDE * TARGET_SIDE) as usize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Which content `read` is, where it is one.
|
||||
pub fn read(self, read: &[u8]) -> Read {
|
||||
match Content::ALL.into_iter().find(|&c| self.reads(c) == read) {
|
||||
Some(content) => Read::Content(content),
|
||||
None => Read::Other,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// What a row's reader read.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum Read {
|
||||
/// One of the three contents.
|
||||
Content(Content),
|
||||
/// None of them.
|
||||
Other,
|
||||
}
|
||||
|
||||
impl Read {
|
||||
/// The word the row's site holds.
|
||||
pub const fn word(self) -> &'static str {
|
||||
match self {
|
||||
Read::Content(content) => content.word(),
|
||||
Read::Other => "none of the three contents",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The libraries a row's reader is made of, as the side made them.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Libraries {
|
||||
/// `examples/runtime_examples`: `scale_and_offset`, `colored_vertex`, `colored_fragment`.
|
||||
pub examples: crate::case::Handle,
|
||||
/// `ab_pointers`: `ab_address`.
|
||||
pub pointers: crate::case::Handle,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
/// Every reader tells the three contents apart.
|
||||
#[test]
|
||||
fn every_reader_tells_the_contents_apart() {
|
||||
for way in [
|
||||
Way::ComputeSlot,
|
||||
Way::Declared,
|
||||
Way::Address,
|
||||
Way::VertexSlot,
|
||||
Way::BlitSource,
|
||||
] {
|
||||
for content in Content::ALL {
|
||||
assert_eq!(way.read(&way.reads(content)), Read::Content(content));
|
||||
}
|
||||
assert_eq!(way.read(&[]), Read::Other, "{way:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2051,6 +2051,33 @@ fn linked_counts(linked: &Retained<MTLLinkedFunctions>) -> LinkedCounts {
|
||||
}
|
||||
}
|
||||
|
||||
/// Every tessellation field of `state` on `descriptor`.
|
||||
fn set_tessellation(
|
||||
descriptor: &MTLRenderPipelineDescriptor,
|
||||
state: &crate::render::TessellationState,
|
||||
) {
|
||||
// SAFETY: each value is an enumerator of the SDK's own table or, for the factor, a count the
|
||||
// case keeps inside `MTLDevice`'s documented 1..=64, and the descriptor is the caller's own.
|
||||
// The three setters `objc2` marks unsafe take a raw `NSUInteger`.
|
||||
unsafe {
|
||||
descriptor.setMaxTessellationFactor(state.max_factor as usize);
|
||||
descriptor.setTessellationPartitionMode(MTLTessellationPartitionMode(
|
||||
state.partition.as_raw() as usize,
|
||||
));
|
||||
descriptor.setTessellationControlPointIndexType(MTLTessellationControlPointIndexType(
|
||||
state.control_point_index_type.as_raw() as usize,
|
||||
));
|
||||
}
|
||||
descriptor.setTessellationFactorFormat(MTLTessellationFactorFormat(
|
||||
state.factor_format.as_raw() as usize,
|
||||
));
|
||||
descriptor.setTessellationFactorStepFunction(MTLTessellationFactorStepFunction(
|
||||
state.factor_step.as_raw() as usize,
|
||||
));
|
||||
descriptor.setTessellationOutputWindingOrder(MTLWinding(state.winding.as_raw() as usize));
|
||||
descriptor.setTessellationFactorScaleEnabled(state.factor_scale_enabled);
|
||||
}
|
||||
|
||||
/// Metal's vertex descriptor for `layout`. The case's enumerations are Metal's own, so each one
|
||||
/// crosses as its raw value.
|
||||
fn vertex_descriptor(layout: &crate::render::VertexLayout<'_>) -> Retained<MTLVertexDescriptor> {
|
||||
@@ -4603,6 +4630,15 @@ impl Side for MetalSide {
|
||||
descriptor.setFragmentFunction(fragment);
|
||||
descriptor.setRasterizationEnabled(fragment.is_some());
|
||||
descriptor.setSupportIndirectCommandBuffers(fragment.is_some());
|
||||
// The commands' state takes the run's vertex descriptor and tessellation state.
|
||||
if fragment.is_some() {
|
||||
if let Some(state) = &run.tessellation {
|
||||
set_tessellation(&descriptor, state);
|
||||
}
|
||||
if let Some(layout) = &run.vertex_layout {
|
||||
descriptor.setVertexDescriptor(Some(&vertex_descriptor(layout)));
|
||||
}
|
||||
}
|
||||
// SAFETY: attachment 0 is inside the eight every Metal pipeline descriptor holds.
|
||||
let attachment =
|
||||
unsafe { descriptor.colorAttachments().objectAtIndexedSubscript(0) };
|
||||
@@ -4631,7 +4667,9 @@ impl Side for MetalSide {
|
||||
}
|
||||
};
|
||||
let descriptor = MTLIndirectCommandBufferDescriptor::new();
|
||||
descriptor.setCommandTypes(MTLIndirectCommandType::DrawIndexed);
|
||||
descriptor.setCommandTypes(MTLIndirectCommandType::from_bits_retain(
|
||||
run.command_types.as_raw() as usize,
|
||||
));
|
||||
descriptor.setInheritPipelineState(true);
|
||||
descriptor.setInheritBuffers(false);
|
||||
descriptor.setMaxVertexBufferBindCount(run.bind_counts[0] as usize);
|
||||
@@ -8567,29 +8605,7 @@ impl MetalSide {
|
||||
// tessellation state leaves Metal's own defaults alone, which is what every other family's
|
||||
// pipeline has always been made with.
|
||||
if let Some(state) = &spec.tessellation {
|
||||
// SAFETY: each value is an enumerator of the SDK's own table or, for the factor, a
|
||||
// count the case keeps inside `MTLDevice`'s documented 1..=64, and the descriptor is
|
||||
// this call's own. The three setters `objc2` marks unsafe take a raw `NSUInteger`.
|
||||
unsafe {
|
||||
descriptor.setMaxTessellationFactor(state.max_factor as usize);
|
||||
descriptor.setTessellationPartitionMode(MTLTessellationPartitionMode(
|
||||
state.partition.as_raw() as usize,
|
||||
));
|
||||
descriptor.setTessellationControlPointIndexType(
|
||||
MTLTessellationControlPointIndexType(
|
||||
state.control_point_index_type.as_raw() as usize
|
||||
),
|
||||
);
|
||||
}
|
||||
descriptor.setTessellationFactorFormat(MTLTessellationFactorFormat(
|
||||
state.factor_format.as_raw() as usize,
|
||||
));
|
||||
descriptor.setTessellationFactorStepFunction(MTLTessellationFactorStepFunction(
|
||||
state.factor_step.as_raw() as usize,
|
||||
));
|
||||
descriptor
|
||||
.setTessellationOutputWindingOrder(MTLWinding(state.winding.as_raw() as usize));
|
||||
descriptor.setTessellationFactorScaleEnabled(state.factor_scale_enabled);
|
||||
set_tessellation(&descriptor, state);
|
||||
}
|
||||
if let Some(layout) = &spec.vertex_layout {
|
||||
descriptor.setVertexDescriptor(Some(&vertex_descriptor(layout)));
|
||||
|
||||
@@ -93,7 +93,7 @@ pub fn record(
|
||||
reason: reason.to_owned(),
|
||||
});
|
||||
}
|
||||
check_host()?;
|
||||
check_host(&*side)?;
|
||||
let inputs = case.inputs().map_err(|why| RecordError::Case {
|
||||
case: case.name().to_owned(),
|
||||
why,
|
||||
@@ -213,21 +213,12 @@ fn add(outcomes: &mut Vec<Outcome>, transcript: Transcript) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Refuse to record on a host that is not the oracle the suite names.
|
||||
/// Refuse to record on a host that is not the oracle the suite names: `side`'s macOS release and
|
||||
/// build ([`Side::macos_release`]).
|
||||
#[cfg(target_os = "macos")]
|
||||
fn check_host() -> Result<(), RecordError> {
|
||||
let read = |flag: &str| {
|
||||
std::process::Command::new("/usr/bin/sw_vers")
|
||||
.arg(flag)
|
||||
.output()
|
||||
.ok()
|
||||
.filter(|output| output.status.success())
|
||||
.map(|output| String::from_utf8_lossy(&output.stdout).trim().to_owned())
|
||||
.unwrap_or_default()
|
||||
};
|
||||
fn check_host(side: &dyn Side) -> Result<(), RecordError> {
|
||||
use crate::recording::{ORACLE_CHIP, ORACLE_OS_BUILD, ORACLE_OS_VERSION};
|
||||
let version = read("-productVersion");
|
||||
let build = read("-buildVersion");
|
||||
let (version, build) = side.macos_release();
|
||||
if version == ORACLE_OS_VERSION && build == ORACLE_OS_BUILD {
|
||||
return Ok(());
|
||||
}
|
||||
@@ -237,8 +228,24 @@ fn check_host() -> Result<(), RecordError> {
|
||||
})
|
||||
}
|
||||
|
||||
/// This host's macOS release and build, as `sw_vers -productVersion` and `-buildVersion` answer
|
||||
/// them; each empty where it does not answer.
|
||||
#[cfg(target_os = "macos")]
|
||||
pub(crate) fn sw_vers() -> (String, String) {
|
||||
let read = |flag: &str| {
|
||||
std::process::Command::new("/usr/bin/sw_vers")
|
||||
.arg(flag)
|
||||
.output()
|
||||
.ok()
|
||||
.filter(|output| output.status.success())
|
||||
.map(|output| String::from_utf8_lossy(&output.stdout).trim().to_owned())
|
||||
.unwrap_or_default()
|
||||
};
|
||||
(read("-productVersion"), read("-buildVersion"))
|
||||
}
|
||||
|
||||
/// There is no Metal to record from off macOS.
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
fn check_host() -> Result<(), RecordError> {
|
||||
fn check_host(_side: &dyn Side) -> Result<(), RecordError> {
|
||||
Err(RecordError::NoMetal)
|
||||
}
|
||||
@@ -43,6 +43,12 @@ pub const ORACLE_CHIP: &str = "apple-m3-max";
|
||||
/// recordings say which chip they came from rather than implying the oracle's.
|
||||
pub const APPLE_M4: &str = "apple-m4";
|
||||
|
||||
/// The discrete Mac GPU two families' carried answers were measured on: the Managed-buffer family's
|
||||
/// table ([`crate::cases::managed_naming`]), as the oracle keeps one copy of a Managed buffer and
|
||||
/// this one two, and the sample positions family's rows at 8 samples
|
||||
/// ([`crate::cases::sample_positions`]), as the oracle renders no 8 samples and this one does.
|
||||
pub const AMD_RADEON_PRO_5300M: &str = "amd-radeon-pro-5300m";
|
||||
|
||||
/// The macOS release this round records on, as macOS names it.
|
||||
pub const ORACLE_OS_VERSION: &str = "27.0.1";
|
||||
|
||||
|
||||
@@ -452,7 +452,9 @@ pub fn reads_opaque_black_border(spec: &crate::case::SamplerSpec) -> bool {
|
||||
/// - **maths**: the native-maths class (`native-transcendentals`, `native-division`, `native-fma`,
|
||||
/// `native-dot`, `native-mix`, `native-min-max`, `native-nan-encoding`), the device's functions
|
||||
/// and precision bounds (`device-transcendentals`, `device-arithmetic`), the device's denormals
|
||||
/// and NaN bits (`device-denormals`, `device-nan-encoding`), and the device's compiler's grouping
|
||||
/// and NaN bits (`device-denormals`, `device-nan-encoding`), the device's half denormals where
|
||||
/// it computes `half` under the 16-bit float controls without `DenormPreserve` for 16 bits, the
|
||||
/// one form built there (`device-half-denormals`), and the device's compiler's grouping
|
||||
/// and fusion of the fast-math arithmetic the AIR's flags let it rewrite (`fast-math-rewrites`:
|
||||
/// the module states each operation in the AIR's order and reproduces no grouping of Metal's);
|
||||
/// - **rounding**: the native-half class (`native-half-conversion`, `native-half-quantize`), and
|
||||
@@ -505,6 +507,7 @@ pub const NATIVE_NOTES: &[crate::degradation::Degradation] = {
|
||||
D::DeviceTranscendentals,
|
||||
D::DeviceArithmetic,
|
||||
D::DeviceDenormals,
|
||||
D::DeviceHalfDenormals,
|
||||
D::DeviceNanEncoding,
|
||||
D::FastMathRewrites,
|
||||
D::NativeHalfConversion,
|
||||
|
||||
@@ -50,6 +50,7 @@ mod fences;
|
||||
pub(crate) mod fields;
|
||||
mod functions;
|
||||
mod heap_sizes;
|
||||
mod managed_naming;
|
||||
mod render;
|
||||
mod state_facts;
|
||||
mod states;
|
||||
@@ -357,6 +358,9 @@ pub struct RtSide<'a> {
|
||||
/// Each buffer, with the block it lies in, which it alone takes.
|
||||
buffers: Vec<(rt::Buffer, rt::Block)>,
|
||||
textures: Vec<rt::Texture>,
|
||||
/// The textures of [`textures`](Self::textures) that are shareable: each the shared creator
|
||||
/// made ([`Side::shared_texture`]), and each a handle opened ([`Side::shared_texture_handle`]).
|
||||
shareable: BTreeSet<u32>,
|
||||
command_buffers: Vec<rt::CommandBuffer>,
|
||||
samplers: Vec<rt::SamplerState>,
|
||||
render_pipelines: Vec<rt::RenderPipelineState>,
|
||||
@@ -393,6 +397,7 @@ impl<'a> RtSide<'a> {
|
||||
pipelines: Vec::new(),
|
||||
buffers: Vec::new(),
|
||||
textures: Vec::new(),
|
||||
shareable: BTreeSet::new(),
|
||||
command_buffers: Vec::new(),
|
||||
samplers: Vec::new(),
|
||||
render_pipelines: Vec::new(),
|
||||
@@ -1118,11 +1123,11 @@ impl Side for RtSide<'_> {
|
||||
Ok(self.keep_texture(view))
|
||||
}
|
||||
|
||||
/// The view's shape and swizzle, read of its descriptor; its parent's facts are the
|
||||
/// consumer's own
|
||||
/// The view's shape and swizzle, read of its descriptor; its parent's facts and `shareable` are
|
||||
/// the consumer's own
|
||||
/// ([`ConsumerObject::TextureViewParents`](crate::known_gaps::ConsumerObject::TextureViewParents)):
|
||||
/// the runtime's view keeps the texture whose image it reads and no getter, and makes no
|
||||
/// shareable texture.
|
||||
/// the runtime's view keeps the texture whose image it reads and no getter, and the consumer
|
||||
/// keeps what it shared.
|
||||
fn texture_view_facts(
|
||||
&mut self,
|
||||
texture: Handle,
|
||||
@@ -1145,6 +1150,66 @@ impl Side for RtSide<'_> {
|
||||
})
|
||||
}
|
||||
|
||||
/// `newSharedTextureWithDescriptor:` as the runtime's consumer answers it on the runtime's one
|
||||
/// device, which every guest process shares: the texture `newTextureWithDescriptor:` makes,
|
||||
/// kept as shareable. Metal answers nil outside `Private` storage and for a format it makes no
|
||||
/// texture of from a descriptor alone
|
||||
/// ([`WITHOUT_TEXTURES`](crate::texture_query::WITHOUT_TEXTURES)), measured on an Apple M3 Max
|
||||
/// (`shared-creator-padded-format-storage`, `shared-creator-extended-range-samples`), and so
|
||||
/// does this.
|
||||
fn shared_texture(&mut self, query: &crate::texture_query::HeapTextureQuery) -> Answer<Handle> {
|
||||
let unshared = query.storage != crate::texture_query::Storage::Private;
|
||||
if unshared || crate::texture_query::WITHOUT_TEXTURES.contains(&query.format) {
|
||||
return Err(Failure::named(
|
||||
"Nil",
|
||||
format!(
|
||||
"newSharedTextureWithDescriptor: answers nil for {}",
|
||||
query.site()
|
||||
),
|
||||
));
|
||||
}
|
||||
let descriptor = queried(query);
|
||||
let index = (self.on).texture_index(descriptor.pixel_format, descriptor.usage);
|
||||
let texture = (self.on.device.new_texture(&descriptor, index))
|
||||
.map_err(|error| Failure::of_rt(&error))?;
|
||||
let shared = self.keep_texture(texture);
|
||||
self.shareable.insert(shared.0);
|
||||
Ok(shared)
|
||||
}
|
||||
|
||||
/// `newSharedTextureHandle` and `newSharedTextureWithHandle:` as the runtime's consumer
|
||||
/// answers them on the runtime's one device: the handle is the consumer's own, of that device,
|
||||
/// and the texture it opens is a clone of the same `Texture`, shareable as its texture is. A
|
||||
/// texture that is not shareable answers nil, as the cases model Metal (they never ask one).
|
||||
fn shared_texture_handle(
|
||||
&mut self,
|
||||
texture: Handle,
|
||||
) -> Answer<crate::texture_views::SharedHandleFacts> {
|
||||
if !self.shareable.contains(&texture.0) {
|
||||
return Err(Failure::named(
|
||||
"Nil",
|
||||
format!(
|
||||
"newSharedTextureHandle of texture {}, which is not shareable",
|
||||
texture.0
|
||||
),
|
||||
));
|
||||
}
|
||||
let opened = self.held_texture(texture)?.clone();
|
||||
let d = opened.descriptor();
|
||||
let facts = crate::texture_views::SharedHandleFacts {
|
||||
own_device: true,
|
||||
opens: true,
|
||||
opened_shareable: true,
|
||||
opened_width: d.width.into(),
|
||||
opened_height: d.height.into(),
|
||||
opened_levels: d.mipmap_level_count.into(),
|
||||
};
|
||||
// Kept as the Metal side keeps the texture it opened.
|
||||
let held = keep(&mut self.textures, opened);
|
||||
self.shareable.insert(held.0);
|
||||
Ok(facts)
|
||||
}
|
||||
|
||||
fn dispatch(
|
||||
&mut self,
|
||||
pipeline: Handle,
|
||||
@@ -1809,6 +1874,14 @@ impl Side for RtSide<'_> {
|
||||
Ok(keep(&mut self.textures, texture))
|
||||
}
|
||||
|
||||
fn managed_naming(
|
||||
&mut self,
|
||||
way: crate::managed_naming::Way,
|
||||
libraries: crate::managed_naming::Libraries,
|
||||
) -> Answer<Vec<u8>> {
|
||||
self.managed_naming_run(way, libraries)
|
||||
}
|
||||
|
||||
fn empty_command_buffers(&mut self) -> Answer<EmptyCommandBuffers> {
|
||||
let of_rt = |error: rt::Error| Failure::of_rt(&error);
|
||||
let order: Arc<Mutex<Vec<String>>> = Arc::default();
|
||||
|
||||
@@ -76,7 +76,7 @@ pub(crate) fn pipeline_fields(spec: &RenderPipelineSpec<'_>) -> Answer<PipelineF
|
||||
|
||||
/// The runtime's `TessellationDescriptor` for `state`: every field the case names, since the
|
||||
/// vocabulary is Metal's own and there is no second spelling to keep in step.
|
||||
fn tessellation_descriptor(
|
||||
pub(crate) fn tessellation_descriptor(
|
||||
state: &crate::render::TessellationState,
|
||||
) -> metal2vulkan::pipeline::TessellationDescriptor {
|
||||
let mut descriptor = metal2vulkan::pipeline::TessellationDescriptor::default();
|
||||
@@ -92,7 +92,7 @@ fn tessellation_descriptor(
|
||||
|
||||
/// The runtime's vertex descriptor for `layout`: the same attribute indices, buffer indices and
|
||||
/// step functions the case states, so both sides fetch the same way.
|
||||
fn vertex_descriptor(layout: &crate::render::VertexLayout<'_>) -> VertexDescriptor {
|
||||
pub(crate) fn vertex_descriptor(layout: &crate::render::VertexLayout<'_>) -> VertexDescriptor {
|
||||
let mut descriptor = VertexDescriptor::new();
|
||||
for attribute in layout.attributes {
|
||||
descriptor.attributes.insert(
|
||||
|
||||
@@ -7,18 +7,19 @@
|
||||
//! places by before it answers it, and answers the failure where it does not hold:
|
||||
//!
|
||||
//! 1. the alignment is a power of two, for every query;
|
||||
//! 2. for a Private query, a heap of `align + size` bytes takes a texture of the descriptor at
|
||||
//! offset `align`;
|
||||
//! 2. for a Private or Shared query, a heap of its storage mode, `align + size` bytes, takes a
|
||||
//! texture of the descriptor at offset `align` (a Shared one where the device's image of it
|
||||
//! takes the Shared memory type; it is held to the first alone where the placement is
|
||||
//! `Gap::HeapTexture`);
|
||||
//! 3. there, where the runtime moves the format's bytes, level 0's first slice written from a
|
||||
//! buffer reads back unchanged: a `Depth32Float` slice's bytes are depths within `[0, 1]`, the
|
||||
//! only ones a copy into a depth aspect keeps on every device
|
||||
//! (`Texture::FLOAT_DEPTH_UPLOAD_NOTE`), and any other's a pattern of bytes.
|
||||
//!
|
||||
//! A Shared, Managed or Memoryless query is held to the first alone: the runtime places a heap
|
||||
//! texture in a Private block only (`Gap::HeapTexture`), and placing the descriptor in a Private
|
||||
//! heap would answer another query. A query whose bytes the runtime does not move, which its copy
|
||||
//! answers `Gap::TextureBytes` (depth and stencil both, or multisample) for, is held to the first
|
||||
//! two.
|
||||
//! A Managed or Memoryless query is held to the first alone: no heap of either mode is made, and
|
||||
//! placing the descriptor in a heap of another mode would answer another query. A query whose
|
||||
//! bytes the runtime does not move, which its copy answers `Gap::TextureBytes` (depth and stencil
|
||||
//! both, or multisample) for, is held to the first two.
|
||||
|
||||
use super::{waited_for, work, RtDevice, WAIT};
|
||||
use crate::case::{Answer, Failure};
|
||||
@@ -41,7 +42,7 @@ pub(super) fn hold(
|
||||
format!("step 1: the alignment {align} is not a power of two"),
|
||||
));
|
||||
}
|
||||
if query.storage != Storage::Private {
|
||||
if !matches!(query.storage, Storage::Private | Storage::Shared) {
|
||||
return Ok(());
|
||||
}
|
||||
let heap_size = align.checked_add(size).ok_or_else(|| {
|
||||
@@ -50,10 +51,19 @@ pub(super) fn hold(
|
||||
format!("step 2: a heap of {align} + {size} bytes"),
|
||||
)
|
||||
})?;
|
||||
let (_block, heap) = work::heap_of(on, heap_size, Storage::Private)?;
|
||||
let (_block, heap) = work::heap_of(on, heap_size, query.storage)?;
|
||||
let index = on.texture_index(descriptor.pixel_format, descriptor.usage);
|
||||
let texture = (on.device.new_heap_texture(descriptor, index, heap, align))
|
||||
.map_err(|error| on.failure(&error))?;
|
||||
let texture = match on.device.new_heap_texture(descriptor, index, heap, align) {
|
||||
Ok(texture) => texture,
|
||||
// A device whose image of the descriptor takes no Shared memory type sizes it, and places
|
||||
// none of it in a Shared heap: the answer is held to step 1 there.
|
||||
Err(rt::Error::Unsupported(rt::Gap::HeapTexture { .. }))
|
||||
if query.storage == Storage::Shared =>
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
Err(error) => return Err(on.failure(&error)),
|
||||
};
|
||||
round_trip(on, queue, descriptor, &texture)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
//! The runtime's side of [`crate::managed_naming`]: the sequence through the runtime's
|
||||
//! Metal-shaped API, its Managed buffer in the form the device's memory-type query picks
|
||||
//! (`Device::has_unified_memory`).
|
||||
|
||||
use super::work::{read_buffer, write};
|
||||
use super::{waited_for, RtSide, WAIT};
|
||||
use crate::case::{Answer, Failure};
|
||||
use crate::managed_naming::{Content, Libraries, Way, LENGTH, TARGET_SIDE};
|
||||
use metal2vulkan::metal::PixelFormat;
|
||||
use metal2vulkan_runtime as rt;
|
||||
|
||||
/// What the venue lacks for a reader that reaches the buffer through its address alone, on a
|
||||
/// device that keeps one copy of a Managed buffer.
|
||||
const ONE_COPY: &str = "a device copy of each Managed buffer (Device::has_unified_memory false): \
|
||||
with one copy a reader through the address reads the buffer's own bytes";
|
||||
|
||||
impl RtSide<'_> {
|
||||
/// [`crate::case::Side::managed_naming`] on the runtime.
|
||||
pub(super) fn managed_naming_run(&mut self, way: Way, libraries: Libraries) -> Answer<Vec<u8>> {
|
||||
let on = self.on;
|
||||
let device = &on.device;
|
||||
let of_rt = |error: rt::Error| on.failure(&error);
|
||||
let two = !device.has_unified_memory();
|
||||
if way == Way::Address && !two {
|
||||
let mut failure = Failure::named("OneCopy", ONE_COPY);
|
||||
failure.lacks = Some(ONE_COPY.to_owned());
|
||||
return Err(failure);
|
||||
}
|
||||
let length = LENGTH as u64;
|
||||
let shared = |length: u64| -> Answer<(rt::Buffer, rt::Block)> {
|
||||
let block = (device.take_block(rt::MemoryClass::Shared, length)).map_err(of_rt)?;
|
||||
let buffer = (device.new_buffer(block.id, 0, length, Some(0))).map_err(of_rt)?;
|
||||
Ok((buffer, block))
|
||||
};
|
||||
let bytes = (device.take_block(rt::MemoryClass::Shared, length)).map_err(of_rt)?;
|
||||
let copy = match two {
|
||||
true => Some((device.take_block(rt::MemoryClass::Private, length)).map_err(of_rt)?),
|
||||
false => None,
|
||||
};
|
||||
let at = |block: &rt::Block| (block.id, 0);
|
||||
let managed = (device.new_managed_buffer(at(&bytes), copy.as_ref().map(at), length, 0))
|
||||
.map_err(of_rt)?;
|
||||
let (scratch, scratch_block) = shared(length)?;
|
||||
let (out, out_block) = shared(length)?;
|
||||
let queue = (device.new_command_queue(4)).map_err(of_rt)?;
|
||||
let run = |command_buffer: &rt::CommandBuffer| -> Answer<()> {
|
||||
command_buffer.commit().map_err(of_rt)?;
|
||||
match waited_for(command_buffer, WAIT) {
|
||||
Some(_) => match command_buffer.error() {
|
||||
None => Ok(()),
|
||||
Some(error) => Err(Failure::named("CommandBufferError", format!("{error:?}"))),
|
||||
},
|
||||
None => Err(Failure::named(
|
||||
"NeverCompleted",
|
||||
"a command buffer of the sequence",
|
||||
)),
|
||||
}
|
||||
};
|
||||
let blit = |source: &rt::Buffer, destination: &rt::Buffer| -> Answer<()> {
|
||||
let command_buffer = queue.command_buffer().map_err(of_rt)?;
|
||||
let mut blit = command_buffer.blit_command_encoder().map_err(of_rt)?;
|
||||
(blit.copy_from_buffer_to_buffer(source, 0, destination, 0, length)).map_err(of_rt)?;
|
||||
blit.end_encoding();
|
||||
run(&command_buffer)
|
||||
};
|
||||
|
||||
// 1. Synced: written, named, and taken by a blit that copies the buffer.
|
||||
write(&managed, &Content::Synced.bytes())?;
|
||||
(managed.did_modify_range(0, length)).map_err(of_rt)?;
|
||||
blit(&managed, &scratch)?;
|
||||
// 2. Named: written and named; a commit whose one blit fills another buffer.
|
||||
write(&managed, &Content::Named.bytes())?;
|
||||
(managed.did_modify_range(0, length)).map_err(of_rt)?;
|
||||
let elsewhere = queue.command_buffer().map_err(of_rt)?;
|
||||
let mut fill = elsewhere.blit_command_encoder().map_err(of_rt)?;
|
||||
(fill.fill_buffer(&scratch, 0..length, 0)).map_err(of_rt)?;
|
||||
fill.end_encoding();
|
||||
run(&elsewhere)?;
|
||||
// 3. The reader encoded, Later written with no second name, its commit.
|
||||
let reader = queue.command_buffer().map_err(of_rt)?;
|
||||
// The reader's own buffers' blocks, given back once it completed.
|
||||
let mut blocks = vec![bytes, scratch_block, out_block];
|
||||
blocks.extend(copy);
|
||||
let held = match way {
|
||||
Way::ComputeSlot => {
|
||||
self.slot_reader(&reader, libraries, &managed, &out)?;
|
||||
None
|
||||
}
|
||||
Way::Declared | Way::Address => {
|
||||
let (address, block) =
|
||||
self.address_reader(&reader, way, libraries, &managed, &out)?;
|
||||
blocks.push(block);
|
||||
Some(address)
|
||||
}
|
||||
Way::VertexSlot => {
|
||||
let (positions, block) = self.vertex_reader(&reader, libraries, &managed, &out)?;
|
||||
blocks.push(block);
|
||||
Some(positions)
|
||||
}
|
||||
Way::BlitSource => {
|
||||
let mut blit = reader.blit_command_encoder().map_err(of_rt)?;
|
||||
(blit.copy_from_buffer_to_buffer(&managed, 0, &out, 0, length)).map_err(of_rt)?;
|
||||
blit.end_encoding();
|
||||
None
|
||||
}
|
||||
};
|
||||
write(&managed, &Content::Later.bytes())?;
|
||||
run(&reader)?;
|
||||
let read = match way {
|
||||
Way::VertexSlot => (TARGET_SIDE * TARGET_SIDE * 4) as usize,
|
||||
_ => LENGTH,
|
||||
};
|
||||
let read = read_buffer(&out, 0, read)?;
|
||||
drop((held, reader, elsewhere, queue, managed, scratch, out));
|
||||
for block in blocks {
|
||||
device.release_block(block).map_err(of_rt)?;
|
||||
}
|
||||
Ok(read)
|
||||
}
|
||||
|
||||
/// `scale_and_offset` over `managed` at slot 0 into `out` at slot 1, scale 1, one thread an
|
||||
/// element's word.
|
||||
fn slot_reader(
|
||||
&mut self,
|
||||
reader: &rt::CommandBuffer,
|
||||
libraries: Libraries,
|
||||
managed: &rt::Buffer,
|
||||
out: &rt::Buffer,
|
||||
) -> Answer<()> {
|
||||
let on = self.on;
|
||||
let of_rt = |error: rt::Error| on.failure(&error);
|
||||
let state = self.compute_state(libraries.examples, "scale_and_offset")?;
|
||||
let mut encoder =
|
||||
(reader.compute_command_encoder(rt::DispatchType::Serial)).map_err(of_rt)?;
|
||||
encoder.set_compute_pipeline_state(&state).map_err(of_rt)?;
|
||||
encoder.set_buffer(Some(managed), 0, 0).map_err(of_rt)?;
|
||||
encoder.set_buffer(Some(out), 0, 1).map_err(of_rt)?;
|
||||
(encoder.set_bytes(&1.0f32.to_le_bytes(), 2)).map_err(of_rt)?;
|
||||
let words = (LENGTH / 4) as u32;
|
||||
(encoder.dispatch_threads([words, 1, 1], [words, 1, 1])).map_err(of_rt)?;
|
||||
encoder.end_encoding();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `ab_address` reading `managed` through its address, which a Shared buffer at slot 0 holds,
|
||||
/// into `out` at slot 1; `managed` declared by `use_resource` where `way` is
|
||||
/// [`Way::Declared`]. Answers the buffer that holds the address, which the reader needs until
|
||||
/// it completes.
|
||||
fn address_reader(
|
||||
&mut self,
|
||||
reader: &rt::CommandBuffer,
|
||||
way: Way,
|
||||
libraries: Libraries,
|
||||
managed: &rt::Buffer,
|
||||
out: &rt::Buffer,
|
||||
) -> Answer<(rt::Buffer, rt::Block)> {
|
||||
let on = self.on;
|
||||
let of_rt = |error: rt::Error| on.failure(&error);
|
||||
let state = self.compute_state(libraries.pointers, "ab_address")?;
|
||||
let block = (on.device.take_block(rt::MemoryClass::Shared, 8)).map_err(of_rt)?;
|
||||
let address = (on.device.new_buffer(block.id, 0, 8, Some(0))).map_err(of_rt)?;
|
||||
write(&address, &managed.gpu_address().to_le_bytes())?;
|
||||
let mut encoder =
|
||||
(reader.compute_command_encoder(rt::DispatchType::Serial)).map_err(of_rt)?;
|
||||
encoder.set_compute_pipeline_state(&state).map_err(of_rt)?;
|
||||
encoder.set_buffer(Some(&address), 0, 0).map_err(of_rt)?;
|
||||
encoder.set_buffer(Some(out), 0, 1).map_err(of_rt)?;
|
||||
if way == Way::Declared {
|
||||
let read = rt::ResourceUsage::READ;
|
||||
(encoder.use_resource(rt::Resource::Buffer(managed), read)).map_err(of_rt)?;
|
||||
}
|
||||
let words = (LENGTH / 4) as u32;
|
||||
(encoder.dispatch_threads([words, 1, 1], [words, 1, 1])).map_err(of_rt)?;
|
||||
encoder.end_encoding();
|
||||
Ok((address, block))
|
||||
}
|
||||
|
||||
/// `colored_vertex` and `colored_fragment` drawing one triangle over the whole target, its
|
||||
/// colours `managed` at vertex slot 1, then a blit of the target's texels into `out`. Answers
|
||||
/// the positions' buffer and the target, which the reader needs until it completes.
|
||||
fn vertex_reader(
|
||||
&mut self,
|
||||
reader: &rt::CommandBuffer,
|
||||
libraries: Libraries,
|
||||
managed: &rt::Buffer,
|
||||
out: &rt::Buffer,
|
||||
) -> Answer<(rt::Buffer, rt::Block)> {
|
||||
let on = self.on;
|
||||
let of_rt = |error: rt::Error| on.failure(&error);
|
||||
let mut d =
|
||||
rt::RenderPipelineDescriptor::new(self.kernel(libraries.examples, "colored_vertex")?);
|
||||
d.fragment = Some(self.kernel(libraries.examples, "colored_fragment")?);
|
||||
d.color_attachments[0] = Some(rt::ColorAttachmentDescriptor::new(PixelFormat::RGBA8Unorm));
|
||||
let state = (on.device)
|
||||
.new_render_pipeline_state(&d, |samplers| Ok(on.sampler_ids(samplers)))
|
||||
.map_err(of_rt)?;
|
||||
let mut t = rt::TextureDescriptor::new(
|
||||
rt::TextureType::Type2D,
|
||||
PixelFormat::RGBA8Unorm,
|
||||
TARGET_SIDE,
|
||||
TARGET_SIDE,
|
||||
);
|
||||
t.usage = rt::TextureUsage::RENDER_TARGET;
|
||||
let index = on.texture_index(PixelFormat::RGBA8Unorm, t.usage);
|
||||
let target = (on.device.new_texture(&t, index)).map_err(of_rt)?;
|
||||
let corners: [f32; 6] = [-1.0, -1.0, 3.0, -1.0, -1.0, 3.0];
|
||||
let block = (on.device.take_block(rt::MemoryClass::Shared, 24)).map_err(of_rt)?;
|
||||
let positions = (on.device.new_buffer(block.id, 0, 24, Some(0))).map_err(of_rt)?;
|
||||
let corners: Vec<u8> = corners.iter().flat_map(|c| c.to_le_bytes()).collect();
|
||||
write(&positions, &corners)?;
|
||||
let mut pass = rt::RenderPassDescriptor::default();
|
||||
let color = &mut pass.color_attachments[0];
|
||||
color.texture = Some(target.clone());
|
||||
color.load_action = rt::LoadAction::Clear;
|
||||
let mut encoder = (reader.render_command_encoder(&pass)).map_err(of_rt)?;
|
||||
encoder.set_render_pipeline_state(&state).map_err(of_rt)?;
|
||||
(encoder.set_vertex_buffer(Some(&positions), 0, 0)).map_err(of_rt)?;
|
||||
(encoder.set_vertex_buffer(Some(managed), 0, 1)).map_err(of_rt)?;
|
||||
(encoder.draw_primitives(rt::PrimitiveType::Triangle, 0, 3, 1, 0)).map_err(of_rt)?;
|
||||
encoder.end_encoding();
|
||||
let mut blit = reader.blit_command_encoder().map_err(of_rt)?;
|
||||
let layout = rt::BufferLayout {
|
||||
offset: 0,
|
||||
bytes_per_row: u64::from(TARGET_SIDE) * 4,
|
||||
bytes_per_image: 0,
|
||||
};
|
||||
let size = [TARGET_SIDE, TARGET_SIDE, 1];
|
||||
let place = rt::TexturePlace::default();
|
||||
(blit.copy_from_texture_to_buffer(&target, place, size, out, layout)).map_err(of_rt)?;
|
||||
blit.end_encoding();
|
||||
Ok((positions, block))
|
||||
}
|
||||
|
||||
/// The compute pipeline state of `entry` of library `library`.
|
||||
fn compute_state(
|
||||
&mut self,
|
||||
library: crate::case::Handle,
|
||||
entry: &str,
|
||||
) -> Answer<rt::ComputePipelineState> {
|
||||
let descriptor = rt::ComputePipelineDescriptor::new(self.kernel(library, entry)?);
|
||||
let on = self.on;
|
||||
(on.device)
|
||||
.new_compute_pipeline_state(&descriptor, |samplers| Ok(on.sampler_ids(samplers)))
|
||||
.map_err(|error| on.failure(&error))
|
||||
}
|
||||
}
|
||||
@@ -456,9 +456,9 @@ impl RtSide<'_> {
|
||||
VisibilityResultType::Reset => rt::VisibilityResultType::Reset,
|
||||
VisibilityResultType::Accumulate => rt::VisibilityResultType::Accumulate,
|
||||
};
|
||||
if !pass.positions.is_empty() {
|
||||
return Err(Failure::unavailable("setSamplePositions:count:"));
|
||||
}
|
||||
descriptor.sample_positions = (pass.positions.iter())
|
||||
.map(|p| rt::SamplePosition::new(p.x, p.y))
|
||||
.collect();
|
||||
let mut encoder = (command_buffer.render_command_encoder(&descriptor)).map_err(of_rt)?;
|
||||
let encoded = (pass.steps.iter()).try_for_each(|step| self.step(&mut encoder, step));
|
||||
encoder.end_encoding();
|
||||
@@ -773,6 +773,35 @@ impl RtSide<'_> {
|
||||
))
|
||||
.map_err(of_rt)
|
||||
}
|
||||
RenderStep::DrawIndexedPatches {
|
||||
control_points,
|
||||
first,
|
||||
count,
|
||||
patch_indices,
|
||||
patch_index_offset,
|
||||
control_point_indices,
|
||||
control_point_index_offset,
|
||||
instances,
|
||||
base_instance,
|
||||
} => {
|
||||
let patches = match patch_indices {
|
||||
Some(held) => Some((buffer(*held)?, *patch_index_offset)),
|
||||
None => None,
|
||||
};
|
||||
let indices = rt::PatchIndexBuffers {
|
||||
patches,
|
||||
control_points: (buffer(*control_point_indices)?, *control_point_index_offset),
|
||||
};
|
||||
(encoder.draw_indexed_patches(
|
||||
*control_points,
|
||||
*first,
|
||||
*count,
|
||||
indices,
|
||||
*instances,
|
||||
*base_instance,
|
||||
))
|
||||
.map_err(of_rt)
|
||||
}
|
||||
// The scope and the stages only narrow what Metal orders: the runtime's barrier orders
|
||||
// every access of the encoder's draws so far before its later ones.
|
||||
RenderStep::BarrierScope { .. } => encoder.memory_barrier().map_err(of_rt),
|
||||
|
||||
@@ -199,6 +199,13 @@ impl RtSide<'_> {
|
||||
descriptor.rasterization_enabled = rasterizes;
|
||||
descriptor.support_indirect_command_buffers = rasterizes;
|
||||
descriptor.color_attachments[0] = Some(rt::ColorAttachmentDescriptor::new(run.format));
|
||||
// The commands' state takes the run's vertex descriptor and tessellation state.
|
||||
if rasterizes {
|
||||
descriptor.vertex_descriptor =
|
||||
(run.vertex_layout.as_ref()).map(super::fields::vertex_descriptor);
|
||||
descriptor.tessellation =
|
||||
(run.tessellation.as_ref()).map(super::fields::tessellation_descriptor);
|
||||
}
|
||||
(on.device)
|
||||
.new_render_pipeline_state(&descriptor, |samplers| Ok(on.sampler_ids(samplers)))
|
||||
.map_err(|error| on.failure(&error))
|
||||
@@ -224,7 +231,8 @@ impl RtSide<'_> {
|
||||
),
|
||||
};
|
||||
let mut descriptor = rt::IndirectCommandBufferDescriptor::new();
|
||||
descriptor.command_types = rt::IndirectCommandType::DRAW_INDEXED;
|
||||
descriptor.command_types =
|
||||
rt::IndirectCommandType::from_bits(u64::from(run.command_types.as_raw()));
|
||||
descriptor.inherit_pipeline_state = true;
|
||||
descriptor.max_vertex_buffer_bind_count = run.bind_counts[0];
|
||||
descriptor.max_fragment_buffer_bind_count = run.bind_counts[1];
|
||||
|
||||
@@ -41,6 +41,10 @@ struct StubSide {
|
||||
/// The device name the side's venue answers, so a test can hold a venue-scoped ledger row
|
||||
/// against one venue and not another.
|
||||
device: &'static str,
|
||||
/// The macOS release and build the side stands for (`Side::macos_release`): the oracle's,
|
||||
/// so record mode's logic runs on any Mac, where a test does not move it (`on_release`).
|
||||
#[cfg(target_os = "macos")]
|
||||
release: (&'static str, &'static str),
|
||||
made: u32,
|
||||
}
|
||||
|
||||
@@ -52,10 +56,22 @@ impl StubSide {
|
||||
notices: Vec::new(),
|
||||
refuse: Vec::new(),
|
||||
device: "stub",
|
||||
#[cfg(target_os = "macos")]
|
||||
release: (
|
||||
crate::recording::ORACLE_OS_VERSION,
|
||||
crate::recording::ORACLE_OS_BUILD,
|
||||
),
|
||||
made: 0,
|
||||
}
|
||||
}
|
||||
|
||||
/// The same side on another macOS release and build.
|
||||
#[cfg(target_os = "macos")]
|
||||
fn on_release(mut self, version: &'static str, build: &'static str) -> Self {
|
||||
self.release = (version, build);
|
||||
self
|
||||
}
|
||||
|
||||
/// The same side on a venue of another name.
|
||||
fn on(mut self, device: &'static str) -> Self {
|
||||
self.device = device;
|
||||
@@ -91,6 +107,11 @@ impl Side for StubSide {
|
||||
venue_named(self.device)
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn macos_release(&self) -> (String, String) {
|
||||
(self.release.0.to_owned(), self.release.1.to_owned())
|
||||
}
|
||||
|
||||
fn library(&mut self, _source: &ShaderSource<'_>) -> Answer<Handle> {
|
||||
match self.refusal("library") {
|
||||
Some(failure) => Err(failure),
|
||||
@@ -1030,6 +1051,16 @@ fn one_word_moving_names_its_row_and_index() {
|
||||
assert!(printed.contains("Metal 3"), "{printed}");
|
||||
}
|
||||
|
||||
/// Each kind is one precision note's: [`Degradation::note`] takes
|
||||
/// [`Degradation::from_precision_note`] back, so a kind's code is its note's
|
||||
/// (`PrecisionNote::code`).
|
||||
#[test]
|
||||
fn every_kind_is_its_notes_kind() {
|
||||
for &kind in Degradation::ALL {
|
||||
assert_eq!(Degradation::from_precision_note(kind.note()), kind);
|
||||
}
|
||||
}
|
||||
|
||||
/// Every kind a case can name is a precision note's: `docs/API.md` section 9, the catalogue of
|
||||
/// the notes the runtime carries, lists its code. The runtime's side announces only the codes of
|
||||
/// those notes, so a kind outside the catalogue would never be announced, and a case that
|
||||
@@ -2367,6 +2398,36 @@ fn record_mode_counts_the_outcomes_it_saw_with_their_runs() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Record mode refuses to take an answer on a Mac that is not the oracle the suite names, naming
|
||||
/// both, and the host it holds is the side's (`Side::macos_release`): Metal's side reads this
|
||||
/// host's, and the stub states the oracle's but here, so the record-mode tests above check record
|
||||
/// mode's logic on any Mac, the CI runner's macOS among them.
|
||||
#[cfg(target_os = "macos")]
|
||||
#[test]
|
||||
fn record_mode_refuses_a_host_that_is_not_the_oracle() {
|
||||
use crate::recording::{ORACLE_CHIP, ORACLE_OS_BUILD, ORACLE_OS_VERSION};
|
||||
let case = WordsCase::new("words", 2);
|
||||
let mut moved = StubSide::new(words(&[1, 2])).on_release("26.7.2", "25G332");
|
||||
let error = record(&case, &mut moved, 1, Validated::Ran).unwrap_err();
|
||||
assert_eq!(
|
||||
error,
|
||||
RecordError::HostMoved {
|
||||
found: "macOS 26.7.2 (25G332)".to_owned(),
|
||||
named: format!("{ORACLE_CHIP} on macOS {ORACLE_OS_VERSION} ({ORACLE_OS_BUILD})"),
|
||||
}
|
||||
);
|
||||
assert!(
|
||||
format!("{error}").contains("re-record every case"),
|
||||
"{error}"
|
||||
);
|
||||
// The oracle's release on another build is moved too: a recording is keyed by both.
|
||||
let mut rebuilt = StubSide::new(words(&[1, 2])).on_release(ORACLE_OS_VERSION, "26A999");
|
||||
assert!(matches!(
|
||||
record(&case, &mut rebuilt, 1, Validated::Ran),
|
||||
Err(RecordError::HostMoved { .. })
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_set_diff_prints_what_is_missing_and_what_is_extra() {
|
||||
let metal = Transcript::new(vec![Node::leaf(
|
||||
@@ -2896,10 +2957,16 @@ fn a_carried_answer_taken_on_another_chip_names_it() {
|
||||
// - `sample-positions-fewer-*`: the M4's coverage for fewer custom sample positions than the
|
||||
// pass's samples, which stays carried because one position **past** the pass's samples is
|
||||
// measured to end Metal's process, so a record run may not walk that family.
|
||||
const KNOWN: [&str; 3] = [
|
||||
// - `managed-named-*`: an AMD Radeon Pro 5300M's answer for which commit takes a Managed
|
||||
// buffer's named range to its second copy, which the oracle, keeping one copy, cannot give.
|
||||
// - `sample-positions-8x-*`: the 5300M's resolved texels of the sample positions family's pass
|
||||
// at 8 samples, which the oracle, rendering no 8 samples, cannot give.
|
||||
const KNOWN: [&str; 5] = [
|
||||
"texture-fills-",
|
||||
crate::cases::compute_threadgroups::PAST_METALS_LIMIT,
|
||||
"sample-positions-fewer-",
|
||||
"managed-named-",
|
||||
"sample-positions-8x-",
|
||||
];
|
||||
for family in KNOWN {
|
||||
assert!(
|
||||
@@ -4115,6 +4182,87 @@ fn a_divergence_row_is_held_in_both_directions() {
|
||||
assert!(printed.contains("drop the row"), "{printed}");
|
||||
}
|
||||
|
||||
/// A row may list more than one answer at its site, with ` | ` between them, for a venue whose
|
||||
/// hosts answer the site differently by a property its description does not state: llvmpipe of
|
||||
/// one Mesa and LLVM stores the `x3` sites of `fetch-ordered-*-srgb` at 6,304 elements on one
|
||||
/// x86-64 AVX-512 host and at 6,496 on others. The row covers each answer it lists and no other,
|
||||
/// and is held while the run answers any of them; a row of one answer is held as before.
|
||||
#[test]
|
||||
fn a_ledger_row_of_two_answers_covers_either_and_no_third() {
|
||||
use crate::known_gaps::{against, parse, Expectation, Now};
|
||||
let case = LedgerCase::new("ledger-two-answers");
|
||||
let recording = recording_of(&case, case.metal(7), 3);
|
||||
let answering = |ours: u32| {
|
||||
let mut side = StubSide::new(words(&[ours]));
|
||||
let row = replay_against(&case, &mut side, &recording).unwrap();
|
||||
let found = against(std::slice::from_ref(&row), &[]);
|
||||
let [Expectation::Unlisted { site, answer, .. }] = found.as_slice() else {
|
||||
panic!("{found:?}");
|
||||
};
|
||||
(row, site.clone(), answer.clone())
|
||||
};
|
||||
let (nine, site, first) = answering(9);
|
||||
let (eight, at, second) = answering(8);
|
||||
let (six, _, third) = answering(6);
|
||||
assert_eq!(at, site);
|
||||
assert!(first != second && second != third && first != third);
|
||||
let row = |answers: &str| {
|
||||
parse(&format!(
|
||||
"{}\t*\tdivergent\t{site}\t{answers}\ta difference this test writes down on purpose\n",
|
||||
case.name()
|
||||
))
|
||||
.unwrap()
|
||||
};
|
||||
|
||||
// Either listed answer is the row's, so neither run is a surprise.
|
||||
let two = row(&format!("{first} | {second}"));
|
||||
assert_eq!(two.len(), 1, "{two:?}");
|
||||
assert_eq!(against(std::slice::from_ref(&nine), &two), Vec::new());
|
||||
assert_eq!(against(std::slice::from_ref(&eight), &two), Vec::new());
|
||||
|
||||
// A third answer is a new gap, and the row, none of whose answers the run held, looks fixed.
|
||||
let found = against(std::slice::from_ref(&six), &two);
|
||||
assert!(
|
||||
matches!(
|
||||
found.as_slice(),
|
||||
[
|
||||
Expectation::Unlisted { answer, listed: Some(_), .. },
|
||||
Expectation::NoLongerHeld { now: Now::Differs, .. },
|
||||
] if *answer == third
|
||||
),
|
||||
"{found:?}"
|
||||
);
|
||||
// A run that no longer diverges reads the row as fixed, whichever answer it listed.
|
||||
let mut fixed = StubSide::new(words(&[7]));
|
||||
let exact = replay_against(&case, &mut fixed, &recording).unwrap();
|
||||
let found = against(std::slice::from_ref(&exact), &two);
|
||||
assert!(
|
||||
matches!(
|
||||
found.as_slice(),
|
||||
[Expectation::NoLongerHeld {
|
||||
now: Now::Matches,
|
||||
..
|
||||
}]
|
||||
),
|
||||
"{found:?}"
|
||||
);
|
||||
|
||||
// A row of one answer covers that answer alone, in both directions, as before.
|
||||
let one = row(&first);
|
||||
assert_eq!(against(std::slice::from_ref(&nine), &one), Vec::new());
|
||||
let found = against(std::slice::from_ref(&eight), &one);
|
||||
assert!(
|
||||
matches!(
|
||||
found.as_slice(),
|
||||
[
|
||||
Expectation::Unlisted { answer, .. },
|
||||
Expectation::NoLongerHeld { now: Now::Differs, .. },
|
||||
] if *answer == second
|
||||
),
|
||||
"{found:?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// A divergence never launders a refusal of the same case: the verdict carries both, and the
|
||||
/// ledger holds a refusal row against a case that also diverges.
|
||||
///
|
||||
|
||||
@@ -15,6 +15,20 @@
|
||||
|
||||
use metal2vulkan::metal::{PixelFormat, TextureType, TextureUsage};
|
||||
|
||||
/// The formats Metal makes no texture of from a descriptor alone: `RGBA16Float_XR`, `AnyDepth`,
|
||||
/// `AnyStencil` and a two-plane YCbCr format.
|
||||
///
|
||||
/// Measured on an Apple M3 Max under macOS 27.0.1: `newTextureWithDescriptor:` answers nil for
|
||||
/// each (`heap-sizes-formats-without-textures`), and `newSharedTextureWithDescriptor:` answers nil
|
||||
/// for `RGBA16Float_XR` in `Private` storage at 1, 4 and 8 samples
|
||||
/// (`shared-creator-extended-range-samples`).
|
||||
pub const WITHOUT_TEXTURES: [PixelFormat; 4] = [
|
||||
PixelFormat::RGBA16FloatXR,
|
||||
PixelFormat::AnyDepth,
|
||||
PixelFormat::AnyStencil,
|
||||
PixelFormat::YCBCR84202P,
|
||||
];
|
||||
|
||||
/// The storage mode a case asks a resource for: three of Metal's four modes, and the suite's one
|
||||
/// spelling of them.
|
||||
///
|
||||
|
||||
@@ -111,6 +111,11 @@ impl<S: Side, W: Watcher> Side for Watching<S, W> {
|
||||
self.inner.venue()
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn macos_release(&self) -> (String, String) {
|
||||
self.inner.macos_release()
|
||||
}
|
||||
|
||||
fn library(&mut self, source: &ShaderSource<'_>) -> Answer<Handle> {
|
||||
let _span = self.watch("library");
|
||||
self.inner.library(source)
|
||||
@@ -795,6 +800,15 @@ impl<S: Side, W: Watcher> Side for Watching<S, W> {
|
||||
self.inner.empty_command_buffers()
|
||||
}
|
||||
|
||||
fn managed_naming(
|
||||
&mut self,
|
||||
way: crate::managed_naming::Way,
|
||||
libraries: crate::managed_naming::Libraries,
|
||||
) -> Answer<Vec<u8>> {
|
||||
let _span = self.watch("managed_naming");
|
||||
self.inner.managed_naming(way, libraries)
|
||||
}
|
||||
|
||||
fn sparse_tile_size_in_bytes(&mut self, page: crate::sparse_query::QueryPage) -> Answer<u64> {
|
||||
let _span = self.watch("sparse_tile_size_in_bytes");
|
||||
self.inner.sparse_tile_size_in_bytes(page)
|
||||
|
||||
@@ -0,0 +1,444 @@
|
||||
//! The authored kernels (inline AIR text, for `llvm-as`) of Metal's `half` simdgroup sums and
|
||||
//! products, and what Metal answers: the product's CPU-interpreter tests and the runtime's device
|
||||
//! test both run them ([`module`]).
|
||||
//!
|
||||
//! Metal's `simd_sum` and `simd_product` of `half` operands are a tree of `half` operations: in
|
||||
//! round `d` (1, 2, 4, 8, 16) each aligned block of `2d` lanes holds its lower and upper halves'
|
||||
//! results combined and rounded to `half`, and a lane that takes no part counts as the operation's
|
||||
//! identity. Measured on an M3 Max (macOS 27.0.1), fast math on and off alike, with our own MSL:
|
||||
//! [`SUMS`] (potluck job m3-max-80839), [`PRODUCTS`] (m3-max-80879), and [`MASKED_SUMS`] and
|
||||
//! [`MASKED_PRODUCTS`] (m3-max-80890). Each answer is that tree's on every vector; the `float`
|
||||
//! result rounded once differs on five of the sums (`0x3c10` for `0x3c0f` on the first), four of
|
||||
//! the products and ten of the 48 masked results, and the tree over the active lanes packed
|
||||
//! together differs on three masked sums.
|
||||
//!
|
||||
//! - [`FULL`] (`half_simd_reductions`): one threadgroup of [`THREADS`] threads, eight
|
||||
//! simdgroups. Thread `t` takes [`SUM_OPERANDS`] and [`PRODUCT_OPERANDS`] of its simdgroup
|
||||
//! `t / 32` at its lane `t % 32` and writes `simd_sum`'s bits in the low half of its word and
|
||||
//! `simd_product`'s in the high half ([`full`]).
|
||||
//! - [`MASKED`] (`half_simd_reductions_masked`): one threadgroup of `3 * THREADS` threads. Thread
|
||||
//! `t` takes [`SUM_OPERANDS`]'s value of thread `t % 256` and, where bit `lane` of
|
||||
//! [`MASKS`]`[t / 256]` is set, writes the sum and the product of that operand over those lanes
|
||||
//! as [`FULL`] does; every other thread writes `0xffff_ffff` ([`masked`]).
|
||||
//! - [`QUADS`] (`half_quad_reductions`): one threadgroup of [`THREADS`] threads. Thread `t` takes
|
||||
//! entry `t` of [`SUM_OPERANDS`] and of [`PRODUCT_OPERANDS`] and writes [`QUAD_WORDS`] words
|
||||
//! ([`quads`]): its `quad_sum` and `quad_product`, its quad's inclusive and exclusive prefix sums,
|
||||
//! its quad's inclusive and exclusive prefix products, and the same four prefix operations over
|
||||
//! its simdgroup, each word a pair of `half` bits, low then high. Metal's quad answers are
|
||||
//! `(x0 op x1) op (x2 op x3)` and the lane-order chain over the quad's lanes, each operation
|
||||
//! rounded to `half`, the empty exclusive sum `-0` and product 1 (measured on all 256 threads,
|
||||
//! fast math on and off: m3-max-81130; the `float` result rounded once differs on 48 of the quad
|
||||
//! sums and 64 of the products). Metal's simdgroup prefix order is none this crate models (the
|
||||
//! lane-order chain, the Hillis and Steele scan and the `float` result rounded once each differ
|
||||
//! on 60 to 137 of the 256 threads), so [`quads`] does not answer those two words: they make
|
||||
//! the kernel a simdgroup user, which a device whose subgroups are narrower than a simdgroup
|
||||
//! runs on its emulated tier, quad operations included.
|
||||
|
||||
/// The full kernel.
|
||||
pub const FULL: &str = "half_simd_reductions";
|
||||
/// The masked kernel.
|
||||
pub const MASKED: &str = "half_simd_reductions_masked";
|
||||
/// The threads of [`FULL`]'s threadgroup: eight simdgroups.
|
||||
pub const THREADS: u32 = 256;
|
||||
/// The quad kernel.
|
||||
pub const QUADS: &str = "half_quad_reductions";
|
||||
/// The words each thread of [`QUADS`] writes.
|
||||
pub const QUAD_WORDS: u32 = 5;
|
||||
|
||||
/// The `half` bits each simdgroup sums: a 1 among `2^-11`s (first and last lane), a cancellation,
|
||||
/// `2048` and `-2048` among ones, and four vectors of mixed signs and exponents.
|
||||
pub const SUM_OPERANDS: [[u16; 32]; 8] = [
|
||||
[
|
||||
0x3c00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
|
||||
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
|
||||
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
|
||||
],
|
||||
[
|
||||
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
|
||||
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
|
||||
0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x3c00,
|
||||
],
|
||||
[
|
||||
0x63d0, 0xe3d0, 0x63d0, 0xe3d0, 0x63d0, 0xe3d0, 0x63d1, 0xe3d0, 0x63d1, 0xe3d0, 0x63d1,
|
||||
0xe3d0, 0x63d2, 0xe3d0, 0x63d2, 0xe3d0, 0x63d2, 0xe3d0, 0x63d2, 0xe3d0, 0x63d2, 0xe3d0,
|
||||
0x63d3, 0xe3d0, 0x63d3, 0xe3d0, 0x63d3, 0xe3d0, 0x63d4, 0xe3d0, 0x63d4, 0xe3d0,
|
||||
],
|
||||
[
|
||||
0x6800, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00,
|
||||
0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0xe800, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00,
|
||||
0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00,
|
||||
],
|
||||
[
|
||||
0x4f70, 0xc411, 0x3994, 0xceaa, 0x307c, 0xceb6, 0x3477, 0xcd6b, 0x476a, 0xc795, 0x42b3,
|
||||
0xb86f, 0x487b, 0xcd7d, 0x3c4e, 0xb9c2, 0x39e4, 0xc1b3, 0x47f8, 0xc841, 0x3fff, 0xc864,
|
||||
0x42bd, 0xc983, 0x3076, 0xc013, 0x4eb4, 0xb6d3, 0x3476, 0xc80b, 0x48ae, 0xb519,
|
||||
],
|
||||
[
|
||||
0x45e3, 0xbdcc, 0x30e8, 0xc7cb, 0x4b7f, 0xc580, 0x4ebb, 0xc6df, 0x3c21, 0xbd66, 0x3b48,
|
||||
0xb3ba, 0x40e5, 0xc444, 0x372d, 0xb120, 0x3257, 0xbad7, 0x3f33, 0xc225, 0x34a7, 0xc045,
|
||||
0x3bfe, 0xc019, 0x4ad9, 0xb989, 0x44bc, 0xcf7f, 0x4cf3, 0xc3e4, 0x40d7, 0xcff5,
|
||||
],
|
||||
[
|
||||
0x3d2e, 0xb651, 0x48a3, 0xbf2b, 0x4026, 0xbdf0, 0x4511, 0xbecf, 0x340a, 0xb578, 0x325b,
|
||||
0xc97d, 0x3acc, 0xbfa8, 0x4db7, 0xcab2, 0x4b53, 0xb0b5, 0x3605, 0xb9b9, 0x4da5, 0xbabc,
|
||||
0x3382, 0xbb9b, 0x421e, 0xb130, 0x3e73, 0xc412, 0x479d, 0xbb4c, 0x38da, 0xc575,
|
||||
],
|
||||
[
|
||||
0x40b2, 0xd980, 0x4f25, 0xc3ab, 0x47d1, 0xc1e6, 0x4bda, 0xc21a, 0x5a83, 0xdbad, 0x564e,
|
||||
0xcc98, 0x3f90, 0xc18b, 0x504c, 0xcf58, 0x4c37, 0xd72d, 0x5ace, 0xbddd, 0x5057, 0xbda9,
|
||||
0x55a8, 0xbce9, 0x45a3, 0xd6e9, 0x4238, 0xcb6c, 0x49d3, 0xbc21, 0x3d18, 0xca78,
|
||||
],
|
||||
];
|
||||
|
||||
/// Metal's `simd_sum` of each vector of [`SUM_OPERANDS`].
|
||||
pub const SUMS: [u16; 8] = [
|
||||
0x3c0f, 0x3c0f, 0x4b80, 0x4f40, 0xd238, 0xc57c, 0x51eb, 0x5124,
|
||||
];
|
||||
|
||||
/// The `half` bits each simdgroup multiplies: `1 + 2^-10` in every lane, that and `1 - 2^-11` in
|
||||
/// turn, three vectors of `1 + k 2^-10`, and three of magnitudes in `[0.75, 1.5)` of mixed signs.
|
||||
pub const PRODUCT_OPERANDS: [[u16; 32]; 8] = [
|
||||
[
|
||||
0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01,
|
||||
0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01,
|
||||
0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01, 0x3c01,
|
||||
],
|
||||
[
|
||||
0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01,
|
||||
0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff,
|
||||
0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff, 0x3c01, 0x3bff,
|
||||
],
|
||||
[
|
||||
0x3c01, 0x3bfa, 0x3bf2, 0x3bf4, 0x3bf6, 0x3bfa, 0x3bf8, 0x3bf2, 0x3bf2, 0x3bfa, 0x3bf2,
|
||||
0x3c05, 0x3bf4, 0x3c03, 0x3bf0, 0x3bf2, 0x3bf8, 0x3c01, 0x3c02, 0x3bf4, 0x3c06, 0x3c01,
|
||||
0x3c07, 0x3c01, 0x3c08, 0x3c02, 0x3bf0, 0x3c04, 0x3bf6, 0x3c04, 0x3bf4, 0x3bfe,
|
||||
],
|
||||
[
|
||||
0x3c06, 0x3c08, 0x3c04, 0x3c06, 0x3c07, 0x3c02, 0x3bfa, 0x3bfa, 0x3bf4, 0x3c06, 0x3c05,
|
||||
0x3bf6, 0x3bf8, 0x3c04, 0x3bf6, 0x3bfe, 0x3c02, 0x3bfc, 0x3bf4, 0x3c07, 0x3bf6, 0x3c05,
|
||||
0x3bfa, 0x3c05, 0x3c01, 0x3bf0, 0x3bf6, 0x3bf2, 0x3bf6, 0x3c07, 0x3c05, 0x3c05,
|
||||
],
|
||||
[
|
||||
0x3c07, 0x3bf8, 0x3bfa, 0x3bf8, 0x3c00, 0x3c06, 0x3bf2, 0x3c06, 0x3bf6, 0x3bf0, 0x3c00,
|
||||
0x3bfc, 0x3bf2, 0x3bf0, 0x3c07, 0x3c05, 0x3bf0, 0x3c02, 0x3c00, 0x3bfa, 0x3bf8, 0x3bf4,
|
||||
0x3c06, 0x3bf2, 0x3c08, 0x3c06, 0x3bfa, 0x3bf6, 0x3c00, 0x3bfc, 0x3c08, 0x3c03,
|
||||
],
|
||||
[
|
||||
0x3bb8, 0x3bd0, 0xbd43, 0xbccd, 0xba35, 0x3de2, 0xbc89, 0x3a23, 0xbaab, 0xbcbb, 0xba56,
|
||||
0xbaf0, 0xbdcb, 0x3b88, 0x3ae4, 0x3c3a, 0xbcfd, 0xba91, 0x3c90, 0x3b0d, 0x3cc9, 0xbc15,
|
||||
0x3ccf, 0xbda9, 0x3b6e, 0x3c3a, 0x3a1a, 0x3d68, 0x3b24, 0xbc11, 0xbd67, 0xbcb0,
|
||||
],
|
||||
[
|
||||
0x3d3a, 0x3c7f, 0xbc34, 0xbc71, 0xbb70, 0x3c79, 0xbc35, 0x3cc6, 0xbb25, 0xbb95, 0xba13,
|
||||
0xbc58, 0xbac1, 0x3d14, 0x3bcc, 0x3d04, 0xbb3f, 0xba28, 0x3b0b, 0x3b76, 0x3cc5, 0xba53,
|
||||
0x3abc, 0xbca9, 0x3c95, 0x3a2d, 0x3d15, 0x3b33, 0x3b67, 0xbc07, 0xbd33, 0xbc98,
|
||||
],
|
||||
[
|
||||
0x3c7b, 0x3dd1, 0xbc18, 0xbdd7, 0xba1b, 0x3c7e, 0xbd30, 0x3dd5, 0xbcac, 0xbc07, 0xbc65,
|
||||
0xbdbd, 0xbd48, 0x3ac6, 0x3dd4, 0x3d0c, 0xbd58, 0xbb80, 0x3b84, 0x3d76, 0x3ced, 0xba1f,
|
||||
0x3dd0, 0xbd0a, 0x3c04, 0x3cc6, 0x3c6d, 0x3b26, 0x3d1a, 0xbce0, 0xbc8d, 0xbc41,
|
||||
],
|
||||
];
|
||||
|
||||
/// Metal's `simd_product` of each vector of [`PRODUCT_OPERANDS`].
|
||||
pub const PRODUCTS: [u16; 8] = [
|
||||
0x3c20, 0x3c00, 0x3b8e, 0x3c11, 0x3bd3, 0x43b1, 0x3e11, 0x55cb,
|
||||
];
|
||||
|
||||
/// The active lanes of [`MASKED`]'s three cases: the odd lanes, lanes 5 to 27 but 16, and lanes 0,
|
||||
/// 15, 16 and 31.
|
||||
pub const MASKS: [u32; 3] = [0xaaaa_aaaa, 0x0ffe_ffe0, 0x8001_8001];
|
||||
|
||||
/// Metal's `simd_sum` of each vector of [`SUM_OPERANDS`] over the lanes of each of [`MASKS`].
|
||||
pub const MASKED_SUMS: [[u16; 8]; 3] = [
|
||||
[
|
||||
0x2000, 0x3c07, 0xf3d0, 0x4c00, 0xd8c1, 0xd663, 0xd1a8, 0xe1c8,
|
||||
],
|
||||
[
|
||||
0x2180, 0x2180, 0xe7c6, 0x4d80, 0xd272, 0xc3d4, 0x4d19, 0x5933,
|
||||
],
|
||||
[
|
||||
0x3c01, 0x3c01, 0x3c00, 0x3c00, 0x4f5d, 0xce7a, 0xc1d0, 0xcdc7,
|
||||
],
|
||||
];
|
||||
|
||||
/// Metal's `simd_product` of each vector of [`SUM_OPERANDS`] over the lanes of each of [`MASKS`].
|
||||
pub const MASKED_PRODUCTS: [[u16; 8]; 3] = [
|
||||
[
|
||||
0x0000, 0x0000, 0x7c00, 0x3c00, 0x7c00, 0x7c00, 0x51f1, 0x7c00,
|
||||
],
|
||||
[
|
||||
0x0000, 0x0000, 0x7c00, 0x3c00, 0x7c00, 0x7c00, 0x611c, 0x7c00,
|
||||
],
|
||||
[
|
||||
0x0000, 0x0000, 0x7c00, 0xfc00, 0x4506, 0x45f2, 0x656a, 0x7358,
|
||||
],
|
||||
];
|
||||
|
||||
/// What thread `t` of [`FULL`] writes.
|
||||
pub fn full(t: u32) -> u32 {
|
||||
let v = (t / 32) as usize;
|
||||
u32::from(SUMS[v]) | (u32::from(PRODUCTS[v]) << 16)
|
||||
}
|
||||
|
||||
/// What thread `t` of [`MASKED`] writes.
|
||||
pub fn masked(t: u32) -> u32 {
|
||||
let (case, v, lane) = (
|
||||
(t / THREADS) as usize,
|
||||
((t % THREADS) / 32) as usize,
|
||||
t % 32,
|
||||
);
|
||||
if (MASKS[case] >> lane) & 1 == 0 {
|
||||
return 0xffff_ffff;
|
||||
}
|
||||
u32::from(MASKED_SUMS[case][v]) | (u32::from(MASKED_PRODUCTS[case][v]) << 16)
|
||||
}
|
||||
|
||||
/// Metal's word `w` of [`QUADS`]' output (thread `w / QUAD_WORDS`), where this crate models it:
|
||||
/// the quad's reductions and prefix operations, each `half` operation rounded; `None` for the
|
||||
/// simdgroup prefix operations' two words.
|
||||
pub fn quads(w: u32) -> Option<u32> {
|
||||
let (t, k) = (w / QUAD_WORDS, w % QUAD_WORDS);
|
||||
let operand = |table: &[[u16; 32]; 8], u: u32| table[(u / 32) as usize][(u % 32) as usize];
|
||||
let base = t & !3;
|
||||
let lanes = |table| (base..base + 4).map(move |u| value(operand(table, u)));
|
||||
let tree = |table, op: Operation| {
|
||||
let x: Vec<f64> = lanes(table).collect();
|
||||
let (low, high) = (round(op(x[0], x[1])), round(op(x[2], x[3])));
|
||||
round(op(value(low), value(high)))
|
||||
};
|
||||
// The lane-order chain over the quad's lanes below the thread's (and its own when
|
||||
// `inclusive`), from the empty answer `empty`.
|
||||
let chain = |table, op: Operation, empty: u16, inclusive: bool| {
|
||||
let upto = (t - base) + u32::from(inclusive);
|
||||
lanes(table)
|
||||
.take(upto as usize)
|
||||
.fold(empty, |acc, x| round(op(value(acc), x)))
|
||||
};
|
||||
let (add, mul): (Operation, Operation) = (|a, b| a + b, |a, b| a * b);
|
||||
let pair = |low: u16, high: u16| u32::from(low) | (u32::from(high) << 16);
|
||||
match k {
|
||||
0 => Some(pair(tree(&SUM_OPERANDS, add), tree(&PRODUCT_OPERANDS, mul))),
|
||||
1 => Some(pair(
|
||||
chain(&SUM_OPERANDS, add, 0x8000, true),
|
||||
chain(&SUM_OPERANDS, add, 0x8000, false),
|
||||
)),
|
||||
2 => Some(pair(
|
||||
chain(&PRODUCT_OPERANDS, mul, 0x3c00, true),
|
||||
chain(&PRODUCT_OPERANDS, mul, 0x3c00, false),
|
||||
)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// A `half` operation of the model, on the operands' exact values.
|
||||
type Operation = fn(f64, f64) -> f64;
|
||||
|
||||
/// The value of the `half` bits `h`.
|
||||
fn value(h: u16) -> f64 {
|
||||
let sign = if h & 0x8000 == 0 { 1.0 } else { -1.0 };
|
||||
let (e, m) = (i32::from((h >> 10) & 0x1f), f64::from(h & 0x3ff));
|
||||
sign * match e {
|
||||
0 => m * 2f64.powi(-24),
|
||||
31 if m == 0.0 => f64::INFINITY,
|
||||
31 => f64::NAN,
|
||||
e => (1024.0 + m) * 2f64.powi(e - 25),
|
||||
}
|
||||
}
|
||||
|
||||
/// The bits of the `half` nearest `x`, ties to even, where `x` is exact in `f64` (a sum or product
|
||||
/// of two `half` values is): a magnitude from 65520 up is the infinity of its sign.
|
||||
fn round(x: f64) -> u16 {
|
||||
let sign = if x.is_sign_negative() { 0x8000 } else { 0 };
|
||||
let a = x.abs();
|
||||
if a.is_nan() {
|
||||
return 0x7e00;
|
||||
}
|
||||
if a == 0.0 {
|
||||
return sign;
|
||||
}
|
||||
if a >= 65520.0 {
|
||||
return sign | 0x7c00;
|
||||
}
|
||||
// The binade's exponent, no lower than the smallest normal's: a `half` there is a multiple of
|
||||
// `2^(e - 10)`.
|
||||
let binade = i32::try_from((a.to_bits() >> 52) & 0x7ff).unwrap_or(0) - 1023;
|
||||
let e = binade.max(-14);
|
||||
let units = (a * 2f64.powi(10 - e)).round_ties_even();
|
||||
let (e, units) = if units >= 2048.0 {
|
||||
(e + 1, units / 2.0)
|
||||
} else {
|
||||
(e, units)
|
||||
};
|
||||
let units = units as u16;
|
||||
if units < 1024 {
|
||||
// A denormal (or zero): the units are its bits.
|
||||
return sign | units;
|
||||
}
|
||||
let biased = u16::try_from(e + 15).unwrap_or(31);
|
||||
if biased >= 31 {
|
||||
return sign | 0x7c00;
|
||||
}
|
||||
sign | (biased << 10) | (units - 1024)
|
||||
}
|
||||
|
||||
/// A table of `half` bits as an AIR constant array.
|
||||
fn halves(table: &[[u16; 32]; 8]) -> String {
|
||||
let cells: Vec<String> = table
|
||||
.iter()
|
||||
.flatten()
|
||||
.map(|h| format!("half 0xH{h:04X}"))
|
||||
.collect();
|
||||
format!("[256 x half] [{}]", cells.join(", "))
|
||||
}
|
||||
|
||||
/// [`QUADS`]' definition: ten operations on the thread's two operands, packed two to a word.
|
||||
fn quads_function() -> String {
|
||||
const CALLS: [(&str, &str); 10] = [
|
||||
("quad_sum", "x"),
|
||||
("quad_product", "y"),
|
||||
("quad_prefix_inclusive_sum", "x"),
|
||||
("quad_prefix_exclusive_sum", "x"),
|
||||
("quad_prefix_inclusive_product", "y"),
|
||||
("quad_prefix_exclusive_product", "y"),
|
||||
("simd_prefix_inclusive_sum", "x"),
|
||||
("simd_prefix_exclusive_sum", "x"),
|
||||
("simd_prefix_inclusive_product", "y"),
|
||||
("simd_prefix_exclusive_product", "y"),
|
||||
];
|
||||
let mut body = format!(
|
||||
"define void @{QUADS}(ptr addrspace(1) noundef \"air-buffer-no-alias\" %out, i32 noundef %t) #0 {{\n\
|
||||
%i = zext i32 %t to i64\n\
|
||||
%px = getelementptr inbounds [256 x half], ptr addrspace(2) @sum_operands, i64 0, i64 %i\n\
|
||||
%x = load half, ptr addrspace(2) %px, align 2\n\
|
||||
%py = getelementptr inbounds [256 x half], ptr addrspace(2) @product_operands, i64 0, i64 %i\n\
|
||||
%y = load half, ptr addrspace(2) %py, align 2\n\
|
||||
%base = mul i64 %i, {QUAD_WORDS}\n"
|
||||
);
|
||||
for (n, (op, operand)) in CALLS.iter().enumerate() {
|
||||
body.push_str(&format!(
|
||||
" %r{n} = tail call half @air.{op}.f16(half %{operand}) #1\n\
|
||||
%b{n} = bitcast half %r{n} to i16\n\
|
||||
%z{n} = zext i16 %b{n} to i32\n"
|
||||
));
|
||||
}
|
||||
for k in 0..CALLS.len() / 2 {
|
||||
let (low, high) = (2 * k, 2 * k + 1);
|
||||
body.push_str(&format!(
|
||||
" %h{k} = shl i32 %z{high}, 16\n\
|
||||
%w{k} = or i32 %z{low}, %h{k}\n\
|
||||
%at{k} = add i64 %base, {k}\n\
|
||||
%o{k} = getelementptr inbounds i32, ptr addrspace(1) %out, i64 %at{k}\n\
|
||||
store i32 %w{k}, ptr addrspace(1) %o{k}, align 4\n"
|
||||
));
|
||||
}
|
||||
body.push_str(" ret void\n}\n\n");
|
||||
for (op, _) in CALLS {
|
||||
body.push_str(&format!("declare half @air.{op}.f16(half) #1\n"));
|
||||
}
|
||||
body
|
||||
}
|
||||
|
||||
/// The module holding [`FULL`], [`MASKED`] and [`QUADS`].
|
||||
pub fn module() -> String {
|
||||
let masks: Vec<String> = MASKS.iter().map(|m| format!("i32 {}", *m as i32)).collect();
|
||||
format!(
|
||||
r#"target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
|
||||
target triple = "air64_v28-apple-macosx26.0.0"
|
||||
|
||||
@sum_operands = internal addrspace(2) constant {sums}, align 2
|
||||
@product_operands = internal addrspace(2) constant {products}, align 2
|
||||
@masks = internal addrspace(2) constant [3 x i32] [{masks}], align 4
|
||||
|
||||
define void @{FULL}(ptr addrspace(1) noundef "air-buffer-no-alias" %out, i32 noundef %t) #0 {{
|
||||
%i = zext i32 %t to i64
|
||||
%px = getelementptr inbounds [256 x half], ptr addrspace(2) @sum_operands, i64 0, i64 %i
|
||||
%x = load half, ptr addrspace(2) %px, align 2
|
||||
%py = getelementptr inbounds [256 x half], ptr addrspace(2) @product_operands, i64 0, i64 %i
|
||||
%y = load half, ptr addrspace(2) %py, align 2
|
||||
%s = tail call half @air.simd_sum.f16(half %x) #1
|
||||
%p = tail call half @air.simd_product.f16(half %y) #1
|
||||
%sb = bitcast half %s to i16
|
||||
%pb = bitcast half %p to i16
|
||||
%sw = zext i16 %sb to i32
|
||||
%pw = zext i16 %pb to i32
|
||||
%ph = shl i32 %pw, 16
|
||||
%w = or i32 %sw, %ph
|
||||
%o = getelementptr inbounds i32, ptr addrspace(1) %out, i64 %i
|
||||
store i32 %w, ptr addrspace(1) %o, align 4
|
||||
ret void
|
||||
}}
|
||||
|
||||
define void @{MASKED}(ptr addrspace(1) noundef "air-buffer-no-alias" %out, i32 noundef %t, i32 noundef %lane) #0 {{
|
||||
entry:
|
||||
%i = zext i32 %t to i64
|
||||
%v = and i32 %t, 255
|
||||
%vi = zext i32 %v to i64
|
||||
%px = getelementptr inbounds [256 x half], ptr addrspace(2) @sum_operands, i64 0, i64 %vi
|
||||
%x = load half, ptr addrspace(2) %px, align 2
|
||||
%case = lshr i32 %t, 8
|
||||
%ci = zext i32 %case to i64
|
||||
%pm = getelementptr inbounds [3 x i32], ptr addrspace(2) @masks, i64 0, i64 %ci
|
||||
%m = load i32, ptr addrspace(2) %pm, align 4
|
||||
%shifted = lshr i32 %m, %lane
|
||||
%bit = and i32 %shifted, 1
|
||||
%on = icmp ne i32 %bit, 0
|
||||
br i1 %on, label %active, label %done
|
||||
|
||||
active:
|
||||
%s = tail call half @air.simd_sum.f16(half %x) #1
|
||||
%p = tail call half @air.simd_product.f16(half %x) #1
|
||||
%sb = bitcast half %s to i16
|
||||
%pb = bitcast half %p to i16
|
||||
%sw = zext i16 %sb to i32
|
||||
%pw = zext i16 %pb to i32
|
||||
%ph = shl i32 %pw, 16
|
||||
%w = or i32 %sw, %ph
|
||||
br label %done
|
||||
|
||||
done:
|
||||
%r = phi i32 [ %w, %active ], [ -1, %entry ]
|
||||
%o = getelementptr inbounds i32, ptr addrspace(1) %out, i64 %i
|
||||
store i32 %r, ptr addrspace(1) %o, align 4
|
||||
ret void
|
||||
}}
|
||||
|
||||
declare half @air.simd_sum.f16(half) #1
|
||||
declare half @air.simd_product.f16(half) #1
|
||||
|
||||
{quads}
|
||||
attributes #0 = {{ convergent mustprogress nounwind willreturn }}
|
||||
attributes #1 = {{ convergent mustprogress nounwind willreturn }}
|
||||
|
||||
!llvm.module.flags = !{{!0, !1, !2, !3, !4, !5, !6, !7, !8}}
|
||||
!air.kernel = !{{!9, !21, !23}}
|
||||
!air.version = !{{!19}}
|
||||
!air.language_version = !{{!20}}
|
||||
|
||||
!0 = !{{i32 2, !"SDK Version", [2 x i32] [i32 26, i32 5]}}
|
||||
!1 = !{{i32 1, !"wchar_size", i32 4}}
|
||||
!2 = !{{i32 7, !"frame-pointer", i32 2}}
|
||||
!3 = !{{i32 7, !"air.max_device_buffers", i32 31}}
|
||||
!4 = !{{i32 7, !"air.max_constant_buffers", i32 31}}
|
||||
!5 = !{{i32 7, !"air.max_threadgroup_buffers", i32 31}}
|
||||
!6 = !{{i32 7, !"air.max_textures", i32 128}}
|
||||
!7 = !{{i32 7, !"air.max_read_write_textures", i32 8}}
|
||||
!8 = !{{i32 7, !"air.max_samplers", i32 16}}
|
||||
!9 = !{{ptr @{FULL}, !10, !11}}
|
||||
!10 = !{{}}
|
||||
!11 = !{{!12, !13}}
|
||||
!12 = !{{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"out"}}
|
||||
!13 = !{{i32 1, !"air.thread_index_in_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"t"}}
|
||||
!14 = !{{i32 2, !"air.thread_index_in_simdgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"lane"}}
|
||||
!19 = !{{i32 2, i32 8, i32 0}}
|
||||
!20 = !{{!"Metal", i32 4, i32 0, i32 0}}
|
||||
!21 = !{{ptr @{MASKED}, !10, !22}}
|
||||
!22 = !{{!12, !13, !14}}
|
||||
!23 = !{{ptr @{QUADS}, !10, !11}}
|
||||
"#,
|
||||
sums = halves(&SUM_OPERANDS),
|
||||
products = halves(&PRODUCT_OPERANDS),
|
||||
masks = masks.join(", "),
|
||||
quads = quads_function(),
|
||||
)
|
||||
}
|
||||
@@ -10,7 +10,9 @@
|
||||
//! both run ([`loop_kernels`]), the inputs and answer of the vector word-phase fixture the product's
|
||||
//! interpreter test, the runtime's device test and the conformance suite all hold
|
||||
//! ([`vector_word_phases`]), the dispatches and answer of the threadgroup-memory fixture the
|
||||
//! runtime's device test and the conformance suite both hold ([`threadgroup_start`]), and the
|
||||
//! runtime's device test and the conformance suite both hold ([`threadgroup_start`]), the `half`
|
||||
//! simdgroup sums and products and Metal's answers to them, which the product's interpreter tests
|
||||
//! and the runtime's device test both run ([`half_simd_reductions`]), and the
|
||||
//! counter of a thread's user-space instructions the matrix's
|
||||
//! instructions-per-draw records are measured with ([`instructions`]).
|
||||
//!
|
||||
@@ -32,6 +34,7 @@ use std::path::{Path, PathBuf};
|
||||
use std::process::Stdio;
|
||||
|
||||
pub mod fuzz;
|
||||
pub mod half_simd_reductions;
|
||||
pub mod instructions;
|
||||
pub mod linked_signatures;
|
||||
pub mod litmus;
|
||||
|
||||
@@ -85,7 +85,7 @@ pub fn metallib_2_2(functions: &[MtlbFunction<'_>]) -> Vec<u8> {
|
||||
write(functions, &MtlbLinkage::default(), 0, Format::V2_2)
|
||||
}
|
||||
|
||||
/// The container layout [`write`] writes.
|
||||
/// The container layout [`write()`] writes.
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
enum Format {
|
||||
/// Today's toolchain's: format 2.9, `MDSZ` in every entry, an extended header.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
use crate::plan::{
|
||||
seeded_words as words, Binding, BufferPlan, Constant, Dispatch, Expect, Filter, Grid, Plan,
|
||||
SamplerPlan, Scaled, Source, TextureExpect, TexturePlan, Values,
|
||||
SamplerPlan, Scaled, Source, TextureExpect, TexturePlan, TextureSource, Values,
|
||||
};
|
||||
use crate::{Result, Storage};
|
||||
use metal2vulkan::metal::{PixelFormat, TextureType, TextureUsage};
|
||||
@@ -21,7 +21,7 @@ pub struct Workload {
|
||||
}
|
||||
|
||||
/// The authored workloads.
|
||||
pub const WORKLOADS: [Workload; 40] = [
|
||||
pub const WORKLOADS: [Workload; 53] = [
|
||||
Workload {
|
||||
name: "bandwidth",
|
||||
plan: bandwidth,
|
||||
@@ -150,6 +150,30 @@ pub const WORKLOADS: [Workload; 40] = [
|
||||
name: "vote_loop",
|
||||
plan: vote_loop,
|
||||
},
|
||||
Workload {
|
||||
name: "row_tail_224",
|
||||
plan: row_tail_224,
|
||||
},
|
||||
Workload {
|
||||
name: "row_tail_27730",
|
||||
plan: row_tail_27730,
|
||||
},
|
||||
Workload {
|
||||
name: "row_tail_49",
|
||||
plan: row_tail_49,
|
||||
},
|
||||
Workload {
|
||||
name: "row_tail_224_private",
|
||||
plan: row_tail_224_private,
|
||||
},
|
||||
Workload {
|
||||
name: "row_tail_27730_private",
|
||||
plan: row_tail_27730_private,
|
||||
},
|
||||
Workload {
|
||||
name: "row_tail_49_private",
|
||||
plan: row_tail_49_private,
|
||||
},
|
||||
Workload {
|
||||
name: "constant_managed",
|
||||
plan: constant_managed,
|
||||
@@ -182,6 +206,34 @@ pub const WORKLOADS: [Workload; 40] = [
|
||||
name: "bind_2000",
|
||||
plan: bind_2000,
|
||||
},
|
||||
Workload {
|
||||
name: "texel_buffer_r8_write",
|
||||
plan: texel_buffer_r8_write,
|
||||
},
|
||||
Workload {
|
||||
name: "texel_buffer_r8_read",
|
||||
plan: texel_buffer_r8_read,
|
||||
},
|
||||
Workload {
|
||||
name: "texel_buffer_r16_read",
|
||||
plan: texel_buffer_r16_read,
|
||||
},
|
||||
Workload {
|
||||
name: "texel_buffer_rgba16_read",
|
||||
plan: texel_buffer_rgba16_read,
|
||||
},
|
||||
Workload {
|
||||
name: "texel_buffer_bgra8_read",
|
||||
plan: texel_buffer_bgra8_read,
|
||||
},
|
||||
Workload {
|
||||
name: "texel_buffer_b5g6r5_write",
|
||||
plan: texel_buffer_b5g6r5_write,
|
||||
},
|
||||
Workload {
|
||||
name: "texel_buffer_b5g6r5_read",
|
||||
plan: texel_buffer_b5g6r5_read,
|
||||
},
|
||||
];
|
||||
|
||||
/// A creation workload: objects of one kind made and released in turn (`Session::create`).
|
||||
@@ -286,10 +338,39 @@ pub enum OwnRow {
|
||||
/// command buffers held for room (`Metrics::held_for_room`). Every command buffer is to complete, and
|
||||
/// each of B's to end after its signaller, or the row fails.
|
||||
TwoQueues,
|
||||
/// The kinds a long-running VM makes and releases all day, made and released together in each
|
||||
/// of 200 iterations: a host memory import with a buffer over it, an exported block with a
|
||||
/// buffer over it, a video surface of each decoder route the device exports (a dma-buf at the
|
||||
/// VA-API layout, the host's opaque handle at NVIDIA's), as the replay player's video
|
||||
/// surfaces are made, with a view of each plane at an index, its buffer and plane 0 kept past
|
||||
/// the surface's release, as an exported surface's plane outlives it; a two-plane `RGBA8Unorm`
|
||||
/// surface of the opaque handle whose plane 0 a pass renders beside another colour attachment
|
||||
/// (a plane stand-in, where the device takes the plane as a linear colour attachment only in
|
||||
/// a pass of planes alone); two render pipeline states; and two targets a pass each draws
|
||||
/// into, then reads through a texture after a memory barrier, a Private one (an attachment
|
||||
/// view, and a shadow on a device without the attachment feedback loop) and one over a Shared
|
||||
/// buffer (a shadow where the device's linear image takes it in place, an image of no feedback
|
||||
/// usage). Its gauges ([`OwnReport::gauges`]) are read settled after the 100th and the 200th
|
||||
/// iterations, and after its device drops.
|
||||
///
|
||||
/// [`OwnReport::gauges`]: crate::run::OwnReport::gauges
|
||||
ChurnAllDay,
|
||||
/// The other kinds a program makes, made and released together in each of 200 iterations: a
|
||||
/// compute pipeline state of one of 40 contents in turn, more than the device keeps stage
|
||||
/// entries for; a pass that draws under a `Counting` visibility mode into a target of 4
|
||||
/// samples and resolves it into a texture over a Shared buffer (a resolve image, where the
|
||||
/// device's linear image of the texture takes no attachment usage); a texture over a buffer in
|
||||
/// an exported block, which the device holds in an image of its own, read by a blit; a texture
|
||||
/// in a heap of a Shared block, read by a blit, where the device places one; and an indirect
|
||||
/// command buffer, executed whole in a pass of its own with a state made for indirect command
|
||||
/// buffers, its commands as the commit resets them (each drawing nothing).
|
||||
/// Its gauges, with the bytes of the preprocess regions the executions hold, are read as
|
||||
/// [`ChurnAllDay`](Self::ChurnAllDay)'s are.
|
||||
ChurnRest,
|
||||
}
|
||||
|
||||
/// The rows of one runtime's own.
|
||||
pub const OWN_ROWS: [Own; 5] = [
|
||||
pub const OWN_ROWS: [Own; 7] = [
|
||||
Own {
|
||||
name: "idle_frees",
|
||||
row: OwnRow::IdleFrees,
|
||||
@@ -310,6 +391,14 @@ pub const OWN_ROWS: [Own; 5] = [
|
||||
name: "two_queues",
|
||||
row: OwnRow::TwoQueues,
|
||||
},
|
||||
Own {
|
||||
name: "churn_all_day",
|
||||
row: OwnRow::ChurnAllDay,
|
||||
},
|
||||
Own {
|
||||
name: "churn_rest",
|
||||
row: OwnRow::ChurnRest,
|
||||
},
|
||||
];
|
||||
|
||||
/// The kernel of a compute pipeline state row's warm-up
|
||||
@@ -381,6 +470,13 @@ pub fn render_library_air() -> Result<Vec<u8>> {
|
||||
assemble("examples/runtime_examples.ll")
|
||||
}
|
||||
|
||||
/// The indirect command buffers' library's AIR bitcode: the owned fixture
|
||||
/// `engine/icb_merged_indexed.ll`, whose `icb_indexed_vertex` and `icb_indexed_fragment` draw
|
||||
/// the commands a kernel encodes, assembled by `llvm-as`.
|
||||
pub fn icb_library_air() -> Result<Vec<u8>> {
|
||||
assemble("engine/icb_merged_indexed.ll")
|
||||
}
|
||||
|
||||
/// The public fixture at `file`, LLVM text, assembled by `llvm-as`.
|
||||
fn assemble(file: &str) -> Result<Vec<u8>> {
|
||||
let ll = metal2vulkan_devtools::fixtures_dir().join(file);
|
||||
@@ -1178,6 +1274,106 @@ fn vote_loop() -> Plan {
|
||||
}
|
||||
}
|
||||
|
||||
/// Rows of 224 `float`s into a `Shared` buffer, four a thread (`row_tail`): every row starts at a
|
||||
/// multiple of 16 bytes, and every thread writes four.
|
||||
fn row_tail_224() -> Plan {
|
||||
row_tail("row_tail_224", 224, Storage::Shared, 1)
|
||||
}
|
||||
|
||||
/// Rows of 27,730 `float`s (2 mod 4) into a `Shared` buffer, four a thread (`row_tail`): every
|
||||
/// other row starts at a multiple of 16 bytes, the others 8 past one, and a row's last thread
|
||||
/// writes two.
|
||||
fn row_tail_27730() -> Plan {
|
||||
row_tail("row_tail_27730", 27_730, Storage::Shared, 1)
|
||||
}
|
||||
|
||||
/// Rows of 49 `float`s into a `Shared` buffer, four a thread (`row_tail`): one row in four starts at
|
||||
/// a multiple of 16 bytes, and a row's last thread writes one.
|
||||
fn row_tail_49() -> Plan {
|
||||
row_tail("row_tail_49", 49, Storage::Shared, 1)
|
||||
}
|
||||
|
||||
/// [`row_tail_224`] into a `Private` buffer, 16 times the threads.
|
||||
fn row_tail_224_private() -> Plan {
|
||||
row_tail("row_tail_224_private", 224, Storage::Private, 16)
|
||||
}
|
||||
|
||||
/// [`row_tail_27730`] into a `Private` buffer, 16 times the threads.
|
||||
fn row_tail_27730_private() -> Plan {
|
||||
row_tail("row_tail_27730_private", 27_730, Storage::Private, 16)
|
||||
}
|
||||
|
||||
/// [`row_tail_49`] into a `Private` buffer, 16 times the threads.
|
||||
fn row_tail_49_private() -> Plan {
|
||||
row_tail("row_tail_49_private", 49, Storage::Private, 16)
|
||||
}
|
||||
|
||||
/// `row_tail` over rows of `w` `float`s: about 381,000 threads times `scale` in threadgroups of
|
||||
/// 1,024, as many rows as `ceil(w / 4)` threads a row make of them, each thread reading a `float4`
|
||||
/// of a `Private` buffer and writing its lanes from column `4 (i mod threads a row)` of its row of
|
||||
/// a buffer of `storage` and about 6.1 MB times `scale` that nothing else writes: the first lane,
|
||||
/// then the three, two or one more the row holds.
|
||||
fn row_tail(name: &str, w: u32, storage: Storage, scale: u32) -> Plan {
|
||||
const THREADS: u32 = 381_952;
|
||||
let per_row = w.div_ceil(4);
|
||||
let rows = scale * THREADS / per_row;
|
||||
let threads = rows * per_row;
|
||||
let input: Vec<f32> = (words(15, 4 * threads as usize).into_iter())
|
||||
.map(|word| (word & 0xFFFF) as f32)
|
||||
.collect();
|
||||
let mut output = vec![0u32; (rows * w) as usize];
|
||||
for index in 0..threads {
|
||||
let (row, col) = (index / per_row, (index % per_row) << 2);
|
||||
let lanes = (w - col).min(4) as usize;
|
||||
let at = (row * w + col) as usize;
|
||||
let from = 4 * index as usize;
|
||||
for lane in 0..lanes {
|
||||
output[at + lane] = input[from + lane].to_bits();
|
||||
}
|
||||
}
|
||||
let length = (4 * u64::from(rows * w)).next_multiple_of(16);
|
||||
Plan {
|
||||
name: name.to_owned(),
|
||||
library: Source::Authored,
|
||||
buffers: vec![
|
||||
private(float_bytes(&input)),
|
||||
BufferPlan {
|
||||
length,
|
||||
storage,
|
||||
contents: None,
|
||||
modified: None,
|
||||
},
|
||||
],
|
||||
dispatches: vec![Dispatch {
|
||||
blits: Vec::new(),
|
||||
function: "row_tail".to_owned(),
|
||||
linked: Vec::new(),
|
||||
constants: Vec::new(),
|
||||
bindings: vec![
|
||||
buffer(0, 0),
|
||||
buffer(1, 1),
|
||||
bytes(2, word_bytes(&[w, per_row])),
|
||||
],
|
||||
grid: Grid::Threads {
|
||||
threads: [u64::from(threads), 1, 1],
|
||||
per_group: [1024, 1, 1],
|
||||
},
|
||||
}],
|
||||
expect: vec![Expect {
|
||||
buffer: 1,
|
||||
values: Values::Words(output),
|
||||
}],
|
||||
textures: Vec::new(),
|
||||
expect_textures: Vec::new(),
|
||||
outputs: Vec::new(),
|
||||
per_command_buffer: None,
|
||||
per_encoder: None,
|
||||
commit_to_complete: false,
|
||||
frames: false,
|
||||
scaled: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Reads of a 64 KiB table as constants (`constant_reads`): 2^20 threads in threadgroups of 256,
|
||||
/// each folding 64 of the table's 4,096 entries into a word, the table `Managed`, and the first
|
||||
/// 256 bytes of it written again by the CPU before each run and marked with `didModifyRange:`, as
|
||||
@@ -1683,3 +1879,204 @@ fn texture_read() -> Plan {
|
||||
scaled: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// The texels of the texel-buffer workloads: 2^24, one a thread for a write and 16 a thread for a
|
||||
/// read.
|
||||
const TEXEL_BUFFER_TEXELS: u32 = 1 << 24;
|
||||
|
||||
/// A texture buffer (`MTLTextureTypeTextureBuffer`) of `pixel_format` and `usage` over the plan's
|
||||
/// buffer 0, of [`TEXEL_BUFFER_TEXELS`] texels.
|
||||
fn texel_buffer(pixel_format: PixelFormat, usage: TextureUsage) -> TexturePlan {
|
||||
TexturePlan {
|
||||
texture_type: TextureType::TextureBuffer,
|
||||
pixel_format,
|
||||
width: TEXEL_BUFFER_TEXELS,
|
||||
height: 1,
|
||||
array_length: 1,
|
||||
sample_count: 1,
|
||||
usage,
|
||||
storage: Storage::Private,
|
||||
source: TextureSource::Buffer { buffer: 0 },
|
||||
texels: None,
|
||||
bytes: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Writes of an `R8Unorm` texture buffer, one texel a thread (`texel_buffer_write`): each texel
|
||||
/// the code its index's hash names, which its value `c / 255` stores. Where a device holds the
|
||||
/// format's texels four to a word, neighbouring threads write one word.
|
||||
fn texel_buffer_r8_write() -> Plan {
|
||||
let codes: Vec<u8> = (0..TEXEL_BUFFER_TEXELS).map(texel_buffer_code).collect();
|
||||
let stored = (codes.chunks(4))
|
||||
.map(|word| u32::from_le_bytes([word[0], word[1], word[2], word[3]]))
|
||||
.collect();
|
||||
texel_buffer_write("texel_buffer_r8_write", PixelFormat::R8Unorm, stored)
|
||||
}
|
||||
|
||||
/// The code `texel_buffer_write` writes at texel `i`: its index's hash.
|
||||
fn texel_buffer_code(i: u32) -> u8 {
|
||||
(i.wrapping_mul(2_654_435_761) >> 24) as u8
|
||||
}
|
||||
|
||||
/// Writes of a `B5G6R5Unorm` texture buffer, one texel a thread (`texel_buffer_write`): each
|
||||
/// texel's red, green and blue the value `c / 255` of its index's code `c` (the kernel's `float`
|
||||
/// product of `c` and `1 / 255`), each channel of `n` bits its value times `2^n - 1` rounded to
|
||||
/// nearest even, as Metal writes a normalized channel. A device that holds the format as words
|
||||
/// writes two texels to a word, each by two atomics; one that holds it directly, its own view.
|
||||
fn texel_buffer_b5g6r5_write() -> Plan {
|
||||
let texels: Vec<u16> = (0..TEXEL_BUFFER_TEXELS)
|
||||
.map(|i| {
|
||||
let value = f64::from(f32::from(texel_buffer_code(i)) * (1.0f32 / 255.0f32));
|
||||
let code = |bits: u32| (value * f64::from((1u32 << bits) - 1)).round_ties_even() as u16;
|
||||
code(5) << 11 | code(6) << 5 | code(5)
|
||||
})
|
||||
.collect();
|
||||
let stored = (texels.chunks(2))
|
||||
.map(|pair| u32::from(pair[0]) | u32::from(pair[1]) << 16)
|
||||
.collect();
|
||||
texel_buffer_write(
|
||||
"texel_buffer_b5g6r5_write",
|
||||
PixelFormat::B5G6R5Unorm,
|
||||
stored,
|
||||
)
|
||||
}
|
||||
|
||||
/// Writes of a texture buffer of `pixel_format` (`texel_buffer_write`), whose bytes, as words,
|
||||
/// are `stored`.
|
||||
fn texel_buffer_write(name: &str, pixel_format: PixelFormat, stored: Vec<u32>) -> Plan {
|
||||
let bytes = crate::plan::element_bytes(pixel_format).unwrap_or(4);
|
||||
Plan {
|
||||
name: name.to_owned(),
|
||||
library: Source::Authored,
|
||||
buffers: vec![unset(u64::from(TEXEL_BUFFER_TEXELS) * u64::from(bytes))],
|
||||
textures: vec![texel_buffer(pixel_format, TextureUsage::SHADER_WRITE)],
|
||||
dispatches: vec![Dispatch {
|
||||
blits: Vec::new(),
|
||||
function: "texel_buffer_write".to_owned(),
|
||||
linked: Vec::new(),
|
||||
constants: Vec::new(),
|
||||
bindings: vec![texture(0, 0)],
|
||||
grid: Grid::groups_of_256(u64::from(TEXEL_BUFFER_TEXELS / 256)),
|
||||
}],
|
||||
expect: vec![Expect {
|
||||
buffer: 0,
|
||||
values: Values::Words(stored),
|
||||
}],
|
||||
expect_textures: Vec::new(),
|
||||
outputs: Vec::new(),
|
||||
per_command_buffer: None,
|
||||
per_encoder: None,
|
||||
commit_to_complete: false,
|
||||
frames: false,
|
||||
scaled: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// [`texel_buffer_read`] of `R8Unorm`.
|
||||
fn texel_buffer_r8_read() -> Plan {
|
||||
texel_buffer_read("texel_buffer_r8_read", PixelFormat::R8Unorm)
|
||||
}
|
||||
|
||||
/// [`texel_buffer_read`] of `R16Unorm`.
|
||||
fn texel_buffer_r16_read() -> Plan {
|
||||
texel_buffer_read("texel_buffer_r16_read", PixelFormat::R16Unorm)
|
||||
}
|
||||
|
||||
/// [`texel_buffer_read`] of `RGBA16Unorm`.
|
||||
fn texel_buffer_rgba16_read() -> Plan {
|
||||
texel_buffer_read("texel_buffer_rgba16_read", PixelFormat::RGBA16Unorm)
|
||||
}
|
||||
|
||||
/// [`texel_buffer_read`] of `BGRA8Unorm`.
|
||||
fn texel_buffer_bgra8_read() -> Plan {
|
||||
texel_buffer_read("texel_buffer_bgra8_read", PixelFormat::BGRA8Unorm)
|
||||
}
|
||||
|
||||
/// [`texel_buffer_read`] of `B5G6R5Unorm`.
|
||||
fn texel_buffer_b5g6r5_read() -> Plan {
|
||||
texel_buffer_read("texel_buffer_b5g6r5_read", PixelFormat::B5G6R5Unorm)
|
||||
}
|
||||
|
||||
/// Reads of a texture buffer of `pixel_format` (`R8Unorm`, `R16Unorm`, `RGBA16Unorm`,
|
||||
/// `BGRA8Unorm` or `B5G6R5Unorm`), 16 texels a thread (`texel_buffer_sum16`), of seeded bytes: each thread's sum of
|
||||
/// its texels' lanes, against the CPU's decode of the bytes (`c / (2^n - 1)` a channel, 1 for a
|
||||
/// missing alpha).
|
||||
fn texel_buffer_read(name: &str, pixel_format: PixelFormat) -> Plan {
|
||||
let bytes = crate::plan::element_bytes(pixel_format).unwrap_or(4) as usize;
|
||||
let length = TEXEL_BUFFER_TEXELS as usize * bytes;
|
||||
let data: Vec<u8> = (words(29, length / 4).into_iter())
|
||||
.flat_map(u32::to_le_bytes)
|
||||
.collect();
|
||||
let channels = |texel: &[u8]| -> [f64; 4] {
|
||||
let u16_at = |i: usize| f64::from(u16::from_le_bytes([texel[2 * i], texel[2 * i + 1]]));
|
||||
match pixel_format {
|
||||
PixelFormat::R8Unorm => [f64::from(texel[0]) / 255.0, 0.0, 0.0, 1.0],
|
||||
PixelFormat::R16Unorm => [u16_at(0) / 65535.0, 0.0, 0.0, 1.0],
|
||||
PixelFormat::RGBA16Unorm => [0, 1, 2, 3].map(|i| u16_at(i) / 65535.0),
|
||||
// Red in bits 11 to 15, green in 5 to 10, blue in 0 to 4.
|
||||
PixelFormat::B5G6R5Unorm => {
|
||||
let t = u16_at(0) as u32;
|
||||
let field = |shift: u32, bits: u32| {
|
||||
let max = (1u32 << bits) - 1;
|
||||
f64::from(t >> shift & max) / f64::from(max)
|
||||
};
|
||||
[field(11, 5), field(5, 6), field(0, 5), 1.0]
|
||||
}
|
||||
// Blue, green, red, alpha in memory.
|
||||
_ => [2, 1, 0, 3].map(|i| f64::from(texel[i]) / 255.0),
|
||||
}
|
||||
};
|
||||
let sums: Vec<f32> = (data.chunks(16 * bytes))
|
||||
.map(|texels| {
|
||||
let total: f64 = texels.chunks(bytes).flat_map(channels).sum();
|
||||
total as f32
|
||||
})
|
||||
.collect();
|
||||
Plan {
|
||||
name: name.to_owned(),
|
||||
library: Source::Authored,
|
||||
buffers: vec![
|
||||
private(data),
|
||||
unset(4 * u64::from(TEXEL_BUFFER_TEXELS / 16)),
|
||||
],
|
||||
textures: vec![texel_buffer(pixel_format, TextureUsage::SHADER_READ)],
|
||||
dispatches: vec![Dispatch {
|
||||
blits: Vec::new(),
|
||||
function: "texel_buffer_sum16".to_owned(),
|
||||
linked: Vec::new(),
|
||||
constants: Vec::new(),
|
||||
bindings: vec![texture(0, 0), buffer(0, 1)],
|
||||
grid: Grid::groups_of_256(u64::from(TEXEL_BUFFER_TEXELS / 16 / 256)),
|
||||
}],
|
||||
expect: vec![Expect {
|
||||
buffer: 1,
|
||||
values: Values::Floats {
|
||||
values: sums,
|
||||
tolerance: TEXEL_BUFFER_TOLERANCE + 16.0 * narrow_channels(pixel_format),
|
||||
},
|
||||
}],
|
||||
expect_textures: Vec::new(),
|
||||
outputs: Vec::new(),
|
||||
per_command_buffer: None,
|
||||
per_encoder: None,
|
||||
commit_to_complete: false,
|
||||
frames: false,
|
||||
scaled: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// How far a texel-buffer read's sum may be from the CPU's: 64 values of at most 1, summed in
|
||||
/// `float` in the kernel's order.
|
||||
const TEXEL_BUFFER_TOLERANCE: f32 = 1.0 / 1024.0;
|
||||
|
||||
/// How far a texel of `pixel_format` read through its own view may be from the CPU's in all its
|
||||
/// channels together: `PrecisionNote::DeviceTexelConversion`'s recorded bound (docs/API.md), 0.18
|
||||
/// of a code for each 5- or 6-bit channel, which a device that widens it by replicating its bits
|
||||
/// reaches (ANV, NVIDIA); an 8- or 16-bit code's one `f32` ulp is inside
|
||||
/// [`TEXEL_BUFFER_TOLERANCE`]. A sum reads 16 texels.
|
||||
fn narrow_channels(pixel_format: PixelFormat) -> f32 {
|
||||
match pixel_format {
|
||||
PixelFormat::B5G6R5Unorm => 0.18 * (2.0 / 31.0 + 1.0 / 63.0),
|
||||
_ => 0.0,
|
||||
}
|
||||
}
|
||||
@@ -405,6 +405,13 @@ fn run_all(args: &Args) -> Result<bool> {
|
||||
for (key, us) in &report.times {
|
||||
println!("M2V-MATRIX time harness-{runtime}/{name}/{key} {us:.3}");
|
||||
}
|
||||
for (point, values) in &report.gauges {
|
||||
for (gauge, value) in values {
|
||||
println!(
|
||||
"M2V-MATRIX gauge harness-{runtime}/{name}/{gauge}@{point} {value}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some(Err(why)) => {
|
||||
println!("{name}: FAILED: {runtime}: {why}");
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
//! `draw_full` into a target of 4 samples, which the pass resolves as it ends; `draw_full_rt` is
|
||||
//! `draw_full` into a target of `RenderTarget` usage alone, whose texels nothing checks;
|
||||
//! `bind_2000` is `draw_2000` with a vertex buffer and a fragment texture set before each draw,
|
||||
//! each alternating between two objects.
|
||||
//! each alternating between two objects. The `texel_buffer_` workloads write an `R8Unorm` or a
|
||||
//! `B5G6R5Unorm` texture buffer of 2^24 texels, one a thread (`texel_buffer_r8_write`,
|
||||
//! `texel_buffer_b5g6r5_write`), or read one of `R8Unorm`, `R16Unorm`, `RGBA16Unorm`,
|
||||
//! `BGRA8Unorm` or `B5G6R5Unorm`, 16 texels a thread (`texel_buffer_r8_read` and its kin), each a
|
||||
//! view of a `Private` buffer of the plan (`plan::TextureSource::Buffer`).
|
||||
//! Every command buffer of a workload's runs carries a scheduled handler and a completed handler,
|
||||
//! as the consumer's command buffers do, so the times hold what the runtime does to run them.
|
||||
//! A [`run::Session`] makes its objects, checks the first run, then times the rest. The authored
|
||||
@@ -160,6 +164,15 @@
|
||||
//! the signaller's GPU end the waiter starts (`wait_p50`, `wait_p90`) and the backlog's GPU idle
|
||||
//! then (`wait_a_gap_p50`, `wait_a_gap_p90`, `wait_a_per_cb`), judged as `export_submit_cost`'s are; its check is
|
||||
//! that every command buffer completes, each waiter after its signaller.
|
||||
//! `churn_all_day` and `churn_rest` make and release every object kind of their group together
|
||||
//! in each of 200 iterations, and record no time: they print the device's gauges, read once it
|
||||
//! settled after the 100th and the 200th iterations and after their device dropped, as
|
||||
//! `M2V-MATRIX gauge harness-<runtime>/<row>/<gauge>@100`, `@200` and `@drop`, which the matrix
|
||||
//! judges as it judges every gauge: still from `@100` to `@200`, and 0 at `@drop`. Their gauges are
|
||||
//! the harness's and eleven its workloads' records leave out: imports, exports, surface imports and
|
||||
//! buffers, plane stand-ins, shadows, stage entries, resolve images, textures copied over,
|
||||
//! occlusion pools and indirect command buffers; and the bytes of the preprocess regions
|
||||
//! executions of indirect command buffers hold, 0 once their command buffers completed.
|
||||
|
||||
use std::ptr::NonNull;
|
||||
|
||||
@@ -368,6 +381,15 @@ pub trait ComputeDevice: Device {
|
||||
/// that makes no such texture refuses it ([`Refused`]).
|
||||
fn new_texture(&self, texture: &plan::TexturePlan) -> Result<Self::Texture>;
|
||||
|
||||
/// `newTextureWithDescriptor:offset:bytesPerRow:` of `buffer` at offset 0, rows of `texture`'s
|
||||
/// width's bytes: `texture`'s texture buffer
|
||||
/// ([`TextureSource::Buffer`](plan::TextureSource::Buffer)).
|
||||
fn new_texture_buffer(
|
||||
&self,
|
||||
buffer: &Self::Buffer,
|
||||
texture: &plan::TexturePlan,
|
||||
) -> Result<Self::Texture>;
|
||||
|
||||
/// `newTextureViewWithPixelFormat:textureType:levels:slices:` of `parent`: `texture`'s pixel
|
||||
/// format and type, its one level and `slices` (its [`TextureSource::View`](plan::TextureSource::View)).
|
||||
fn new_texture_view(
|
||||
|
||||
@@ -232,6 +232,23 @@ impl TexturePlan {
|
||||
if width == 0 || height == 0 || slices == 0 {
|
||||
return Some(format!("its size {width}x{height}x{slices} is empty"));
|
||||
}
|
||||
let over_buffer = matches!(self.source, TextureSource::Buffer { .. });
|
||||
if over_buffer || self.texture_type == TextureType::TextureBuffer {
|
||||
let moved = texels_move || self.texels.is_some() || self.bytes.is_some();
|
||||
let one_row = (height, slices, self.sample_count) == (1, 1, 1);
|
||||
if !(over_buffer && self.texture_type == TextureType::TextureBuffer && one_row)
|
||||
|| moved
|
||||
|| self.row_bytes().is_none()
|
||||
{
|
||||
return Some(
|
||||
"a texture buffer is a view of a plan buffer's bytes of a format whose \
|
||||
element size the harness knows, one row of one slice and sample, whose \
|
||||
texels the buffer's contents hold"
|
||||
.to_owned(),
|
||||
);
|
||||
}
|
||||
return None;
|
||||
}
|
||||
match (self.texture_type, slices, self.sample_count) {
|
||||
(TextureType::Type2D, 1, 1) | (TextureType::Type2DArray, _, 1) => {}
|
||||
(TextureType::Type2DMultisample, 1, 2..) => {
|
||||
@@ -320,6 +337,13 @@ pub enum TextureSource {
|
||||
/// `newTextureWithDescriptor:offset:bytesPerRow:` of a buffer of its own, of its storage
|
||||
/// mode, at offset 0, its rows `minimumLinearTextureAlignmentForPixelFormat:` apart: 2D.
|
||||
OverBuffer,
|
||||
/// `newTextureWithDescriptor:offset:bytesPerRow:` of the plan's buffer `buffer`, by index, at
|
||||
/// offset 0, its row its width's bytes: a texture buffer (`MTLTextureTypeTextureBuffer`), a
|
||||
/// view of the buffer's bytes, of the buffer's storage.
|
||||
Buffer {
|
||||
/// The buffer, by index.
|
||||
buffer: usize,
|
||||
},
|
||||
/// `newTextureViewWithPixelFormat:textureType:levels:slices:` of an earlier texture of the
|
||||
/// plan, `parent` by index: its format, its one level, and its slices from `slice`, as many
|
||||
/// as the view's array length. The view's format, extent, usage and storage are its parent's.
|
||||
@@ -336,10 +360,11 @@ pub enum TextureSource {
|
||||
pub fn element_bytes(pixel_format: PixelFormat) -> Option<u32> {
|
||||
use PixelFormat as F;
|
||||
Some(match pixel_format {
|
||||
F::R16Unorm => 2,
|
||||
F::R8Unorm => 1,
|
||||
F::R16Unorm | F::B5G6R5Unorm => 2,
|
||||
F::R32Uint | F::RG16Unorm | F::RGBA8Unorm | F::RGBA8UnormSRGB | F::RGBA8Uint => 4,
|
||||
F::BGRA8Unorm => 4,
|
||||
F::RGBA16Float => 8,
|
||||
F::RGBA16Float | F::RGBA16Unorm => 8,
|
||||
F::RGBA32Float => 16,
|
||||
_ => return None,
|
||||
})
|
||||
@@ -908,6 +933,17 @@ impl Plan {
|
||||
if let Some(problem) = texture.problem(expected) {
|
||||
return Err(format!("{name}: texture {i}: {problem}").into());
|
||||
}
|
||||
if let TextureSource::Buffer { buffer } = texture.source {
|
||||
let fits = (self.buffers.get(buffer).zip(texture.row_bytes()))
|
||||
.is_some_and(|(b, row)| row <= b.length);
|
||||
if !fits {
|
||||
return Err(format!(
|
||||
"{name}: texture {i} views buffer {buffer}, which the plan lacks or \
|
||||
which is shorter than its texels"
|
||||
)
|
||||
.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
let known = |buffer: usize| buffer < self.buffers.len();
|
||||
for (i, dispatch) in self.dispatches.iter().enumerate() {
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
//! The harness makes no heap and no texture over a buffer on the runtime: a plan with such a
|
||||
//! texture is refused ([`Refused`]).
|
||||
|
||||
mod churn;
|
||||
mod own;
|
||||
|
||||
use crate::authored::OwnRow;
|
||||
@@ -580,6 +581,9 @@ impl crate::ComputeDevice for Device {
|
||||
texture over a buffer on the runtime",
|
||||
),
|
||||
TextureSource::View { .. } => return Err("a view is made from its parent".into()),
|
||||
TextureSource::Buffer { .. } => {
|
||||
return Err("a texture buffer is made from its buffer".into());
|
||||
}
|
||||
};
|
||||
if let Some(refused) = refused {
|
||||
return Err(Box::new(Refused(refused.to_owned())));
|
||||
@@ -606,6 +610,34 @@ impl crate::ComputeDevice for Device {
|
||||
}
|
||||
}
|
||||
|
||||
/// At an index as [`new_texture`](crate::ComputeDevice::new_texture) places a texture.
|
||||
fn new_texture_buffer(
|
||||
&self,
|
||||
buffer: &Buffer,
|
||||
texture: &plan::TexturePlan,
|
||||
) -> Result<rt::Texture> {
|
||||
let mut descriptor = rt::TextureDescriptor::new(
|
||||
rt::TextureType::TextureBuffer,
|
||||
texture.pixel_format,
|
||||
texture.width,
|
||||
1,
|
||||
);
|
||||
descriptor.usage = texture.usage;
|
||||
descriptor.storage_mode = match texture.storage {
|
||||
Storage::Shared => rt::StorageMode::Shared,
|
||||
Storage::Managed => rt::StorageMode::Managed,
|
||||
Storage::Private => rt::StorageMode::Private,
|
||||
};
|
||||
let row = texture
|
||||
.row_bytes()
|
||||
.ok_or("a texture buffer of an unknown format")?;
|
||||
let made = |index| buffer.buffer.new_texture(&descriptor, index, 0, row);
|
||||
match class(texture.pixel_format, texture.usage) {
|
||||
Some(class) => self.place(class, |index| made(Some(index))),
|
||||
None => made(None).map_err(error),
|
||||
}
|
||||
}
|
||||
|
||||
/// At an index as [`new_texture`](crate::ComputeDevice::new_texture) places a texture.
|
||||
fn new_texture_view(
|
||||
&self,
|
||||
@@ -898,13 +930,20 @@ impl crate::ComputeCommandEncoder<Device> for rt::ComputeCommandEncoder {
|
||||
}
|
||||
}
|
||||
|
||||
/// The gauges the harness reports, by name: every count of an object kind the runtime keeps
|
||||
/// live, so the matrix's `@drop` check and its reading between the 100th and 200th runs cover
|
||||
/// each kind. The byte and age gauges, which move with load, and the thread ids are left out.
|
||||
/// The gauges the harness reports, by name, which the matrix's `@drop` check and its reading
|
||||
/// between the 100th and 200th runs cover: the counts of the object kinds a compute workload
|
||||
/// makes or reaches (buffers, textures and their levels' elements, samplers, pipeline states and
|
||||
/// their compiled contents and variants, command buffers, their timestamp query pools and bound
|
||||
/// buffers' descriptor set pools, set 1's slots, memory blocks and events), and the render
|
||||
/// contents and attachment views, which none of its workloads makes. The kinds only draws,
|
||||
/// passes, surfaces, imports, exports and indirect command buffers make are the churn rows'
|
||||
/// besides these (`churn::recorded`). The byte and age gauges, which move with load, and the
|
||||
/// thread ids are left out.
|
||||
fn named(gauges: rt::Gauges) -> Vec<(&'static str, u64)> {
|
||||
vec![
|
||||
("buffers", gauges.buffers),
|
||||
("textures", gauges.textures),
|
||||
("level_elements", gauges.level_elements),
|
||||
("samplers", gauges.samplers),
|
||||
("lod_clamp_variants", gauges.lod_clamp_variants),
|
||||
("pipelines", gauges.pipelines),
|
||||
@@ -914,6 +953,8 @@ fn named(gauges: rt::Gauges) -> Vec<(&'static str, u64)> {
|
||||
("render_contents", gauges.render_contents),
|
||||
("attachment_views", gauges.attachment_views),
|
||||
("command_buffers", gauges.command_buffers),
|
||||
("timestamp_pools", gauges.timestamp_pools),
|
||||
("buffer_set_pools", gauges.buffer_set_pools),
|
||||
("descriptor_slots", gauges.descriptor_slots),
|
||||
("blocks", gauges.blocks),
|
||||
("events", gauges.events),
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -27,7 +27,7 @@
|
||||
//! handler. A's thread commits while its queue has room for a command buffer, so its backlog
|
||||
//! stays full throughout.
|
||||
|
||||
use super::error;
|
||||
use super::{churn, error};
|
||||
use crate::authored::OwnRow;
|
||||
use crate::run::OwnReport;
|
||||
use crate::Result;
|
||||
@@ -114,16 +114,27 @@ const SMALL_LEN: u64 = 4096;
|
||||
const FRAME: Duration = Duration::from_micros(16_667);
|
||||
const FRAMES: u32 = 60;
|
||||
|
||||
/// `row` on a device of its own on `physical`.
|
||||
/// `row` on a device of its own on `physical`. A row that records gauges records them once more
|
||||
/// after the device dropped, through its counters, which outlive it.
|
||||
pub(super) fn run(physical: &rt::PhysicalDevice, row: OwnRow) -> Result<OwnReport> {
|
||||
let device = rt::Device::new(physical, rt::DeviceOptions::default()).map_err(error)?;
|
||||
match row {
|
||||
let counters = device.counters();
|
||||
let mut report = match row {
|
||||
OwnRow::IdleFrees => idle_frees(&device, false),
|
||||
OwnRow::IdleFreesUnderCommits => idle_frees(&device, true),
|
||||
OwnRow::ExportSubmitCost => export_submit_cost(&device),
|
||||
OwnRow::ReleasesUnderWork => releases_under_work(&device),
|
||||
OwnRow::TwoQueues => two_queues(&device),
|
||||
OwnRow::ChurnAllDay => churn::all_day(&device),
|
||||
OwnRow::ChurnRest => churn::rest(&device),
|
||||
}?;
|
||||
if !report.gauges.is_empty() {
|
||||
drop(device);
|
||||
report
|
||||
.gauges
|
||||
.push(("drop", churn::recorded(counters.gauges())));
|
||||
}
|
||||
Ok(report)
|
||||
}
|
||||
|
||||
/// The two-queue row ([`OwnRow::TwoQueues`]): its part with unrelated work, then its part in
|
||||
@@ -197,7 +208,11 @@ fn two_queues(device: &rt::Device) -> Result<OwnReport> {
|
||||
signalled.held,
|
||||
),
|
||||
];
|
||||
Ok(OwnReport { lines, times })
|
||||
Ok(OwnReport {
|
||||
lines,
|
||||
times,
|
||||
gauges: Vec::new(),
|
||||
})
|
||||
}
|
||||
|
||||
/// What a part of the two-queue row measured, in microseconds: each of B's command buffers'
|
||||
@@ -533,6 +548,7 @@ fn releases_under_work(device: &rt::Device) -> Result<OwnReport> {
|
||||
Ok(OwnReport {
|
||||
lines: vec![line],
|
||||
times: Vec::new(),
|
||||
gauges: Vec::new(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -630,6 +646,7 @@ fn idle_frees(device: &rt::Device, commits: bool) -> Result<OwnReport> {
|
||||
Ok(OwnReport {
|
||||
lines: vec![line],
|
||||
times: Vec::new(),
|
||||
gauges: Vec::new(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -655,6 +672,7 @@ fn export_submit_cost(device: &rt::Device) -> Result<OwnReport> {
|
||||
return Ok(OwnReport {
|
||||
lines: vec!["exports no handle: nothing timed".to_owned()],
|
||||
times: Vec::new(),
|
||||
gauges: Vec::new(),
|
||||
});
|
||||
};
|
||||
drop(export);
|
||||
@@ -720,6 +738,7 @@ fn export_submit_cost(device: &rt::Device) -> Result<OwnReport> {
|
||||
"{handle:?}: a submit takes {none:.3} us with no export and {live:.3} us with {EXPORTS} live"
|
||||
)],
|
||||
times: vec![("none", none), ("exports_64", live)],
|
||||
gauges: Vec::new(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -528,6 +528,10 @@ pub struct OwnReport {
|
||||
pub lines: Vec<String>,
|
||||
/// Its times, each the last part of its matrix key under the row and microseconds.
|
||||
pub times: Vec<(&'static str, f64)>,
|
||||
/// Its gauges, each read at a point (`100` and `200`, after those iterations, and `drop`,
|
||||
/// after its device dropped), by name: the matrix's gauge records of the row, which hold
|
||||
/// still from `100` to `200` and read 0 at `drop`. Empty for a row that records none.
|
||||
pub gauges: Vec<(&'static str, Vec<(&'static str, u64)>)>,
|
||||
}
|
||||
|
||||
/// What the timed creations measured.
|
||||
@@ -686,10 +690,14 @@ impl<D: ComputeDevice> Harness<D> {
|
||||
}
|
||||
}
|
||||
|
||||
/// `plan`'s textures and sampler states, its pipeline states, one per kernel, from its
|
||||
/// library, which [`load`](Self::load) made, and its buffers. The textures come first: a
|
||||
/// `plan`'s buffers, textures and sampler states, and its pipeline states, one per kernel, from
|
||||
/// its library, which [`load`](Self::load) made. The buffers and textures come first: a
|
||||
/// runtime that makes none refuses the plan for that before its kernels are translated.
|
||||
fn make(&self, plan: &Plan) -> Result<Made<D>> {
|
||||
// The buffers first: a texture buffer is a view of one.
|
||||
let buffers = (plan.buffers.iter())
|
||||
.map(|buffer| self.device.new_buffer(buffer.length, buffer.storage))
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
let mut textures: Vec<D::Texture> = Vec::with_capacity(plan.textures.len());
|
||||
for texture in &plan.textures {
|
||||
let made = match texture.source {
|
||||
@@ -698,6 +706,11 @@ impl<D: ComputeDevice> Harness<D> {
|
||||
let slices = slice..slice + texture.array_length;
|
||||
self.device.new_texture_view(parent, texture, slices)?
|
||||
}
|
||||
TextureSource::Buffer { buffer } => {
|
||||
let buffer =
|
||||
(buffers.get(buffer)).ok_or("a texture buffer's buffer is unmade")?;
|
||||
self.device.new_texture_buffer(buffer, texture)?
|
||||
}
|
||||
_ => self.device.new_texture(texture)?,
|
||||
};
|
||||
textures.push(made);
|
||||
@@ -768,9 +781,6 @@ impl<D: ComputeDevice> Harness<D> {
|
||||
};
|
||||
state_of.push(at);
|
||||
}
|
||||
let buffers = (plan.buffers.iter())
|
||||
.map(|buffer| self.device.new_buffer(buffer.length, buffer.storage))
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
Ok(Made {
|
||||
buffers,
|
||||
textures,
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
//! pooled block takes a block of its own; and what textures released under work in flight leave
|
||||
//! waiting stays within what the work in flight accounts for (`releases_under_work`), and a
|
||||
//! queue's command buffers beside another queue's backlog complete, each waiter after its
|
||||
//! signaller (`two_queues`).
|
||||
//! signaller (`two_queues`); and each churn row's gauges hold still from its 100th iteration to its
|
||||
//! 200th and read 0 once its device dropped (`churn_all_day`, `churn_rest`).
|
||||
#![cfg(any(m2v_gpu, m2v_cpu_icd))]
|
||||
|
||||
use metal2vulkan_harness::authored::OwnRow;
|
||||
use metal2vulkan_harness::run::OwnReport;
|
||||
use metal2vulkan_harness::{rt, Buffer, Device, Storage};
|
||||
|
||||
#[test]
|
||||
@@ -55,3 +57,55 @@ fn two_queues_complete_each_waiter_after_its_signaller() {
|
||||
.unwrap_or_else(|why| panic!("{why}"));
|
||||
println!("two_queues: {}", report.lines.join("; "));
|
||||
}
|
||||
|
||||
/// `row`'s report, its lines printed under `name`, its gauges held as the matrix judges them:
|
||||
/// each still from `@100` to `@200`, but the memory pool's `blocks`, which may only fall, and
|
||||
/// each 0 at `@drop`.
|
||||
fn churned(name: &str, row: OwnRow) {
|
||||
let device = rt::system_default(None).unwrap();
|
||||
let report: OwnReport = (device.own_row(row))
|
||||
.expect("a row of the runtime's own")
|
||||
.unwrap_or_else(|why| panic!("{why}"));
|
||||
for line in &report.lines {
|
||||
println!("{name}: {line}");
|
||||
}
|
||||
let at = |point: &str| {
|
||||
let read = report.gauges.iter().find(|(at, _)| *at == point);
|
||||
read.unwrap_or_else(|| panic!("{name}: no read at {point}"))
|
||||
.1
|
||||
.clone()
|
||||
};
|
||||
let (first, second, dropped) = (at("100"), at("200"), at("drop"));
|
||||
let moved: Vec<String> = (first.iter().zip(&second))
|
||||
.filter(|((gauge, at), (_, then))| {
|
||||
if *gauge == "blocks" {
|
||||
then > at
|
||||
} else {
|
||||
then != at
|
||||
}
|
||||
})
|
||||
.map(|((gauge, at), (_, then))| format!("{gauge} {at} -> {then}"))
|
||||
.collect();
|
||||
let live: Vec<String> = (dropped.iter())
|
||||
.filter(|(_, value)| *value != 0)
|
||||
.map(|(gauge, value)| format!("{gauge} {value}"))
|
||||
.collect();
|
||||
assert!(
|
||||
moved.is_empty() && live.is_empty(),
|
||||
"{name}: from the 100th iteration to the 200th: {moved:?}; live at the device's drop: {live:?}"
|
||||
);
|
||||
}
|
||||
|
||||
/// The runtime's row `churn_all_day`: the kinds a long-running VM makes and releases all day, made
|
||||
/// and released together in each iteration, leave the device's gauges still from the 100th
|
||||
/// iteration to the 200th, and none live once its device dropped.
|
||||
#[test]
|
||||
fn churn_all_day_holds_every_gauge_still_and_frees_all_at_the_drop() {
|
||||
churned("churn_all_day", OwnRow::ChurnAllDay);
|
||||
}
|
||||
|
||||
/// The runtime's row `churn_rest`: the other kinds, as `churn_all_day`'s are.
|
||||
#[test]
|
||||
fn churn_rest_holds_every_gauge_still_and_frees_all_at_the_drop() {
|
||||
churned("churn_rest", OwnRow::ChurnRest);
|
||||
}
|
||||
+1329
-511
File diff suppressed because it is too large.
Load diff
@@ -14,17 +14,28 @@
|
||||
//!
|
||||
//! A use that writes a placement makes its texture links stale. A stale texture's next use that
|
||||
//! writes it moves its whole image from undefined to its home layout first, in a barrier that
|
||||
//! orders every earlier command before it and every later one after it. Reads move nothing. A
|
||||
//! buffer is never moved; its writes make its texture links stale. A stale texture takes part
|
||||
//! until that write, whether or not a link is left: the release of what wrote over its bytes
|
||||
//! leaves them written over. A host write of a texture (`Texture::replace_region`) is such a use:
|
||||
//! as its call records its upload, under the work lock, the move it owes goes in the upload ahead
|
||||
//! of its copy, and its write applies ([`host_write`]). A command buffer committed after the call
|
||||
//! is staged after it and runs after the upload; one submitted before the call was staged before
|
||||
//! it and runs before the upload. A host write while a command buffer committed before it, and
|
||||
//! not yet completed, writes the texture's bytes or a resource's over them is the program's race,
|
||||
//! as Metal's `replaceRegion` makes it: the upload may run ahead of that command buffer, and the
|
||||
//! texture's next write may move it.
|
||||
//! orders every earlier command before it and every later one after it. Reads of a texture that
|
||||
//! has moved once move nothing. A buffer is never moved; its writes make its texture links stale.
|
||||
//! A stale texture takes part until that write, whether or not a link is left: the release of
|
||||
//! what wrote over its bytes leaves them written over. A host write of a texture
|
||||
//! (`Texture::replace_region`) is such a use: as its call records its upload, under the work lock,
|
||||
//! the move it owes goes in the upload ahead of its copy, and its write applies ([`host_write`]).
|
||||
//! A command buffer committed after the call is staged after it and runs after the upload; one
|
||||
//! submitted before the call was staged before it and runs before the upload. A host write while
|
||||
//! a command buffer committed before it, and not yet completed, writes the texture's bytes or a
|
||||
//! resource's over them is the program's race, as Metal's `replaceRegion` makes it: the upload
|
||||
//! may run ahead of that command buffer, and the texture's next write may move it.
|
||||
//!
|
||||
//! A texture placed over another's bytes is unmoved ([`Placement::unmoved`]): no upload moves its
|
||||
//! image out of the undefined layout it is made in, as a move may write the image's memory (a
|
||||
//! compression state's initialization), which the other's earlier reads may still need. Its
|
||||
//! first use in the command stream moves it instead, read or write, as a write of a stale one
|
||||
//! does: a read is checked as a write is, below. A host read of it (`Texture::get_bytes`) moves
|
||||
//! it in the read's upload, ahead of its copy, as a host write's does ([`host_read`]).
|
||||
//! A `useHeap:` is a read of each unmoved texture of the heap ([`unmoved`]), as a kernel or a draw
|
||||
//! may then reach it through an address with no declaration. Each heap lists its unmoved textures,
|
||||
//! and each leaves the list as it moves or is released, so a `useHeap:` of a heap with none looks
|
||||
//! at no texture, and one on a device with none locks nothing.
|
||||
//!
|
||||
//! Inside a command buffer, encode order is the order its commands run in: [`Marks`] keeps what
|
||||
//! the command buffer did to the placements it touched, and a write of one that a link was
|
||||
@@ -32,15 +43,19 @@
|
||||
//! nor any of its links, depends on the placement as the command buffer starts: a check at the
|
||||
//! head of its segment ([`Aliased`]), which the submit thread resolves as it stages the segment,
|
||||
//! in the order the device's one queue runs segments, a move it finds owed going in a command
|
||||
//! buffer of its own ahead of the segment's, in its submit info ([`stage`]). A segment that read
|
||||
//! one of the placement's links before the write ends first, so the move never goes ahead of that
|
||||
//! read. Then the segment's writes apply, in their order.
|
||||
//! buffer of its own ahead of the segment's, in its submit info ([`stage`]). The first use in the
|
||||
//! command buffer of a texture unmoved as it is encoded, a read among them, is such a check too,
|
||||
//! which finds a move owed where the texture is still unmoved as the segment is staged. A segment
|
||||
//! that read one of the placement's links before the use ends first, so the move never goes ahead
|
||||
//! of that read; inside a rendering nothing ends, and the check goes at the head of the segment
|
||||
//! the pass is in. Then the segment's writes apply, in their order.
|
||||
|
||||
use crate::command::DeviceLoss;
|
||||
use crate::counters::Metric;
|
||||
use crate::device::{lock, Core};
|
||||
use crate::error::Error;
|
||||
use crate::hazard::{Access, HeapId};
|
||||
use crate::memory::BlockId;
|
||||
use crate::record::{memory_barrier, Reach, Recorder};
|
||||
use ash::vk;
|
||||
use std::collections::HashMap;
|
||||
@@ -138,6 +153,9 @@ type ByAddress = HashMap<usize, Entry, BuildHasherDefault<DefaultHasher>>;
|
||||
pub(crate) struct Places {
|
||||
textures: ByAddress,
|
||||
buffers: ByAddress,
|
||||
/// Its unmoved textures ([`Placement::unmoved`]), held weakly: each leaves as it moves or is
|
||||
/// released, so the list holds at most the heap's live textures, and none once each moved.
|
||||
unmoved: Vec<Weak<Placement>>,
|
||||
/// For the device tests: the entries the heap's last placement looked at.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
examined: usize,
|
||||
@@ -167,12 +185,18 @@ pub(crate) struct Placement {
|
||||
/// As the submit thread has staged the segments: a link was written since its own last write,
|
||||
/// or it was placed over another's bytes and is not yet written. A texture's alone is read.
|
||||
stale: Arc<AtomicBool>,
|
||||
/// A texture placed over another's bytes whose image has not yet moved from the undefined
|
||||
/// layout it is made in, as the submit thread has staged the segments (or as a host read or
|
||||
/// write recorded its upload): its first use moves it. Clear for every other placement, and
|
||||
/// never set again once clear. An unmoved texture is stale.
|
||||
unmoved: AtomicBool,
|
||||
}
|
||||
|
||||
impl Placement {
|
||||
/// A resource placed at bytes `[start, end)` of `heap`'s block, an image where `moved`,
|
||||
/// linked with the placements of the heap whose bytes meet those, a buffer with textures
|
||||
/// alone. A texture with links is stale from the start: its bytes may hold another's writes.
|
||||
/// alone. A texture with links is stale and unmoved from the start: its bytes may hold
|
||||
/// another's writes, which that one's reads may still need.
|
||||
pub(crate) fn new(
|
||||
heap: &Arc<HeapId>,
|
||||
start: u64,
|
||||
@@ -185,6 +209,7 @@ impl Placement {
|
||||
links: Mutex::new(Links::default()),
|
||||
linked: AtomicBool::new(false),
|
||||
stale: Arc::new(AtomicBool::new(false)),
|
||||
unmoved: AtomicBool::new(false),
|
||||
});
|
||||
let texture = moved.is_some();
|
||||
let mut places = lock(heap.places());
|
||||
@@ -222,6 +247,11 @@ impl Placement {
|
||||
place.linked.store(true, Relaxed);
|
||||
heap.linked(true);
|
||||
*lock(&place.links) = links;
|
||||
if texture {
|
||||
place.unmoved.store(true, Relaxed);
|
||||
places.unmoved.push(Arc::downgrade(&place));
|
||||
heap.unmoved(true);
|
||||
}
|
||||
}
|
||||
let entry = Entry {
|
||||
start,
|
||||
@@ -247,20 +277,31 @@ impl Placement {
|
||||
self.moved.is_some() && self.stale.load(Relaxed)
|
||||
}
|
||||
|
||||
/// Placed over another's bytes: its first move from the layout it is made in waits for every
|
||||
/// earlier command's writes.
|
||||
pub(crate) fn over(&self) -> bool {
|
||||
self.stale.load(Relaxed)
|
||||
/// A texture placed over another's bytes whose image has not yet moved from the undefined
|
||||
/// layout it is made in: its first use moves it, and no upload does.
|
||||
pub(crate) fn unmoved(&self) -> bool {
|
||||
self.unmoved.load(Relaxed)
|
||||
}
|
||||
|
||||
fn key(&self) -> usize {
|
||||
std::ptr::from_ref(self) as usize
|
||||
}
|
||||
|
||||
/// Its write, in the order the device's one queue runs it: its staleness clears and its
|
||||
/// texture links turn stale. A texture that took part only for the move it owed takes none
|
||||
/// once written.
|
||||
/// Its image's move from undefined is recorded, in the order the device's one queue runs it:
|
||||
/// it is unmoved no more, and leaves its heap's list.
|
||||
fn left_undefined(&self) {
|
||||
if self.unmoved.swap(false, Relaxed) {
|
||||
let me: *const Placement = self;
|
||||
(lock(self.heap.places()).unmoved).retain(|place| !std::ptr::eq(place.as_ptr(), me));
|
||||
self.heap.unmoved(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// Its write, in the order the device's one queue runs it, after its move where it owed one:
|
||||
/// it is unmoved no more, its staleness clears and its texture links turn stale. A texture
|
||||
/// that took part only for the move it owed takes none once written.
|
||||
fn written(&self) {
|
||||
self.left_undefined();
|
||||
self.stale.store(false, Relaxed);
|
||||
let links = lock(&self.links);
|
||||
for link in links.textures.iter() {
|
||||
@@ -276,8 +317,14 @@ impl Drop for Placement {
|
||||
fn drop(&mut self) {
|
||||
let me: *const Placement = self;
|
||||
let texture = self.moved.is_some();
|
||||
let unmoved = *self.unmoved.get_mut();
|
||||
let met: Vec<Arc<Placement>> = {
|
||||
lock(self.heap.places()).of(texture).remove(&self.key());
|
||||
let mut places = lock(self.heap.places());
|
||||
places.of(texture).remove(&self.key());
|
||||
if unmoved {
|
||||
(places.unmoved).retain(|place| !std::ptr::eq(place.as_ptr(), me));
|
||||
}
|
||||
drop(places);
|
||||
let links = self.links.get_mut().unwrap_or_else(PoisonError::into_inner);
|
||||
links
|
||||
.all()
|
||||
@@ -287,6 +334,9 @@ impl Drop for Placement {
|
||||
if *self.linked.get_mut() {
|
||||
self.heap.linked(false);
|
||||
}
|
||||
if unmoved {
|
||||
self.heap.unmoved(false);
|
||||
}
|
||||
for other in &met {
|
||||
let mut links = lock(&other.links);
|
||||
links.drop_to(me, texture);
|
||||
@@ -325,6 +375,9 @@ struct Mark {
|
||||
state: State,
|
||||
/// The segment, from 1, whose commands last read it; 0 where none did.
|
||||
read: usize,
|
||||
/// A command of the command buffer used it, read or write: its first use, which moves it
|
||||
/// where it is unmoved, is behind.
|
||||
used: bool,
|
||||
}
|
||||
|
||||
/// What a command buffer's commands did to the linked placements they touched, by placement's
|
||||
@@ -340,6 +393,7 @@ impl Marks {
|
||||
_place: place(),
|
||||
state: State::Untouched,
|
||||
read: 0,
|
||||
used: false,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -349,6 +403,18 @@ impl Marks {
|
||||
.map_or(State::Untouched, |mark| mark.state)
|
||||
}
|
||||
|
||||
/// Whether a use of texture `place`, a write where `writes`, adds a check at the head of its
|
||||
/// segment: a write of one that nothing in the command buffer wrote, nor any of its links; or
|
||||
/// a read of one unmoved as it is encoded that no command of the command buffer used before.
|
||||
fn checks(&self, place: &Placement, writes: bool) -> bool {
|
||||
match writes {
|
||||
true => self.state(place) == State::Untouched,
|
||||
false => {
|
||||
place.unmoved() && !(self.marks.get(&place.key())).is_some_and(|mark| mark.used)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// For a command whose uses of linked placements are `uses`, in segment `segment` (from 0):
|
||||
/// whether a check it adds must go at the head of a segment of its own, a link of the
|
||||
/// placement checked having been read in this one.
|
||||
@@ -358,8 +424,7 @@ impl Marks {
|
||||
.is_some_and(|mark| mark.read == segment + 1)
|
||||
};
|
||||
(uses.iter())
|
||||
.filter(|(place, access)| access.writes() && place.moved.is_some())
|
||||
.filter(|(place, _)| self.state(place) == State::Untouched)
|
||||
.filter(|(place, access)| place.moved.is_some() && self.checks(place, access.writes()))
|
||||
.any(|(place, _)| lock(&place.links).all().any(read_here))
|
||||
}
|
||||
|
||||
@@ -373,22 +438,17 @@ impl Marks {
|
||||
part: &mut Aliased,
|
||||
) -> Vec<vk::ImageMemoryBarrier2<'static>> {
|
||||
let mut moves: Vec<vk::ImageMemoryBarrier2<'static>> = Vec::new();
|
||||
for (place, _) in uses.iter().filter(|(_, access)| access.writes()) {
|
||||
for (place, access) in uses {
|
||||
let Some(moved) = place.moved else {
|
||||
continue;
|
||||
};
|
||||
match self.state(place) {
|
||||
State::Fresh => {}
|
||||
State::Stale => {
|
||||
if !moves.iter().any(|m| m.image == moved.image) {
|
||||
moves.push(moved.barrier());
|
||||
}
|
||||
}
|
||||
State::Untouched => {
|
||||
if !part.checks.iter().any(|p| Arc::ptr_eq(p, place)) {
|
||||
part.checks.push(Arc::clone(place));
|
||||
}
|
||||
let writes = access.writes();
|
||||
if writes && self.state(place) == State::Stale {
|
||||
if !moves.iter().any(|m| m.image == moved.image) {
|
||||
moves.push(moved.barrier());
|
||||
}
|
||||
} else if self.checks(place, writes) {
|
||||
part.check(place, writes);
|
||||
}
|
||||
}
|
||||
for (place, access) in uses {
|
||||
@@ -400,21 +460,35 @@ impl Marks {
|
||||
}
|
||||
part.writes.push(Arc::clone(place));
|
||||
}
|
||||
let mark = self.mark(place.key(), || Arc::downgrade(place));
|
||||
mark.used = true;
|
||||
if access.reads() {
|
||||
self.mark(place.key(), || Arc::downgrade(place)).read = segment + 1;
|
||||
mark.read = segment + 1;
|
||||
}
|
||||
}
|
||||
moves
|
||||
}
|
||||
}
|
||||
|
||||
/// A segment's part: the checks at its head and its writes of linked placements, in order.
|
||||
/// A segment's part: the checks at its head, each with whether a write added it (else a first
|
||||
/// read of an unmoved texture), and its writes of linked placements, in order.
|
||||
#[derive(Default)]
|
||||
pub(crate) struct Aliased {
|
||||
checks: Vec<Arc<Placement>>,
|
||||
checks: Vec<(Arc<Placement>, bool)>,
|
||||
writes: Vec<Arc<Placement>>,
|
||||
}
|
||||
|
||||
impl Aliased {
|
||||
/// A check of `place` at the segment's head, a write's where `writes`: one for each
|
||||
/// placement, a write's where any is.
|
||||
fn check(&mut self, place: &Arc<Placement>, writes: bool) {
|
||||
match self.checks.iter_mut().find(|(p, _)| Arc::ptr_eq(p, place)) {
|
||||
Some((_, by_write)) => *by_write |= writes,
|
||||
None => self.checks.push((Arc::clone(place), writes)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Placement {
|
||||
/// For the device tests: its links.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
@@ -437,9 +511,10 @@ impl Aliased {
|
||||
}
|
||||
}
|
||||
|
||||
/// As the submit thread stages a segment whose part is `part`: the moves its checks find owed,
|
||||
/// recorded into a command buffer of `recorder` that goes ahead of the segment's, each counted
|
||||
/// (`Metrics::heap_moves`); then its writes, applied in order. `None` where nothing is owed.
|
||||
/// As the submit thread stages a segment whose part is `part`: the moves its checks find owed (a
|
||||
/// write's where its texture is stale, any where its texture is unmoved), recorded into a command
|
||||
/// buffer of `recorder` that goes ahead of the segment's, each counted (`Metrics::heap_moves`);
|
||||
/// then its writes, applied in order. `None` where nothing is owed.
|
||||
///
|
||||
/// Err: the Vulkan call that failed, which loses the device.
|
||||
pub(crate) fn stage(
|
||||
@@ -447,10 +522,16 @@ pub(crate) fn stage(
|
||||
recorder: &mut Option<Recorder>,
|
||||
part: &Aliased,
|
||||
) -> Result<Option<vk::CommandBuffer>, DeviceLoss> {
|
||||
let moves: Vec<vk::ImageMemoryBarrier2<'static>> = (part.checks.iter())
|
||||
.filter(|place| place.stale.load(Relaxed))
|
||||
let owed: Vec<&Arc<Placement>> = (part.checks.iter())
|
||||
.filter(|(place, writes)| place.unmoved() || (*writes && place.stale.load(Relaxed)))
|
||||
.map(|(place, _)| place)
|
||||
.collect();
|
||||
let moves: Vec<vk::ImageMemoryBarrier2<'static>> = (owed.iter())
|
||||
.filter_map(|place| place.moved.map(Moved::barrier))
|
||||
.collect();
|
||||
for place in owed {
|
||||
place.left_undefined();
|
||||
}
|
||||
for place in &part.writes {
|
||||
place.written();
|
||||
}
|
||||
@@ -516,6 +597,49 @@ pub(crate) unsafe fn host_write(core: &Core, command: vk::CommandBuffer, place:
|
||||
place.written();
|
||||
}
|
||||
|
||||
/// A host read of the heap texture placed as `place` (`Texture::get_bytes`), recorded into
|
||||
/// `command`, its upload's, under the work lock, ahead of the read's copy: where it is unmoved,
|
||||
/// its move from undefined, as [`record`] records it, counted (`Metrics::heap_moves`). The read is
|
||||
/// its first use; the call submits the upload at once, so the move goes ahead of every command
|
||||
/// buffer committed after the call, as a host write's does ([`host_write`]). Nothing where it owes
|
||||
/// no move.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// As [`host_write`].
|
||||
pub(crate) unsafe fn host_read(core: &Core, command: vk::CommandBuffer, place: &Placement) {
|
||||
let Some(moved) = place.moved.filter(|_| place.unmoved()) else {
|
||||
return;
|
||||
};
|
||||
let counters = &core.counters;
|
||||
// SAFETY: the caller's contract.
|
||||
unsafe {
|
||||
record(
|
||||
&core.device,
|
||||
command,
|
||||
&[moved.barrier()],
|
||||
Metric::UploadBarriers,
|
||||
&mut |m| counters.count(m),
|
||||
)
|
||||
};
|
||||
place.left_undefined();
|
||||
}
|
||||
|
||||
/// The unmoved textures of the heaps in `block` (a `useHeap:`'s), each of which a command may
|
||||
/// reach next through the heap with no declaration: nothing, with no lock taken, where the device
|
||||
/// has none.
|
||||
pub(crate) fn unmoved(core: &Core, block: BlockId) -> Vec<Arc<Placement>> {
|
||||
if !core.heap_ids.any_unmoved() {
|
||||
return Vec::new();
|
||||
}
|
||||
let mut unmoved = Vec::new();
|
||||
for heap in core.heap_ids.heaps_in(block) {
|
||||
let places = lock(heap.places());
|
||||
unmoved.extend(places.unmoved.iter().filter_map(Weak::upgrade));
|
||||
}
|
||||
unmoved
|
||||
}
|
||||
|
||||
/// Records `moves`, heap textures' moves from undefined ([`Marks::used`]), into `command`, in one
|
||||
/// barrier that orders every earlier command before them and every later one after, counted in
|
||||
/// `cause`, one of the barrier causes, and each move counted (`Metrics::heap_moves`).
|
||||
|
||||
@@ -25,10 +25,12 @@
|
||||
//! zeros, answers 0 to its size and level queries and drops its writes. The Metal Shading Language
|
||||
//! leaves every member function of a null texture undefined (section 6.13.18), so these are the
|
||||
//! runtime's answers, not Metal's. A sampler
|
||||
//! element is its array's default sampler, nearest and clamped to the edge; the comparison
|
||||
//! array's compares with `NEVER`, so a comparison through it answers 0, as Metal's default
|
||||
//! comparison (`MTLCompareFunctionNever`) does. Vulkan has no null sampler. The device writes
|
||||
//! every element once at creation ([`Arrays::new`]).
|
||||
//! element is its array's default sampler, nearest, clamped to the edge and reaching every level
|
||||
//! (`maxLod` `VK_LOD_CLAMP_NONE`); the comparison array's compares with `NEVER`, so a comparison
|
||||
//! through it answers 0, as Metal's default comparison (`MTLCompareFunctionNever`) does. Vulkan
|
||||
//! has no null sampler. Element 0, which no index of a grant reaches, is a sampled cube's read by
|
||||
//! face: the translator samples the cube view there at the texel's centre and the read's level
|
||||
//! (docs/RESOURCE-ID.md). The device writes every element once at creation ([`Arrays::new`]).
|
||||
//!
|
||||
//! Where the device reads attachments through textures (`floor::Capabilities::attachment_reads`),
|
||||
//! the sampled-texture array is twice as long: element `i + 65,536` is texture `i`'s second
|
||||
@@ -1056,6 +1058,7 @@ impl Made {
|
||||
.address_mode_u(vk::SamplerAddressMode::CLAMP_TO_EDGE)
|
||||
.address_mode_v(vk::SamplerAddressMode::CLAMP_TO_EDGE)
|
||||
.address_mode_w(vk::SamplerAddressMode::CLAMP_TO_EDGE)
|
||||
.max_lod(vk::LOD_CLAMP_NONE)
|
||||
.compare_enable(compare)
|
||||
.compare_op(vk::CompareOp::NEVER);
|
||||
// SAFETY: the device is live.
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -6,7 +6,8 @@ use crate::error::Error;
|
||||
use crate::memory::{self, BlockInfo};
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Mutex, PoisonError, Weak};
|
||||
use std::sync::atomic::AtomicU64;
|
||||
use std::sync::{Arc, Mutex, OnceLock, PoisonError, Weak};
|
||||
|
||||
/// No Metal counterpart: rt's own handle of a block of memory the consumer places buffers in, as
|
||||
/// a placement `MTLHeap`'s buffers sit in its memory
|
||||
@@ -39,6 +40,9 @@ pub(crate) struct Claim {
|
||||
core: Weak<Core>,
|
||||
/// The block, until the last handle drops or the device's teardown takes it.
|
||||
block: Mutex<Option<Arc<memory::Block>>>,
|
||||
/// An exported block's: where its making completes, the point the other API's first access
|
||||
/// waits for ([`Block::wait_until_ready`]); unset for every other block.
|
||||
ready: OnceLock<Arc<AtomicU64>>,
|
||||
}
|
||||
|
||||
impl Block {
|
||||
@@ -49,6 +53,7 @@ impl Block {
|
||||
info,
|
||||
core: Arc::downgrade(core),
|
||||
block: Mutex::new(Some(Arc::new(block))),
|
||||
ready: OnceLock::new(),
|
||||
});
|
||||
lock(&core.claims).insert(info.id, Arc::downgrade(&claim));
|
||||
Block { claim }
|
||||
@@ -59,6 +64,18 @@ impl Block {
|
||||
Weak::as_ptr(&self.claim.core) == Arc::as_ptr(core)
|
||||
}
|
||||
|
||||
/// An exported block's point where its making completes ([`Block::wait_until_ready`]);
|
||||
/// `None` for every other block.
|
||||
pub(crate) fn ready(&self) -> Option<Arc<AtomicU64>> {
|
||||
self.claim.ready.get().cloned()
|
||||
}
|
||||
|
||||
/// Sets an exported block's `ready` point, once, at its make
|
||||
/// ([`Device::new_exported_block`](crate::Device::new_exported_block)).
|
||||
pub(crate) fn set_ready(&self, ready: Arc<AtomicU64>) {
|
||||
self.claim.ready.get_or_init(|| ready);
|
||||
}
|
||||
|
||||
/// Its device and the block, while the claim holds it.
|
||||
///
|
||||
/// Err: [`Error::Quiesced`] once the device's teardown took the block.
|
||||
|
||||
@@ -122,6 +122,12 @@ impl Drop for DeviceCopy {
|
||||
}
|
||||
|
||||
impl BufferInner {
|
||||
/// The heap it was placed in ([`Device::new_heap_buffer`]), whose id its uses take in the
|
||||
/// hazard sets.
|
||||
pub(crate) fn heap(&self) -> Option<&Arc<HeapId>> {
|
||||
self.heap.as_ref()
|
||||
}
|
||||
|
||||
/// Its bytes' placement in its heap, where it was placed in one (`crate::alias`).
|
||||
pub(crate) fn placement(&self) -> Option<&Arc<Placement>> {
|
||||
self.place.as_ref()
|
||||
@@ -302,9 +308,11 @@ impl Device {
|
||||
/// Private block the consumer holds, its [`Buffer::gpu_address`] that block's address plus
|
||||
/// the offset. The rest past its first `copied` bytes is zeroed, ahead of every command
|
||||
/// buffer committed after this call, and those first bytes (all of them where `copied` is
|
||||
/// the length or more) are named as [`Buffer::did_modify_range`] names a range: the next
|
||||
/// commit copies them from the consumer's bytes on the GPU. The consumer's own bytes are as
|
||||
/// it wrote them. The consumer's block lives until every copy from it has run.
|
||||
/// the length or more) are copied from the consumer's bytes on the GPU at the next commit,
|
||||
/// whatever its encoders name, as Metal's device copy holds a buffer's bytes from its
|
||||
/// making; a range [`Buffer::did_modify_range`] names waits for a commit that names the
|
||||
/// buffer. The consumer's own bytes are as it wrote them. The consumer's block lives until
|
||||
/// every copy from it has run.
|
||||
///
|
||||
/// Metal keeps such a copy on a Mac with a discrete GPU, and places it itself. Here the
|
||||
/// consumer places both, as it places every buffer ([`Device::new_buffer`]): any byte offset,
|
||||
@@ -325,8 +333,7 @@ impl Device {
|
||||
/// [`Refusal::ManagedCopyExported`] for one in an exported block; for a device copy,
|
||||
/// [`Error::Quiesced`], and [`Error::Vulkan`] where the upload's command buffer cannot be made,
|
||||
/// or what making the zero source returns where the fill copies from it and the block-maker
|
||||
/// thread made none; for one whose first bytes are copied, what [`Buffer::did_modify_range`]
|
||||
/// returns.
|
||||
/// thread made none; for one whose first bytes are copied, [`Error::Quiesced`].
|
||||
pub fn new_managed_buffer(
|
||||
&self,
|
||||
bytes: (BlockId, u64),
|
||||
@@ -397,7 +404,7 @@ impl Device {
|
||||
}
|
||||
let buffer = self.buffer(block, offset, length, contents, Some(copy), None);
|
||||
if copied > 0 {
|
||||
buffer.did_modify_range(0, copied)?;
|
||||
core.work.made(&buffer.inner, copied)?;
|
||||
}
|
||||
Ok(buffer)
|
||||
}
|
||||
@@ -541,19 +548,33 @@ impl Buffer {
|
||||
}
|
||||
|
||||
/// `didModifyRange:`: the consumer changed `length` bytes from `start` of the buffer's bytes.
|
||||
/// Of a Managed buffer with a device copy, the range is named, and the next commit of a command
|
||||
/// buffer, with commands or none, on any queue, takes every range named since, once each,
|
||||
/// merged where they overlap or touch: GPU copies from the consumer's block into the device
|
||||
/// copy, and into the images of its textures over the range in images of their own, go ahead
|
||||
/// of that command buffer's commands in its submission. One with nothing for the GPU (no
|
||||
/// commands, or only dispatches that record none) submits the copies alone and completes after
|
||||
/// them. So a command buffer committed after this call reads the bytes the consumer wrote
|
||||
/// before its commit, as Metal owes. Metal on a discrete Mac GPU (an AMD Radeon Pro 5300M)
|
||||
/// takes a named range at the first commit whose encoder binds its buffer; this takes it at
|
||||
/// the next commit of any command buffer, the same commit where that one binds the buffer, and
|
||||
/// never a later one. The copy reads the consumer's bytes as it runs, so a write made after the
|
||||
/// commit may reach it, where Metal leaves the range undefined for the GPU. Of any other
|
||||
/// buffer it does nothing, as the GPU reads the consumer's bytes. It allocates nothing.
|
||||
/// Of a Managed buffer with a device copy, the range is named, merged with the buffer's others
|
||||
/// where they overlap or touch, and the first commit, on any queue, of a command buffer whose
|
||||
/// encoders name the buffer takes them, once each. An encoder names it by binding it in a slot
|
||||
/// of any stage, by [`use_resource`](crate::ComputeCommandEncoder::use_resource), in a blit, as
|
||||
/// an index, indirect, tessellation factor or visibility result buffer, or through a texture
|
||||
/// over it. GPU copies from the consumer's block into the device copy, and into the images of
|
||||
/// its textures over the range in images of their own, go ahead of that command buffer's
|
||||
/// commands in its submission. One with nothing for the GPU (no commands, or only dispatches
|
||||
/// that record none) submits the copies alone and completes after them. A commit of a command
|
||||
/// buffer that does not name the buffer takes nothing of it, so a shader that reaches the
|
||||
/// buffer through its address alone reads the bytes the device copy last took: Metal's
|
||||
/// contract has a resource reached through an address declared by `useResource:`.
|
||||
///
|
||||
/// So a command buffer that names the buffer, committed after this call, reads the bytes the
|
||||
/// consumer's block holds when the copy runs: those written before this call, as Metal owes,
|
||||
/// and those written after it and before that commit, where Metal leaves the range undefined
|
||||
/// for the GPU. That is Metal's answer on a discrete Mac GPU: an AMD Radeon Pro 5300M under
|
||||
/// macOS 26.7.1, 8 rounds each, takes a named range at the first commit whose encoders bind
|
||||
/// the buffer in a compute or a vertex slot (with a draw), declare it by `useResource:` or read
|
||||
/// it in a blit's copy, with its bytes as of that commit; an unrelated commit takes nothing;
|
||||
/// and a buffer no encoder names, reached through its address, keeps its last synced bytes
|
||||
/// (jobs 81602 and 81644). The other ways of naming it hold to the same rule unaudited on
|
||||
/// Metal, as does a named range narrower than a later write, which takes the range's bytes
|
||||
/// alone. The copy reads the consumer's bytes as it runs, so a write made after the commit may
|
||||
/// reach it, where Metal leaves the range undefined for the GPU. Of any other buffer it does
|
||||
/// nothing, as the GPU reads the consumer's bytes, as it does on an Intel UHD Graphics 630,
|
||||
/// whose Managed buffers are one copy (jobs 81603 and 81645). It allocates nothing.
|
||||
///
|
||||
/// Err: [`Refusal::ModifiedRange`] for a range that leaves the buffer; for a copy,
|
||||
/// [`Error::Quiesced`].
|
||||
@@ -690,6 +711,16 @@ pub(crate) trait BufferObject {
|
||||
(&inner.block, inner.copy.as_ref())
|
||||
}
|
||||
|
||||
/// The bytes from the buffer's first byte to the end of the block shaders reach it in: its
|
||||
/// block's, or a Managed buffer's device copy's.
|
||||
fn device_tail(&self) -> u64 {
|
||||
let inner = self.object();
|
||||
match &inner.copy {
|
||||
Some(copy) => copy.block.memory.len.saturating_sub(copy.offset),
|
||||
None => inner.block.memory.len.saturating_sub(inner.offset),
|
||||
}
|
||||
}
|
||||
|
||||
/// The `VkBuffer` shaders reach the buffer through and the buffer's offset in it.
|
||||
fn device_range(&self) -> (vk::Buffer, u64) {
|
||||
let inner = self.object();
|
||||
@@ -699,6 +730,19 @@ pub(crate) trait BufferObject {
|
||||
}
|
||||
}
|
||||
|
||||
/// Where byte `offset` of an exported surface's memory, whose resources are `aliases`, lies
|
||||
/// in the `VkBuffer` shaders reach this buffer through, and its offset there, where this
|
||||
/// buffer is on that memory ([`crate::Surface::buffer`]); `None` for any other buffer.
|
||||
fn surface_range(
|
||||
&self,
|
||||
aliases: &Arc<crate::handed::Aliases>,
|
||||
offset: u64,
|
||||
) -> Option<(vk::Buffer, u64)> {
|
||||
let inner = self.object();
|
||||
let on = (inner.block.aliases.as_ref()).is_some_and(|own| Arc::ptr_eq(own, aliases));
|
||||
(on && inner.copy.is_none()).then(|| inner.block.memory.range(offset))
|
||||
}
|
||||
|
||||
/// Its own resource id, whatever heap it is in.
|
||||
fn id(&self) -> u32 {
|
||||
self.object().id
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
//! writes, opaque bytes: a device or driver version whose header differs in any byte, its
|
||||
//! `pipelineCacheUUID` included, has a blob of its own. A directory keeps at most
|
||||
//! [`BLOBS_KEPT`] blobs: a device's seed removes the oldest past that, by last write, its own
|
||||
//! counted among the kept. The reaper
|
||||
//! counted among the kept, and a blob's temporary file a write cut short left once it is older
|
||||
//! than [`STALE_TEMP`]. The reaper
|
||||
//! makes an empty cache first when it starts, which a creation that comes before it waits for
|
||||
//! (microseconds); then it reads the blob, makes a cache from it and makes that the cache
|
||||
//! creations take. So no creation waits for the blob's read or parse. What creations compiled in
|
||||
@@ -20,11 +21,17 @@
|
||||
//!
|
||||
//! The reaper writes the cache's data over the blob, a temporary file renamed over it and never
|
||||
//! appended to, once creation is quiet (no creation running and none for [`QUIET_NANOS`]) after a
|
||||
//! creation: at most once a quiet period, and only where the size the driver gives grew by more
|
||||
//! than an eighth since the last write, so a run that makes nothing new writes nothing and a
|
||||
//! device's writes over its life come to a few times the blob's size. The device's drop writes it
|
||||
//! once more where the size changed at all. A crash between writes loses only the pipelines made
|
||||
//! since the last. No guest call waits for a write.
|
||||
//! creation: at most once a quiet period, and only where the size the driver gives at least
|
||||
//! doubled since the last write, so a run that makes nothing new writes nothing. The reaper's end,
|
||||
//! at a quiesce or at the device's teardown, writes it once more where the size changed at all,
|
||||
//! so a process that ends after a quiesce, with no drop, keeps what it made: where a creation
|
||||
//! still runs, it waits for it until the quiesce's deadline, past which it is skipped and counted
|
||||
//! (`Metrics::pipeline_cache_writes_skipped`). The device's drop writes it where it changed since.
|
||||
//! So the data of a device's writes over its life comes to at most three times the data it
|
||||
//! leaves, where the cache stays within its bound: the looks' to at most twice the last one's,
|
||||
//! and the last write's to what it leaves. A crash between writes loses the pipelines made since
|
||||
//! the last, at most those made since the cache's size last doubled. No guest call waits for a
|
||||
//! write.
|
||||
//!
|
||||
//! **Reads exclude creations.** Every creation holds a lock shared ([`Caches::creations`]) from
|
||||
//! before it takes a cache until it ends, and the reaper's look holds it exclusive around its
|
||||
@@ -41,7 +48,9 @@
|
||||
//! holds it (counted in `Metrics::pipeline_caches_replaced`); the next write replaces the blob with
|
||||
//! the fresh cache's data, so the blob holds at most the bound too, with no second file. A write
|
||||
//! of data past the bound, the teardown's of a cache that grew past it after the last look, is
|
||||
//! skipped (`Metrics::pipeline_cache_writes_skipped`). [`Gauges::pipeline_cache_bytes`] is the
|
||||
//! skipped (`Metrics::pipeline_cache_writes_skipped`), and its size kept as the last written, so
|
||||
//! the drop after the reaper's last write skipped neither reads the same data again nor counts
|
||||
//! another skip. [`Gauges::pipeline_cache_bytes`] is the
|
||||
//! cache's size at the reaper's last look. Without a directory the cache is the same, and nothing is on disk.
|
||||
//!
|
||||
//! **The lowerings.** The store keeps one file per lowered function (a kernel, or a render
|
||||
@@ -137,7 +146,7 @@ use std::sync::{
|
||||
Arc, Condvar, Mutex, OnceLock, PoisonError, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
||||
TryLockError,
|
||||
};
|
||||
use std::time::{Duration, SystemTime};
|
||||
use std::time::{Duration, Instant, SystemTime};
|
||||
|
||||
/// The cap of the lowerings in a cache directory where the consumer names none: half of it, what
|
||||
/// the store is sure to keep, is about seven times the 9.16 MB a long recorded session's 282
|
||||
@@ -151,6 +160,16 @@ pub(crate) const PIPELINE_CACHE_BOUND: u64 = 128 << 20;
|
||||
/// How long pipeline creation stays quiet, no creation running and none ending, before the
|
||||
/// reaper looks at the cache: 20 ms, in nanoseconds of [`host_time`].
|
||||
const QUIET_NANOS: u64 = 20_000_000;
|
||||
/// The age past which a blob's temporary file ([`write_whole`]) is a write's that ended before its
|
||||
/// rename, its process killed or crashed, and the seed's prune removes it ([`prune_blobs`]): a
|
||||
/// write's file lives only for that write. A younger one, of a write another process may still
|
||||
/// rename, stays; where the prune removes one a write still holds, that write fails, a miss.
|
||||
const STALE_TEMP: Duration = Duration::from_secs(60);
|
||||
|
||||
/// How often the reaper's last write of the blob ([`Caches::last_write`]) tries again for
|
||||
/// [`Caches::creations`] while a creation holds it.
|
||||
const LAST_WRITE_STEP: Duration = Duration::from_millis(10);
|
||||
|
||||
/// The first bytes of a blob, before its data's length and checksum.
|
||||
const MAGIC: &[u8; 8] = b"m2vblob1";
|
||||
/// The start of a device's blob's name, under the cache directory.
|
||||
@@ -784,23 +803,45 @@ pub(crate) fn blob_name(header: &[u8; 32]) -> String {
|
||||
}
|
||||
|
||||
/// Removes the blobs in `dir` past the [`BLOBS_KEPT`] most recently written, the blob named `own`
|
||||
/// counted among the kept
|
||||
/// whether or not it is there yet. A temporary file, and anything not named as a blob, stays.
|
||||
/// counted among the kept whether or not it is there yet, and each blob's temporary file
|
||||
/// ([`write_whole`]) older than [`STALE_TEMP`], which a write cut short before its rename left. A
|
||||
/// younger temporary file, and anything not named as a blob or its temporary file, stays.
|
||||
pub(crate) fn prune_blobs(dir: &Path, own: &str) {
|
||||
let Ok(entries) = fs::read_dir(dir) else {
|
||||
return;
|
||||
};
|
||||
let mut others: Vec<(SystemTime, PathBuf)> = (entries.flatten())
|
||||
.filter_map(|entry| {
|
||||
let name = entry.file_name();
|
||||
let name = name.to_str()?;
|
||||
let digits = name.strip_prefix(BLOB)?.strip_prefix('-')?;
|
||||
let blob = digits.len() == 64 && digits.bytes().all(|byte| byte.is_ascii_hexdigit());
|
||||
(blob && name != own).then_some(())?;
|
||||
let time = entry.metadata().and_then(|meta| meta.modified()).ok()?;
|
||||
Some((time, entry.path()))
|
||||
})
|
||||
.collect();
|
||||
let now = SystemTime::now();
|
||||
let mut others: Vec<(SystemTime, PathBuf)> = Vec::new();
|
||||
for entry in entries.flatten() {
|
||||
let name = entry.file_name();
|
||||
let Some(name) = name.to_str() else {
|
||||
continue;
|
||||
};
|
||||
let Some(rest) = name
|
||||
.strip_prefix(BLOB)
|
||||
.and_then(|rest| rest.strip_prefix('-'))
|
||||
else {
|
||||
continue;
|
||||
};
|
||||
let (digits, temp) = match rest.split_once('.') {
|
||||
Some((digits, temp)) => (digits, Some(temp)),
|
||||
None => (rest, None),
|
||||
};
|
||||
let blob = digits.len() == 64 && digits.bytes().all(|byte| byte.is_ascii_hexdigit());
|
||||
let Some(time) = (entry.metadata().and_then(|meta| meta.modified()).ok()).filter(|_| blob)
|
||||
else {
|
||||
continue;
|
||||
};
|
||||
match temp {
|
||||
Some(temp) if temp.ends_with(".tmp") => {
|
||||
if now.duration_since(time).is_ok_and(|age| age > STALE_TEMP) {
|
||||
let _ = fs::remove_file(entry.path());
|
||||
}
|
||||
}
|
||||
None if name != own => others.push((time, entry.path())),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
others.sort_unstable_by_key(|(time, _)| std::cmp::Reverse(*time));
|
||||
for (_, path) in others.into_iter().skip(BLOBS_KEPT - 1) {
|
||||
let _ = fs::remove_file(path);
|
||||
@@ -1060,8 +1101,8 @@ struct Pipelines {
|
||||
current: Option<Arc<PipelineCache>>,
|
||||
/// The caches a fresh one or the blob's replaced, each destroyed once no creation holds it.
|
||||
retired: Vec<Arc<PipelineCache>>,
|
||||
/// The size of the current cache's data when the blob was last written from it, or when it
|
||||
/// was made: what the next write must grow past.
|
||||
/// The size of the current cache's data when the blob was last written from it, or its write
|
||||
/// skipped past the bound, or when it was made: what the next write must grow past.
|
||||
written: u64,
|
||||
}
|
||||
|
||||
@@ -1156,7 +1197,10 @@ impl Pending {
|
||||
}
|
||||
|
||||
/// A creation through the device's `VkPipelineCache`, from [`creation`] until it is dropped,
|
||||
/// holding [`Caches::creations`] shared: let go last, after the cache.
|
||||
/// holding [`Caches::creations`] shared: let go last, after the cache. It borrows the core and
|
||||
/// lives on its creating thread for that one create alone (`pipeline::made_through_cache`), so it
|
||||
/// never outlives that thread's create, and the teardown's last write, which waits for it, waits
|
||||
/// for no thread that drops the device's last handle.
|
||||
pub(crate) struct Creation<'a> {
|
||||
core: &'a Core,
|
||||
cache: Option<Arc<PipelineCache>>,
|
||||
@@ -1645,7 +1689,7 @@ impl Caches {
|
||||
|
||||
/// On the reaper, creation quiet: where no creation began since, holds [`Caches::creations`]
|
||||
/// exclusive while it reads the cache's size, and past the bound starts a fresh cache, else
|
||||
/// reads its data where it grew by more than an eighth since the last write; then lets
|
||||
/// reads its data where it at least doubled since the last write; then lets
|
||||
/// creations go on, writes the blob, and destroys each replaced cache no creation holds. Where
|
||||
/// a creation began since creation was quiet, the look is skipped and counted
|
||||
/// (`Metrics::pipeline_cache_looks_skipped`), and the reaper looks again once creation is quiet
|
||||
@@ -1714,7 +1758,9 @@ impl Caches {
|
||||
let written = lock(&self.pipelines).written;
|
||||
let path = self
|
||||
.blob_to_write()
|
||||
.filter(|_| size > written + written / 8)?;
|
||||
.filter(|_| size > written && size >= written.saturating_mul(2))?;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
counters.read_cache_data();
|
||||
// SAFETY: the cache is the device's.
|
||||
let data = unsafe { device.get_pipeline_cache_data(current.0) }.ok()?;
|
||||
Some((path, data, size))
|
||||
@@ -1745,11 +1791,14 @@ impl Caches {
|
||||
}
|
||||
|
||||
/// Writes `data`, the cache's data the driver gave at size `size`, over the device's blob at
|
||||
/// `path`, where it is within the bound; past it, the write is skipped and counted.
|
||||
/// `path`, where it is within the bound; past it, the write is skipped and counted, and `size`
|
||||
/// kept as the last written, so a later write of the same data (the drop's after the reaper's
|
||||
/// last write) is neither read nor counted again.
|
||||
fn write(&self, path: &Path, data: &[u8], size: u64, counters: &Counters) {
|
||||
let len = data.len() as u64;
|
||||
if len > self.bound.load(Relaxed) {
|
||||
counters.count(Metric::PipelineCacheWritesSkipped);
|
||||
lock(&self.pipelines).written = size;
|
||||
return;
|
||||
}
|
||||
if write_whole(path, &[&frame(data), data]).is_ok() {
|
||||
@@ -1768,6 +1817,65 @@ impl Caches {
|
||||
}
|
||||
}
|
||||
|
||||
/// At the reaper's end, a quiesce's or the device's teardown: writes the blob where the
|
||||
/// cache's size changed since the last write, so a process that ends after a quiesce, with no
|
||||
/// drop, keeps what it made. A creation still running holds it: it tries for
|
||||
/// [`Caches::creations`] each [`LAST_WRITE_STEP`] until `until`, and with no `until` until the
|
||||
/// creation ends. It begins no write past `until`: where `until` has passed before it takes
|
||||
/// the lock, or before it reads the cache's data, the write is skipped and counted
|
||||
/// (`Metrics::pipeline_cache_writes_skipped`), the cache's size unread before the lock; a
|
||||
/// write begun runs to its end. It waits for no GPU work: a creation compiles on the CPU, and
|
||||
/// reading a cache's data waits for nothing the GPU does.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// `device` is the device of the caches.
|
||||
pub(crate) unsafe fn last_write(
|
||||
&self,
|
||||
device: &ash::Device,
|
||||
counters: &Counters,
|
||||
until: Option<Instant>,
|
||||
) {
|
||||
let Some(path) = self.blob_to_write() else {
|
||||
return;
|
||||
};
|
||||
let past = || until.is_some_and(|until| Instant::now() >= until);
|
||||
let alone = loop {
|
||||
if past() {
|
||||
counters.count(Metric::PipelineCacheWritesSkipped);
|
||||
return;
|
||||
}
|
||||
if let Some(alone) = self.alone() {
|
||||
break alone;
|
||||
}
|
||||
std::thread::sleep(LAST_WRITE_STEP);
|
||||
};
|
||||
let (current, written) = {
|
||||
let pipelines = lock(&self.pipelines);
|
||||
(pipelines.current.clone(), pipelines.written)
|
||||
};
|
||||
let Some(current) = current else {
|
||||
return;
|
||||
};
|
||||
// SAFETY: the cache is the device's, and no creation runs while `alone` is held.
|
||||
let size = unsafe { data_size(device, current.0) };
|
||||
if size == written {
|
||||
return;
|
||||
}
|
||||
if past() {
|
||||
counters.count(Metric::PipelineCacheWritesSkipped);
|
||||
return;
|
||||
}
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
counters.read_cache_data();
|
||||
// SAFETY: as above.
|
||||
let data = unsafe { device.get_pipeline_cache_data(current.0) };
|
||||
drop(alone);
|
||||
if let Ok(data) = data {
|
||||
self.write(path, &data, size, counters);
|
||||
}
|
||||
}
|
||||
|
||||
/// At the device's drop, no creation running: writes the blob where the cache's data changed
|
||||
/// since the last write; then destroys every cache.
|
||||
///
|
||||
@@ -1783,6 +1891,8 @@ impl Caches {
|
||||
// SAFETY: the cache is the device's.
|
||||
let size = unsafe { data_size(device, current.0) };
|
||||
if let Some(path) = self.blob_to_write().filter(|_| size != written) {
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
counters.read_cache_data();
|
||||
// SAFETY: the cache is the device's.
|
||||
if let Ok(data) = unsafe { device.get_pipeline_cache_data(current.0) } {
|
||||
self.write(path, &data, size, counters);
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
//! A Managed buffer's changed ranges, copied in at the commit: where a Managed buffer has a device
|
||||
//! copy (a device whose Vulkan device type is neither integrated nor CPU), `didModifyRange:` only
|
||||
//! names a range ([`Changes::add`]), and the next commit on any queue, of a command buffer with
|
||||
//! commands or none, takes every range named since the last commit, once each
|
||||
//! ([`Work::capture`](crate::submit::Work::capture)). Its copy-in ([`copy_in`]) is a command
|
||||
//! buffer of its own, [`CopyIn`]: GPU copies of each range from the consumer's block into the
|
||||
//! device copy, then the copies in the textures over the ranges in images of their own take
|
||||
//! (`crate::over::ManagedOvers`). It waits in [`Captured`] at the capturing commit's number, a
|
||||
//! point in the commit order, and the first command buffer submitted whose commit number is at or
|
||||
//! after it takes it ([`taker`]): it goes in that command buffer's submission, as a part of its own
|
||||
//! ahead of its commands and outside its waits. A command buffer with nothing for the GPU that it
|
||||
//! waits for ([`Captured::waits_for`]) takes a submission for it alone, and completes once the
|
||||
//! copies have run. A command buffer committed before the capture leaves it pending, so it never
|
||||
//! goes ahead of older work of the queue that may write the range. The submission keeps each
|
||||
//! consumer's block and device copy until it retires. A copy-in records no barrier before its
|
||||
//! copies: the one that ends every earlier segment, upload, fill and copy-in on the queue puts
|
||||
//! every earlier command first, as it does for a segment (`record::end`), and the submission that
|
||||
//! carries it makes the host's writes before it visible to the copies (Vulkan's host write
|
||||
//! ordering guarantee).
|
||||
//! names a range ([`Changes::add`]), and the first commit on any queue of a command buffer whose
|
||||
//! encoders name the buffer ([`Names`]) takes its ranges named and not yet taken, once each
|
||||
//! ([`Work::capture`](crate::submit::Work::capture)); a commit that does not name it takes nothing
|
||||
//! of it. A buffer's first bytes at its making go at the next commit, whatever it names
|
||||
//! ([`Changes::made`]), as Metal's device copy holds them from the making. Its copy-in
|
||||
//! ([`copy_in`]) is a command buffer of its own, [`CopyIn`]: GPU copies of each range from the
|
||||
//! consumer's block into the device copy, then the copies in the textures over the ranges in images
|
||||
//! of their own take (`crate::over::ManagedOvers`). It waits in [`Captured`] at the capturing
|
||||
//! commit's number, a point in the commit order, and the first command buffer submitted whose
|
||||
//! commit number is at or after it takes it ([`taker`]): it goes in that command buffer's
|
||||
//! submission, as a part of its own ahead of its commands and outside its waits. A command buffer
|
||||
//! with nothing for the GPU that it waits for ([`Captured::waits_for`]) takes a submission for it
|
||||
//! alone, and completes once the copies have run. A command buffer committed before the capture
|
||||
//! leaves it pending, so it never goes ahead of older work of the queue that may write the range.
|
||||
//! The submission keeps each consumer's block and device copy until it retires. A copy-in records
|
||||
//! no barrier before its copies: the one that ends every earlier segment, upload, fill and copy-in
|
||||
//! on the queue puts every earlier command first, as it does for a segment (`record::end`), and the
|
||||
//! submission that carries it makes the host's writes before it visible to the copies (Vulkan's
|
||||
//! host write ordering guarantee).
|
||||
//!
|
||||
//! A write of such a texture that runs before the copy-in keeps its texels outside the ranges, as
|
||||
//! Metal's device copy keeps a GPU write outside a `didModifyRange:`'s range: the copies back it
|
||||
@@ -28,20 +30,26 @@
|
||||
//! write of another queue not yet submitted runs after the copy-in, which copies nothing back for
|
||||
//! it: its copy in follows the copy-in, and its copy back is owed to the readers after it.
|
||||
//!
|
||||
//! So every command buffer committed after a range is named reads the bytes the consumer wrote
|
||||
//! there before the commit, on any queue and wherever the capturing command buffer waits, which is
|
||||
//! what Metal owes (`MTLBuffer.h`, `didModifyRange:`): a write makes the range "undefined for any
|
||||
//! accesses by the GPU" until a `didModifyRange:` "followed by a commit of the MTLCommandBuffer
|
||||
//! that will access the buffer", which "does not make the contents coherent for any previously
|
||||
//! committed command buffers". One committed before that runs after a later one, held at an event
|
||||
//! wait, may read them too, where the header leaves the contents undefined. The copy reads the
|
||||
//! consumer's bytes as it runs, so a write after the commit may reach it, where Metal leaves the
|
||||
//! range undefined.
|
||||
//! So every command buffer that names the buffer, committed after a range is named, reads the
|
||||
//! bytes the consumer wrote there before its commit, on any queue and wherever the capturing
|
||||
//! command buffer waits, which is what Metal owes (`MTLBuffer.h`, `didModifyRange:`): a write makes
|
||||
//! the range "undefined for any accesses by the GPU" until a `didModifyRange:` "followed by a
|
||||
//! commit of the MTLCommandBuffer that will access the buffer", which "does not make the contents
|
||||
//! coherent for any previously committed command buffers". The bytes are those the consumer's
|
||||
//! block holds when the copy runs, so a write after the `didModifyRange:` and before that commit,
|
||||
//! which the header leaves undefined, reaches the GPU, as Metal on a discrete Mac GPU answers
|
||||
//! (`Buffer::did_modify_range`). One committed before that runs after a later one, held at an
|
||||
//! event wait, may read them too, where the header leaves the contents undefined. The copy reads
|
||||
//! the consumer's bytes as it runs, so a write after the commit may reach it, where Metal leaves
|
||||
//! the range undefined. A buffer no command buffer names keeps the bytes its device copy last
|
||||
//! took, though shaders reach it through its address, as Metal on a discrete Mac GPU answers: its
|
||||
//! range stays named until a commit names the buffer or the buffer is gone.
|
||||
//!
|
||||
//! A range named and not yet captured holds its buffer weakly, and neither of its blocks: once the
|
||||
//! buffer's last handle is gone, nothing can read its device copy (a command buffer, an encoder's
|
||||
//! binding or a texture that could holds the buffer), so the capture forgets its ranges, and the
|
||||
//! buffer's drop lets its blocks go at once, an import's release among them. Metal runs a no-copy
|
||||
//! binding or a texture that could holds the buffer), so a sweep forgets its ranges ([`Changes`]),
|
||||
//! and the buffer's drop lets its blocks go at once, an import's release among them. The ranges of
|
||||
//! a live buffer are bounded by the buffer: they never overlap or touch. Metal runs a no-copy
|
||||
//! buffer's deallocator as it deallocates the buffer, and its `didModifyRange:` is owed only to a
|
||||
//! command buffer that accesses the buffer, which then holds it.
|
||||
|
||||
@@ -50,6 +58,7 @@ use crate::coherence::Range;
|
||||
use crate::counters::Metric;
|
||||
use crate::device::Core;
|
||||
use crate::error::Error;
|
||||
use crate::kept::ByKind;
|
||||
use crate::memory::Block;
|
||||
use crate::over::{self, Back, ManagedOvers};
|
||||
use crate::record::{self, Reach, Recorder};
|
||||
@@ -83,46 +92,170 @@ struct Named {
|
||||
ranges: Vec<(u64, u64)>,
|
||||
}
|
||||
|
||||
/// The device's ranges named and not yet captured, in the order of each buffer's first.
|
||||
#[derive(Default)]
|
||||
/// What a committing command buffer's encoders named, whose ranges its commit takes
|
||||
/// ([`Changes::take`]): the Managed buffers with a device copy among each buffer it keeps, which is
|
||||
/// each buffer an encoder bound in a slot of any stage, declared by `useResource:`, read or wrote in
|
||||
/// a blit (a copy's source or destination, a fill, a texture copy's buffer, a synchronize) or took
|
||||
/// as an index, indirect, tessellation factor or visibility result buffer, and among the buffers
|
||||
/// each texture it keeps lies over (`TextureObject::over_buffer`). The command buffer lists them as
|
||||
/// its encoders keep each object, the first time (`ByKind::managed`), so a commit visits only them:
|
||||
/// no other buffer can have a range named. A heap use names none: Metal refuses a Managed heap (an
|
||||
/// AMD Radeon Pro 5300M and an Intel UHD Graphics 630 under macOS 26.7.1 fail its descriptor's
|
||||
/// validation, jobs 81602 and 81603).
|
||||
pub(crate) struct Names<'a> {
|
||||
managed: &'a [usize],
|
||||
}
|
||||
|
||||
impl<'a> Names<'a> {
|
||||
/// What the encoders of the recording that keeps `kept` named.
|
||||
pub(crate) fn of(kept: &'a ByKind) -> Names<'a> {
|
||||
Names {
|
||||
managed: &kept.managed,
|
||||
}
|
||||
}
|
||||
|
||||
/// The address of each Managed buffer with a device copy named, which a take looks up among
|
||||
/// the ranges named ([`Changes::take`]), once for each object kept that names it.
|
||||
pub(crate) fn addresses(&self) -> impl Iterator<Item = usize> + '_ {
|
||||
self.managed.iter().copied()
|
||||
}
|
||||
}
|
||||
|
||||
/// The device's ranges named and not yet captured. An entry stays until a commit whose encoders
|
||||
/// name its buffer takes it, or its buffer is gone: then the next sweep drops it.
|
||||
pub(crate) struct Changes {
|
||||
named: Vec<Named>,
|
||||
/// Each buffer's place in `named`, by its address, which a weak hold keeps from reuse.
|
||||
at: HashMap<usize, usize>,
|
||||
/// The first bytes of the buffers made since the last commit, which Metal's device copy holds
|
||||
/// from the making: the next commit takes them, whatever its encoders name
|
||||
/// ([`made`](Self::made)).
|
||||
made: Vec<Named>,
|
||||
/// The length of `made` at which the next [`made`](Self::made) first drops the entries of
|
||||
/// buffers gone, as `sweep_at` does for `named`.
|
||||
made_sweep_at: usize,
|
||||
/// The length of `named` at which the next [`add`](Self::add) of a new buffer first drops the
|
||||
/// entries of buffers gone: twice the entries left by the last sweep, at least
|
||||
/// [`SWEEP_FLOOR`], so the entries never exceed twice the live buffers with ranges named, or
|
||||
/// the floor.
|
||||
sweep_at: usize,
|
||||
/// The copy-ins captured and not yet taken.
|
||||
pub(crate) captured: Captured,
|
||||
}
|
||||
|
||||
/// The fewest entries [`Changes`] holds before it first sweeps the entries of buffers gone.
|
||||
pub(crate) const SWEEP_FLOOR: usize = 64;
|
||||
|
||||
impl Default for Changes {
|
||||
fn default() -> Changes {
|
||||
Changes {
|
||||
named: Vec::new(),
|
||||
at: HashMap::new(),
|
||||
made: Vec::new(),
|
||||
made_sweep_at: SWEEP_FLOOR,
|
||||
sweep_at: SWEEP_FLOOR,
|
||||
captured: Captured::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Changes {
|
||||
/// For the device tests: the entries of the ranges named, of their index by buffer, and of
|
||||
/// the buffers made since the last commit.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn entries(&self) -> [usize; 3] {
|
||||
[self.named.len(), self.at.len(), self.made.len()]
|
||||
}
|
||||
|
||||
/// Names `start..end` of `buffer`, a Managed buffer with a device copy.
|
||||
pub(crate) fn add(&mut self, buffer: &Arc<BufferInner>, start: u64, end: u64) {
|
||||
let key = Arc::as_ptr(buffer) as usize;
|
||||
match self.at.get(&key) {
|
||||
Some(&index) => merge(&mut self.named[index].ranges, start, end),
|
||||
None => {
|
||||
self.at.insert(key, self.named.len());
|
||||
self.named.push(Named {
|
||||
buffer: Arc::downgrade(buffer),
|
||||
ranges: vec![(start, end)],
|
||||
});
|
||||
}
|
||||
if let Some(&index) = self.at.get(&key) {
|
||||
merge(&mut self.named[index].ranges, start, end);
|
||||
return;
|
||||
}
|
||||
if self.named.len() >= self.sweep_at {
|
||||
self.sweep();
|
||||
}
|
||||
self.at.insert(key, self.named.len());
|
||||
self.named.push(Named {
|
||||
buffer: Arc::downgrade(buffer),
|
||||
ranges: vec![(start, end)],
|
||||
});
|
||||
}
|
||||
|
||||
/// The ranges named since the last capture, taken: those of the buffers that still live, each
|
||||
/// holding the buffer's blocks from here; a buffer gone has its ranges forgotten.
|
||||
pub(crate) fn take(&mut self) -> Vec<Modified> {
|
||||
/// Names the first `end` bytes of `buffer`, a Managed buffer with a device copy just made with
|
||||
/// them, for the next commit, whatever its encoders name: Metal's device copy holds a buffer's
|
||||
/// bytes from its making, before any command names it.
|
||||
pub(crate) fn made(&mut self, buffer: &Arc<BufferInner>, end: u64) {
|
||||
if self.made.len() >= self.made_sweep_at {
|
||||
self.made.retain(|made| made.buffer.strong_count() > 0);
|
||||
self.made_sweep_at = (2 * self.made.len()).max(SWEEP_FLOOR);
|
||||
}
|
||||
self.made.push(Named {
|
||||
buffer: Arc::downgrade(buffer),
|
||||
ranges: vec![(0, end)],
|
||||
});
|
||||
}
|
||||
|
||||
/// Drops the entries of buffers gone, whose ranges nothing can take: no command buffer names a
|
||||
/// buffer gone.
|
||||
fn sweep(&mut self) {
|
||||
self.named.retain(|named| named.buffer.strong_count() > 0);
|
||||
self.at.clear();
|
||||
(self.named.drain(..))
|
||||
.filter_map(|named| {
|
||||
let buffer = named.buffer.upgrade()?;
|
||||
buffer.modified(named.ranges)
|
||||
})
|
||||
.collect()
|
||||
for (index, named) in self.named.iter().enumerate() {
|
||||
self.at.insert(Weak::as_ptr(&named.buffer) as usize, index);
|
||||
}
|
||||
self.sweep_at = (2 * self.named.len()).max(SWEEP_FLOOR);
|
||||
}
|
||||
|
||||
/// The first bytes of the buffers made since the last commit, and the ranges named of the
|
||||
/// buffers `names` holds, taken, each holding its buffer's blocks from here; every other
|
||||
/// buffer's ranges stay named, for a later commit that names it. A buffer made and named both
|
||||
/// is taken once, its ranges merged. It looks up each buffer and texture the command buffer
|
||||
/// keeps, and allocates only where it takes a range.
|
||||
pub(crate) fn take(&mut self, names: &Names<'_>) -> Vec<Modified> {
|
||||
if self.named.is_empty() && self.made.is_empty() {
|
||||
return Vec::new();
|
||||
}
|
||||
let mut taken: Vec<usize> = Vec::new();
|
||||
if !self.named.is_empty() {
|
||||
taken.extend((names.addresses()).filter_map(|address| self.at.get(&address).copied()));
|
||||
taken.sort_unstable();
|
||||
taken.dedup();
|
||||
}
|
||||
let mut modified = Vec::with_capacity(taken.len() + self.made.len());
|
||||
for made in self.made.drain(..) {
|
||||
let index = self.at.get(&(Weak::as_ptr(&made.buffer) as usize)).copied();
|
||||
match index.filter(|index| taken.binary_search(index).is_ok()) {
|
||||
Some(index) => {
|
||||
for (start, end) in made.ranges {
|
||||
merge(&mut self.named[index].ranges, start, end);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
if let Some(buffer) = made.buffer.upgrade() {
|
||||
modified.extend(buffer.modified(made.ranges));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// The last first, so each index left to take stays where it was; `at` follows each move.
|
||||
for &index in taken.iter().rev() {
|
||||
let named = self.named.swap_remove(index);
|
||||
self.at.remove(&(Weak::as_ptr(&named.buffer) as usize));
|
||||
if let Some(moved) = self.named.get(index) {
|
||||
self.at.insert(Weak::as_ptr(&moved.buffer) as usize, index);
|
||||
}
|
||||
if let Some(buffer) = named.buffer.upgrade() {
|
||||
modified.extend(buffer.modified(named.ranges));
|
||||
}
|
||||
}
|
||||
modified
|
||||
}
|
||||
|
||||
/// A capture of `modified` that will not run: its ranges are named again, for the next commit
|
||||
/// to capture, where the buffer still lives.
|
||||
/// that names the buffer to capture, where the buffer still lives.
|
||||
pub(crate) fn give_up(&mut self, modified: &[Modified]) {
|
||||
for modified in modified {
|
||||
let Some(buffer) = modified.buffer.upgrade() else {
|
||||
@@ -139,6 +272,7 @@ impl Changes {
|
||||
pub(crate) fn clear(&mut self) -> Vec<CopyIn> {
|
||||
self.at.clear();
|
||||
self.named.clear();
|
||||
self.made.clear();
|
||||
let captured = self.captured.0.drain(..).map(|(_, copy_in)| copy_in);
|
||||
captured.collect()
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
use crate::alias::{Aliased, Marks, Placement};
|
||||
use crate::buffer::{Buffer, BufferInner, BufferObject};
|
||||
use crate::capture;
|
||||
use crate::coherence::{self, Ranges};
|
||||
use crate::complete::Completion;
|
||||
use crate::counters::{Metric, Stage, Tally};
|
||||
@@ -11,20 +12,22 @@ use crate::error::{Error, Refusal};
|
||||
use crate::event::{Event, EventInner};
|
||||
use crate::fault::DeviceFault;
|
||||
use crate::fence::Fences;
|
||||
use crate::handed::Handed;
|
||||
use crate::hazard::{Access, Hazards};
|
||||
use crate::kept::{Lent, Objects};
|
||||
use crate::kept::{Handle, Lent, Objects};
|
||||
use crate::memory::Block;
|
||||
use crate::over::{self, Overs, Reached};
|
||||
use crate::pipeline::{Compiled, ComputePipelineState, Listed};
|
||||
use crate::pipeline::{Compiled, ComputePipelineState, Listed, PUSH_STAGES};
|
||||
use crate::queue::QueueInner;
|
||||
use crate::record::{self, Reach, Recorder};
|
||||
use crate::render::RenderPipelineState;
|
||||
use crate::ring::{Placed, Writes};
|
||||
use crate::sampler::SamplerState;
|
||||
use crate::texture::{Image, OverCopy, Texture, TextureInner, TextureObject};
|
||||
use crate::texture::{Attachment, Image, OverCopy, Texture, TextureInner, TextureObject};
|
||||
use crate::times::{self, Pair, Times};
|
||||
use crate::visibility::{Queries, Query};
|
||||
use ash::vk;
|
||||
use std::ops::Range;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::atomic::Ordering::Relaxed;
|
||||
use std::sync::{Arc, Condvar, Mutex, MutexGuard, PoisonError};
|
||||
@@ -214,8 +217,8 @@ pub(crate) enum Owed {
|
||||
Unbound,
|
||||
/// A dispatch over a Private arena records a piece after its first.
|
||||
ArenaPiece,
|
||||
/// A memory barrier was asked for, a block was released to another API, or a concurrent
|
||||
/// encoder began after commands that touched anything.
|
||||
/// A memory barrier was asked for, or a concurrent encoder began after commands that touched
|
||||
/// anything.
|
||||
Other,
|
||||
}
|
||||
|
||||
@@ -236,6 +239,10 @@ impl Owed {
|
||||
/// What a command buffer records until its commit; an open encoder holds it.
|
||||
pub(crate) struct Building {
|
||||
pub(crate) device: Device,
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) buffer_lends: usize,
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) last_draw_push: Option<Range<usize>>,
|
||||
gpu: Gpu,
|
||||
handlers: Handlers,
|
||||
/// Whether the first command buffer began: the pair was taken, and where one was, the start
|
||||
@@ -246,12 +253,12 @@ pub(crate) struct Building {
|
||||
stamps: Option<Pair>,
|
||||
/// A barrier owed before the next command, by the first of its causes in [`Owed`]'s order: an
|
||||
/// encoder that wrote ended, a memory barrier was asked for, a dispatch wrote through an
|
||||
/// address outside its resources, a render pass ended, or a block was released to another
|
||||
/// API. The segment's own end barrier pays it too.
|
||||
/// address outside its resources, or a render pass ended. The segment's own end barrier pays
|
||||
/// it too.
|
||||
owed: Option<Owed>,
|
||||
/// The barrier owed orders a render pass ([`Building::owe_pass`]) or a release
|
||||
/// ([`Building::release_command`]) before what follows it: it reaches every later command
|
||||
/// ([`Reach::Commands`]), whatever the command that pays it names.
|
||||
/// The barrier owed orders a render pass ([`Building::owe_pass`]) before what follows it: it
|
||||
/// reaches every later command ([`Reach::Commands`]), whatever the command that pays it
|
||||
/// names.
|
||||
owed_all: bool,
|
||||
/// A dispatch wrote since the last barrier that reached indirect argument reads: a barrier
|
||||
/// between dispatches leaves them out unless the dispatch after it is indirect, so an
|
||||
@@ -286,12 +293,13 @@ pub(crate) struct Building {
|
||||
/// The push constant bytes a command buffer holds, from offset 0, as its pushes left them.
|
||||
///
|
||||
/// Every pipeline, compute and graphics, has the device's one layout and its one push range of
|
||||
/// [`PUSH_STAGES`](crate::pipeline::PUSH_STAGES), so a push stays across pipeline binds and both
|
||||
/// [`PUSH_STAGES`], so a push stays across pipeline binds and both
|
||||
/// bind points until the next one: a dispatch or a draw whose push bytes are already there
|
||||
/// records none, as a Metal argument set once stays bound for the commands after it.
|
||||
#[derive(Default)]
|
||||
pub(crate) struct Pushed {
|
||||
bytes: Vec<u8>,
|
||||
last_len: usize,
|
||||
}
|
||||
|
||||
impl Pushed {
|
||||
@@ -301,11 +309,34 @@ impl Pushed {
|
||||
if self.bytes.get(..push.len()) == Some(push) {
|
||||
return false;
|
||||
}
|
||||
self.write_prefix(push);
|
||||
true
|
||||
}
|
||||
|
||||
/// The smallest word-aligned interval to push for a draw of the same length as the last
|
||||
/// push. A change of length records the full prefix.
|
||||
pub(crate) fn draw_range(&mut self, push: &[u8]) -> Option<Range<usize>> {
|
||||
if self.last_len != push.len() {
|
||||
self.write_prefix(push);
|
||||
return Some(0..push.len());
|
||||
}
|
||||
let mut words = self.bytes[..push.len()]
|
||||
.as_chunks::<4>()
|
||||
.0
|
||||
.iter()
|
||||
.zip(push.as_chunks::<4>().0);
|
||||
let first = words.clone().position(|(held, new)| held != new)? * 4;
|
||||
let end = (words.rposition(|(held, new)| held != new).unwrap() + 1) * 4;
|
||||
self.bytes[first..end].copy_from_slice(&push[first..end]);
|
||||
Some(first..end)
|
||||
}
|
||||
|
||||
fn write_prefix(&mut self, push: &[u8]) {
|
||||
if self.bytes.len() < push.len() {
|
||||
self.bytes.resize(push.len(), 0);
|
||||
}
|
||||
self.bytes[..push.len()].copy_from_slice(push);
|
||||
true
|
||||
self.last_len = push.len();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,11 +432,11 @@ pub(crate) struct Segment {
|
||||
/// upload that leads its submission takes the copies back owed to them by writes submitted
|
||||
/// before it (`crate::over::ManagedOvers`).
|
||||
pub(crate) managed_reached: Vec<Arc<BufferInner>>,
|
||||
/// The images of the Direct3D 11 planes its commands use (`Device::import_d3d11_surface`, on
|
||||
/// Windows): the `vkQueueSubmit2` that carries it acquires them from
|
||||
/// `VK_QUEUE_FAMILY_EXTERNAL` at its start and releases them to it at its end, before its
|
||||
/// signals (`crate::submit::parts`).
|
||||
pub(crate) planes: Vec<Arc<Image>>,
|
||||
/// What its commands use of memory another API shares (`crate::handed`): the
|
||||
/// `vkQueueSubmit2` part that carries it acquires each from the other API's queue family at
|
||||
/// its start and releases it to that family at its end, before its signals
|
||||
/// (`crate::submit::parts`).
|
||||
pub(crate) handed: Vec<Handed>,
|
||||
/// The checks at its head and its writes of heap placements with links (`crate::alias`),
|
||||
/// where it has any: staged, a command buffer of moves leads it where the checks find one
|
||||
/// owed.
|
||||
@@ -469,6 +500,10 @@ impl CommandBuffer {
|
||||
scheduled_ran: false,
|
||||
building: Some(Building {
|
||||
device,
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
buffer_lends: 0,
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
last_draw_push: None,
|
||||
gpu: Gpu {
|
||||
recorder: None,
|
||||
segments: vec![Segment::default()],
|
||||
@@ -746,13 +781,16 @@ impl CommandBuffer {
|
||||
if work.closed() {
|
||||
return Err(Error::Quiesced);
|
||||
}
|
||||
// With commands or none, it captures the Managed buffers' ranges named since the last
|
||||
// capture, at its number in the commit order (`crate::capture`). A commit that fails
|
||||
// after its capture leaves the copy-in at that number.
|
||||
self.state().open()?;
|
||||
let mut work = match work.lost() {
|
||||
true => work,
|
||||
false => core.work.capture(&core, work)?,
|
||||
// With commands or none, it captures the ranges named and not yet taken of the Managed
|
||||
// buffers its encoders name, at its number in the commit order (`crate::capture`). A
|
||||
// commit that fails after its capture leaves the copy-in at that number.
|
||||
let mut work = {
|
||||
let mut state = self.state();
|
||||
let kept = &state.open()?.gpu.kept;
|
||||
match work.lost() {
|
||||
true => work,
|
||||
false => core.work.capture(&core, work, &capture::Names::of(kept))?,
|
||||
}
|
||||
};
|
||||
let mut state = self.state();
|
||||
state.open()?;
|
||||
@@ -979,6 +1017,15 @@ impl CommandBuffer {
|
||||
self.state().times.gpu_end
|
||||
}
|
||||
|
||||
/// For the device tests: the address of each buffer a commit now would look up among the
|
||||
/// Managed ranges named (`crate::capture::Names::addresses`), in the order it looks them up.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn capture_lookups(&self) -> Vec<usize> {
|
||||
let mut state = self.state();
|
||||
let open = state.open().expect("an open command buffer");
|
||||
capture::Names::of(&open.gpu.kept).addresses().collect()
|
||||
}
|
||||
|
||||
/// For the device tests: records commands into the current segment with `f`, and keeps each
|
||||
/// buffer's block until the command buffer retires. The command buffer is to dispatch nothing
|
||||
/// after them: a barrier between dispatches orders only the dispatches before it.
|
||||
@@ -1096,6 +1143,21 @@ impl Building {
|
||||
/// it gets none, counts it untimed.
|
||||
fn begin(&mut self) -> Result<vk::CommandBuffer, Error> {
|
||||
let core = self.device.core();
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
{
|
||||
let ordering = Ordering::Relaxed;
|
||||
let fail = |left: u32| left.checked_sub(1);
|
||||
if core
|
||||
.fail_begins
|
||||
.try_update(ordering, ordering, fail)
|
||||
.is_ok()
|
||||
{
|
||||
return Err(Error::Vulkan {
|
||||
call: "vkBeginCommandBuffer",
|
||||
result: vk::Result::ERROR_OUT_OF_HOST_MEMORY,
|
||||
});
|
||||
}
|
||||
}
|
||||
let recorder = match self.gpu.recorder.take() {
|
||||
Some(recorder) => recorder,
|
||||
None => core.recorders.take(&core.device)?,
|
||||
@@ -1164,15 +1226,15 @@ impl Building {
|
||||
}
|
||||
}
|
||||
|
||||
/// Starts a new segment after the last one. A segment that signals passes its Direct3D 11
|
||||
/// planes on: one kept after the signal is kept for the command that splits
|
||||
/// Starts a new segment after the last one. A segment that signals passes what it hands over
|
||||
/// on: one kept after the signal is kept for the command that splits
|
||||
/// ([`keep_texture`](Self::keep_texture)).
|
||||
fn split(&mut self) -> Result<(), Error> {
|
||||
self.close(&[], None)?;
|
||||
let last = self.last();
|
||||
let mut next = Segment::default();
|
||||
if !last.signals.is_empty() {
|
||||
next.planes.clone_from(&last.planes);
|
||||
next.handed.clone_from(&last.handed);
|
||||
}
|
||||
self.gpu.segments.push(next);
|
||||
Ok(())
|
||||
@@ -1237,6 +1299,22 @@ impl Building {
|
||||
Ok(command)
|
||||
}
|
||||
|
||||
/// Makes the current segment the next command's, a new one where the last signals, and
|
||||
/// begins its command buffer where it has none, what is owed left owed: called before a
|
||||
/// command marks what it does in its segment ([`managed_reach`], [`wrote_managed`],
|
||||
/// [`wrote_texture_managed`]), so the marks are those of the segment that runs it, and a
|
||||
/// command buffer that cannot begin fails the command before it marks or takes anything.
|
||||
///
|
||||
/// Err: [`Error::Vulkan`] where the command buffer cannot record.
|
||||
///
|
||||
/// [`managed_reach`]: Self::managed_reach
|
||||
/// [`wrote_managed`]: Self::wrote_managed
|
||||
/// [`wrote_texture_managed`]: Self::wrote_texture_managed
|
||||
pub(crate) fn open_segment(&mut self) -> Result<(), Error> {
|
||||
self.current()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The current segment's command buffer, begun where it has none. Commands after a signal go
|
||||
/// in a new segment.
|
||||
fn current(&mut self) -> Result<vk::CommandBuffer, Error> {
|
||||
@@ -1398,21 +1476,6 @@ impl Building {
|
||||
self.owed_all = true;
|
||||
}
|
||||
|
||||
/// The current segment's command buffer, for a release of a block to another API's queue
|
||||
/// family, which the caller records next. A release's own barrier orders every earlier
|
||||
/// command before it, and nothing after it: Vulkan ignores its second scope, and only a
|
||||
/// barrier from every stage waits for it (`VK_PIPELINE_STAGE_ALL_COMMANDS_BIT`, the queue
|
||||
/// family ownership transfer). So the barrier that orders it before later commands is owed,
|
||||
/// as a render pass's is ([`owe_pass`](Self::owe_pass)): recorded first by the segment's next
|
||||
/// command, reaching every later command, or paid by the segment's end barrier where none
|
||||
/// follows.
|
||||
pub(crate) fn release_command(&mut self) -> Result<vk::CommandBuffer, Error> {
|
||||
let command = self.current()?;
|
||||
self.owe(Owed::Other);
|
||||
self.owed_all = true;
|
||||
Ok(command)
|
||||
}
|
||||
|
||||
/// Whether the next command opens a command buffer of the segments: the last segment has
|
||||
/// none begun, or a signal ends it first. Every command before it is then in a command buffer
|
||||
/// that ended on the queue, whose end barrier orders it before every later command
|
||||
@@ -1536,6 +1599,40 @@ impl Building {
|
||||
needed
|
||||
}
|
||||
|
||||
/// Records the draw's changed push interval and keeps the bytes for this command buffer.
|
||||
///
|
||||
/// SAFETY: `command` is recording and `push` fits the layout's push range, in whole words.
|
||||
pub(crate) unsafe fn push_draw(
|
||||
&mut self,
|
||||
core: &Core,
|
||||
command: vk::CommandBuffer,
|
||||
push: &[u8],
|
||||
) {
|
||||
if push.is_empty() {
|
||||
return;
|
||||
}
|
||||
let range = self.pushed.draw_range(push);
|
||||
self.tally.count(match range {
|
||||
Some(_) => Metric::Pushes,
|
||||
None => Metric::PushesHeld,
|
||||
});
|
||||
let changed = range.map(|range| (range.start as u32, &push[range]));
|
||||
if let Some((offset, bytes)) = changed {
|
||||
// SAFETY: the caller provides the command and the layout's whole-word push bytes.
|
||||
unsafe {
|
||||
core.device
|
||||
.cmd_push_constants(command, core.layout, PUSH_STAGES, offset, bytes)
|
||||
};
|
||||
}
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
{
|
||||
self.last_draw_push = changed.map(|(offset, bytes)| {
|
||||
let start = offset as usize;
|
||||
start..start + bytes.len()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Counts one more of `metric`, added to the device's counters once the encoder ends.
|
||||
pub(crate) fn count(&mut self, metric: Metric) {
|
||||
self.tally.count(metric);
|
||||
@@ -1563,9 +1660,30 @@ impl Building {
|
||||
}
|
||||
|
||||
/// Keeps `buffer`, with its block and its device copy where it has one, until the command
|
||||
/// buffer retires.
|
||||
/// buffer retires. A block another API shares is handed over by the current segment's
|
||||
/// submission part too ([`Segment::handed`]).
|
||||
pub(crate) fn keep(&mut self, buffer: &Buffer) {
|
||||
self.gpu.kept.buffers.hold(buffer);
|
||||
if self.gpu.kept.buffers.hold(buffer) {
|
||||
self.name_managed(BufferObject::object(buffer));
|
||||
}
|
||||
self.hand_block(buffer.held().0);
|
||||
}
|
||||
|
||||
/// Lists `buffer`, kept now for the first time by itself or through a texture over it, among
|
||||
/// those the commit looks up for ranges named (`ByKind::managed`) where it is a Managed buffer
|
||||
/// with a device copy.
|
||||
fn name_managed(&mut self, buffer: &Arc<BufferInner>) {
|
||||
if buffer.held().1.is_some() {
|
||||
(self.gpu.kept.managed).push(<Buffer as Handle>::address_of(buffer));
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds `block` to the current segment's hand-overs where another API shares it
|
||||
/// ([`Segment::handed`]).
|
||||
fn hand_block(&mut self, block: &Arc<Block>) {
|
||||
if block.memory.handed_family().is_some() {
|
||||
Handed::Block(Arc::clone(block)).keep(&mut self.last().handed);
|
||||
}
|
||||
}
|
||||
|
||||
/// Keeps `buffer` as [`keep`](Self::keep) does, and lends it for a binding slot: no count
|
||||
@@ -1575,9 +1693,18 @@ impl Building {
|
||||
///
|
||||
/// The borrow is used only until the command buffer commits: in an encoder's tables.
|
||||
pub(crate) unsafe fn lend_buffer(&mut self, buffer: &Buffer) -> Lent<Buffer> {
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
{
|
||||
self.buffer_lends += 1;
|
||||
}
|
||||
self.hand_block(buffer.held().0);
|
||||
// SAFETY: the caller uses the borrow only before the commit, and the lists are cleared
|
||||
// only once the command buffer retired.
|
||||
unsafe { self.gpu.kept.buffers.keep(buffer) }
|
||||
let (lent, first) = unsafe { self.gpu.kept.buffers.keep_first(buffer) };
|
||||
if first {
|
||||
self.name_managed(BufferObject::object(buffer));
|
||||
}
|
||||
lent
|
||||
}
|
||||
|
||||
/// Keeps an execution's layout and preprocess region until the command buffer retires.
|
||||
@@ -1598,8 +1725,10 @@ impl Building {
|
||||
self.pushed = Pushed::default();
|
||||
}
|
||||
|
||||
/// Keeps `block` until the command buffer retires.
|
||||
/// Keeps `block` until the command buffer retires, handed over by the current segment's
|
||||
/// submission part where another API shares it ([`Segment::handed`]).
|
||||
pub(crate) fn keep_block(&mut self, block: &Arc<Block>) {
|
||||
self.hand_block(block);
|
||||
let blocks = &mut self.gpu.blocks;
|
||||
if !blocks.iter().rev().any(|kept| Arc::ptr_eq(kept, block)) {
|
||||
blocks.push(Arc::clone(block));
|
||||
@@ -1612,6 +1741,15 @@ impl Building {
|
||||
self.gpu.kept.variants.hold(variant);
|
||||
}
|
||||
|
||||
/// Keeps the texture's view of `attachment`, which a pass renders through, until the command
|
||||
/// buffer retires: one count at the recording's first pass through it, none at a later one.
|
||||
/// A texture evicts only a view no command buffer keeps (`crate::texture::AttachmentView`).
|
||||
pub(crate) fn hold_attachment_view(&mut self, attachment: &Attachment) {
|
||||
if let Some(view) = &attachment.held {
|
||||
self.gpu.kept.attachment_views.hold(view);
|
||||
}
|
||||
}
|
||||
|
||||
/// Keeps `content`, a kernel's variant that a dispatch runs, until the command buffer
|
||||
/// retires: no state holds it (`PipelineInner::variant`).
|
||||
pub(crate) fn hold_content(&mut self, content: &Arc<Compiled>) {
|
||||
@@ -1645,14 +1783,17 @@ impl Building {
|
||||
}
|
||||
|
||||
/// Keeps `texture` until the command buffer retires, as Metal's command buffer retains every
|
||||
/// object its encoders bind: each object once, a view apart from its parent. A Direct3D 11
|
||||
/// plane's image is kept by the current segment too, whose `vkQueueSubmit2` hands it over
|
||||
/// ([`Segment::planes`]).
|
||||
/// object its encoders bind: each object once, a view apart from its parent. What of it lies
|
||||
/// in memory another API shares is kept by the current segment too, whose `vkQueueSubmit2`
|
||||
/// part hands it over ([`Segment::handed`]).
|
||||
pub(crate) fn keep_texture(&mut self, texture: &Texture) {
|
||||
if self.gpu.kept.textures.hold(texture) {
|
||||
self.gpu.managed |= texture.managed_over().is_some();
|
||||
if let Some(buffer) = texture.over_buffer() {
|
||||
self.name_managed(buffer);
|
||||
}
|
||||
}
|
||||
texture.keep_plane(&mut self.last().planes);
|
||||
texture.keep_handed(&mut self.last().handed);
|
||||
}
|
||||
|
||||
/// Keeps `texture` as [`keep_texture`](Self::keep_texture) does, and lends it for a binding
|
||||
|
||||
@@ -40,9 +40,37 @@ use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::sync::{Arc, Condvar, Mutex, MutexGuard, PoisonError};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
/// How long [`Done::wait`] waits on the GPU at a time before it checks for a loss.
|
||||
/// How long [`Done::wait`] waits on the GPU at a time before it checks for a loss, and how long
|
||||
/// [`wait_through`] pauses after a failed call before it calls again.
|
||||
const LOSS_POLL: Duration = Duration::from_millis(100);
|
||||
|
||||
/// Calls `wait`, a host wait on what the GPU has pending, again until it succeeds or the device
|
||||
/// is lost: a loss it reports, or one the runtime has seen, leaves nothing pending (Lost Device:
|
||||
/// "a return value of VK_ERROR_DEVICE_LOST is equivalent to VK_SUCCESS"), while a failure for want
|
||||
/// of memory, or `VK_ERROR_UNKNOWN`, says nothing of what is pending, so the next call comes
|
||||
/// [`LOSS_POLL`] later. A failure that lasts on a live device waits as long as it lasts.
|
||||
pub(crate) fn wait_through(core: &Core, mut wait: impl FnMut() -> Result<(), vk::Result>) {
|
||||
loop {
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
let failed = (core.fail_waits)
|
||||
.try_update(Ordering::Relaxed, Ordering::Relaxed, |left| {
|
||||
left.checked_sub(1)
|
||||
})
|
||||
.is_ok();
|
||||
#[cfg(not(all(test, any(m2v_gpu, m2v_cpu_icd))))]
|
||||
let failed = false;
|
||||
let result = match failed {
|
||||
true => Err(vk::Result::ERROR_OUT_OF_HOST_MEMORY),
|
||||
false => wait(),
|
||||
};
|
||||
match result {
|
||||
Ok(()) | Err(vk::Result::ERROR_DEVICE_LOST) => return,
|
||||
Err(_) if core.work.lock().lost() => return,
|
||||
Err(_) => std::thread::sleep(LOSS_POLL),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The completion side: what the completion thread has to do, and its two timeline semaphores.
|
||||
pub(crate) struct Done {
|
||||
state: Mutex<DoneState>,
|
||||
@@ -73,11 +101,14 @@ struct DoneState {
|
||||
waiting: Waiting,
|
||||
/// The wake semaphore's last value.
|
||||
woken: u64,
|
||||
/// A wake whose signal failed, which the next wake delivers ([`Done::wake`]); cleared as the
|
||||
/// thread next reads the state.
|
||||
owed: bool,
|
||||
stop: bool,
|
||||
lost: bool,
|
||||
/// For the device tests: the values the completion thread's last GPU wait waits for, in its
|
||||
/// order: the progress semaphore's where it waits for it, each watched event's next pending
|
||||
/// value, then the wake semaphore's ([`Done::stall`]).
|
||||
/// signal's count, then the wake semaphore's ([`Done::stall`]).
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
waits_for: Vec<u64>,
|
||||
}
|
||||
@@ -127,6 +158,12 @@ enum Item {
|
||||
Upload(Upload),
|
||||
/// A Managed buffer's copy-in the submission took (`crate::capture`).
|
||||
CopyIn(CopyIn),
|
||||
/// A submission with nothing else that retires: a part of a command buffer that goes at an
|
||||
/// event's signal before its last part (`crate::submit`). Its queue counts it in flight, so
|
||||
/// its completion can leave the room the rest of that command buffer waits for
|
||||
/// (`crate::submit::room`), which the submit thread learns only from a completion this thread
|
||||
/// sees ([`Work::completed`](crate::submit::Work::completed)).
|
||||
Part,
|
||||
}
|
||||
|
||||
impl Done {
|
||||
@@ -185,6 +222,7 @@ impl Done {
|
||||
fire: Vec::new(),
|
||||
waiting: Waiting::Not,
|
||||
woken: 0,
|
||||
owed: false,
|
||||
stop: false,
|
||||
lost: false,
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
@@ -279,6 +317,7 @@ impl Done {
|
||||
Item::Command { .. } => "a command buffer",
|
||||
Item::Upload(_) => "an upload",
|
||||
Item::CopyIn(_) => "a copy-in",
|
||||
Item::Part => "a command buffer's part",
|
||||
};
|
||||
let reached = match reached_by_wait(device, self.progress, oldest.value) {
|
||||
Ok(reached) => reached.to_string(),
|
||||
@@ -323,29 +362,57 @@ impl Done {
|
||||
}
|
||||
|
||||
/// Wakes the completion thread where it waits. With `flight_only` (the change is only more
|
||||
/// work in flight), a thread that already waits for the progress semaphore is left to wait.
|
||||
fn wake(&self, state: &mut DoneState, device: &ash::Device, flight_only: bool) {
|
||||
/// work in flight), a thread that already waits for the progress semaphore is left to wait,
|
||||
/// unless a wake is owed.
|
||||
///
|
||||
/// `vkSignalSemaphore` fails only for want of memory or with `VK_ERROR_UNKNOWN`, never with a
|
||||
/// loss. A wake whose signal fails leaves the thread in its wait and is owed: the thread stays
|
||||
/// marked waiting on the GPU, so the next wake from any thread, flight-only ones included,
|
||||
/// signals again at a higher value, which the thread's wait also meets. The limit: a failed
|
||||
/// wake that no later wake follows waits for the wait's other semaphores. Where nothing is in
|
||||
/// flight, those are signals of batches that completed; where something is, a listener or an
|
||||
/// end waits for the front batch, a deadlock only where that batch waits on a host signal the
|
||||
/// listener or the end's handlers would give.
|
||||
fn wake(&self, state: &mut DoneState, core: &Core, flight_only: bool) {
|
||||
match state.waiting {
|
||||
Waiting::Not => return,
|
||||
Waiting::Gpu { progress: true } if flight_only => return,
|
||||
Waiting::Gpu { progress: true } if flight_only && !state.owed => return,
|
||||
Waiting::Host => self.changed.notify_one(),
|
||||
Waiting::Gpu { .. } => {
|
||||
state.woken += 1;
|
||||
let signal = vk::SemaphoreSignalInfo::default()
|
||||
.semaphore(self.wake)
|
||||
.value(state.woken);
|
||||
// SAFETY: only the host signals the semaphore, under this lock, each time higher.
|
||||
// A failure is a loss, which the thread's wait then reports.
|
||||
let _ = unsafe { device.signal_semaphore(&signal) };
|
||||
state.owed = self.signal_wake(core, state.woken).is_err();
|
||||
if state.owed {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
state.waiting = Waiting::Not;
|
||||
}
|
||||
|
||||
/// Signals the wake semaphore to `value`, above every value it was given.
|
||||
fn signal_wake(&self, core: &Core, value: u64) -> Result<(), vk::Result> {
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
if (core.fail_wakes)
|
||||
.try_update(Ordering::Relaxed, Ordering::Relaxed, |left| {
|
||||
left.checked_sub(1)
|
||||
})
|
||||
.is_ok()
|
||||
{
|
||||
return Err(vk::Result::ERROR_OUT_OF_HOST_MEMORY);
|
||||
}
|
||||
let signal = vk::SemaphoreSignalInfo::default()
|
||||
.semaphore(self.wake)
|
||||
.value(value);
|
||||
// SAFETY: only the host signals the semaphore, under the completion side's lock, each
|
||||
// time higher.
|
||||
unsafe { core.device.signal_semaphore(&signal) }
|
||||
}
|
||||
|
||||
/// From the submit thread: a submission passed to `vkQueueSubmit2` (`sent`). Its command
|
||||
/// buffers retire in order, each once its own progress value is reached (the submission's,
|
||||
/// or where it goes member by member its part's), each ended one with its error; its uploads
|
||||
/// and the copy-ins it took once the submission completes.
|
||||
/// and the copy-ins it took once the submission completes. One with none of these, a command
|
||||
/// buffer's part, is still seen complete ([`Item::Part`]).
|
||||
pub(crate) fn submitted(
|
||||
&self,
|
||||
core: &Core,
|
||||
@@ -357,8 +424,18 @@ impl Done {
|
||||
) {
|
||||
let Sent { value, held } = sent;
|
||||
let (held, last) = (held.then_some(value), value);
|
||||
let part = uploads.is_empty() && copy_ins.is_empty() && finished.is_empty();
|
||||
let mut state = self.lock();
|
||||
let flight_only = watch.is_empty();
|
||||
if part {
|
||||
state.flight.push_back(Retiree {
|
||||
value,
|
||||
held,
|
||||
last,
|
||||
lost: false,
|
||||
item: Item::Part,
|
||||
});
|
||||
}
|
||||
for upload in uploads {
|
||||
state.flight.push_back(Retiree {
|
||||
value,
|
||||
@@ -404,7 +481,7 @@ impl Done {
|
||||
);
|
||||
}
|
||||
state.watched.extend(watch);
|
||||
self.wake(&mut state, &core.device, flight_only);
|
||||
self.wake(&mut state, core, flight_only);
|
||||
}
|
||||
|
||||
/// Command buffers that retire with no submission of their own, each with its error where
|
||||
@@ -443,14 +520,14 @@ impl Done {
|
||||
state.flight.insert(at, retiree);
|
||||
}
|
||||
}
|
||||
self.wake(&mut state, &core.device, false);
|
||||
self.wake(&mut state, core, false);
|
||||
}
|
||||
|
||||
/// A host value of `event` may reach some of its listeners.
|
||||
pub(crate) fn fire(&self, core: &Core, event: Arc<EventInner>) {
|
||||
let mut state = self.lock();
|
||||
state.fire.push(event);
|
||||
self.wake(&mut state, &core.device, false);
|
||||
self.wake(&mut state, core, false);
|
||||
}
|
||||
|
||||
/// Tells the completion thread to end once nothing is in flight. The submit thread tells it
|
||||
@@ -461,7 +538,7 @@ impl Done {
|
||||
pub(crate) fn stop(&self, core: &Core) {
|
||||
let mut state = self.lock();
|
||||
state.stop = true;
|
||||
self.wake(&mut state, &core.device, false);
|
||||
self.wake(&mut state, core, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,7 +549,7 @@ pub(crate) fn lose(core: &Core, loss: DeviceLoss) {
|
||||
core.work.lose(loss);
|
||||
let mut state = core.done.lock();
|
||||
state.lost = true;
|
||||
core.done.wake(&mut state, &core.device, false);
|
||||
core.done.wake(&mut state, core, false);
|
||||
}
|
||||
|
||||
impl Retiree {
|
||||
@@ -487,6 +564,7 @@ impl Retiree {
|
||||
Item::Command { .. } => "a command buffer",
|
||||
Item::Upload(_) => "an upload",
|
||||
Item::CopyIn(_) => "a copy-in",
|
||||
Item::Part => "a command buffer's part",
|
||||
},
|
||||
self.value,
|
||||
if self.lost { ", lost" } else { "" }
|
||||
@@ -508,6 +586,7 @@ impl Retiree {
|
||||
}
|
||||
Item::Upload(upload) => upload.retire(core, end),
|
||||
Item::CopyIn(copy_in) => copy_in.retire(core, end),
|
||||
Item::Part => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,12 +805,10 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
}
|
||||
let mut index = 0;
|
||||
while index < state.watched.len() {
|
||||
let event = &state.watched[index];
|
||||
// Only a value a host wait confirmed is the event's (`EventInner::reached`); a
|
||||
// value read that none confirmed leaves the event watched, and the round's GPU
|
||||
// wait below blocks on its next pending value.
|
||||
let reached = event.reached(event.next_pending()).ok();
|
||||
if event.observe(reached, &mut fire) {
|
||||
// Only a count a host wait confirmed is the event's (`EventInner::take_in`); a
|
||||
// count read that none confirmed leaves the event watched, and the round's GPU
|
||||
// wait below blocks on its next pending signal.
|
||||
if state.watched[index].take_in(&mut fire) {
|
||||
index += 1;
|
||||
} else {
|
||||
state.watched.swap_remove(index);
|
||||
@@ -890,9 +967,9 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
values.push(value);
|
||||
}
|
||||
for event in &state.watched {
|
||||
if let Some(value) = event.next_pending() {
|
||||
if let Some(count) = event.next_pending() {
|
||||
semaphores.push(event.semaphore);
|
||||
values.push(value);
|
||||
values.push(count);
|
||||
}
|
||||
}
|
||||
semaphores.push(done.wake);
|
||||
@@ -914,6 +991,8 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
core.counters.event_read(crate::counters::event_step::WAKE);
|
||||
state = done.lock();
|
||||
state.waiting = Waiting::Not;
|
||||
// The round reads every change, an owed wake's among them.
|
||||
state.owed = false;
|
||||
match result {
|
||||
Err(vk::Result::TIMEOUT) | Ok(()) => {}
|
||||
Err(result) => {
|
||||
|
||||
@@ -275,6 +275,8 @@ pub(crate) enum Metric {
|
||||
RenderRecordsRead,
|
||||
/// [`Metrics::render_records_stale`].
|
||||
RenderRecordsStale,
|
||||
/// [`Metrics::word_contents`].
|
||||
WordContents,
|
||||
/// [`Metrics::creations_before_seed`].
|
||||
CreationsBeforeSeed,
|
||||
/// [`Metrics::cache_writes_dropped`].
|
||||
@@ -329,6 +331,8 @@ pub(crate) enum Metric {
|
||||
SurfacesInPlace,
|
||||
/// [`Metrics::surfaces_copied`].
|
||||
SurfacesCopied,
|
||||
/// [`Metrics::textures_in_place_over_imports`].
|
||||
TexturesInPlaceOverImports,
|
||||
/// [`Metrics::exported_blocks_addressed`].
|
||||
ExportedBlocksAddressed,
|
||||
/// [`Metrics::texture_clear_barriers`].
|
||||
@@ -349,8 +353,6 @@ pub(crate) enum Metric {
|
||||
PipelinesFromStageFills,
|
||||
/// [`Metrics::visibility_interrupts_refused`].
|
||||
VisibilityInterruptsRefused,
|
||||
/// [`Metrics::accumulated_visibility_refused`].
|
||||
AccumulatedVisibilityRefused,
|
||||
/// [`Metrics::overlapping_copies_refused`].
|
||||
OverlappingCopiesRefused,
|
||||
/// [`Metrics::heap_moves`].
|
||||
@@ -398,6 +400,7 @@ const METRIC_ORDER: [Metric; METRICS] = [
|
||||
Metric::TranslationsLoaded,
|
||||
Metric::RenderRecordsRead,
|
||||
Metric::RenderRecordsStale,
|
||||
Metric::WordContents,
|
||||
Metric::CreationsBeforeSeed,
|
||||
Metric::CacheWritesDropped,
|
||||
Metric::PipelineCachesReplaced,
|
||||
@@ -425,6 +428,7 @@ const METRIC_ORDER: [Metric; METRICS] = [
|
||||
Metric::D3d11PlaneParts,
|
||||
Metric::SurfacesInPlace,
|
||||
Metric::SurfacesCopied,
|
||||
Metric::TexturesInPlaceOverImports,
|
||||
Metric::ExportedBlocksAddressed,
|
||||
Metric::TextureClearBarriers,
|
||||
Metric::AttachmentLoopReads,
|
||||
@@ -435,7 +439,6 @@ const METRIC_ORDER: [Metric; METRICS] = [
|
||||
Metric::StageFills,
|
||||
Metric::PipelinesFromStageFills,
|
||||
Metric::VisibilityInterruptsRefused,
|
||||
Metric::AccumulatedVisibilityRefused,
|
||||
Metric::OverlappingCopiesRefused,
|
||||
Metric::HeapMoves,
|
||||
Metric::StencilBitDraws,
|
||||
@@ -503,6 +506,10 @@ pub(crate) enum Gauge {
|
||||
Kernels,
|
||||
/// [`Gauges::kernel_variants`].
|
||||
KernelVariants,
|
||||
/// [`Gauges::word_pipelines`].
|
||||
WordPipelines,
|
||||
/// [`Gauges::word_texture_buffers`].
|
||||
WordTextureBuffers,
|
||||
/// [`Gauges::kernel_entries`].
|
||||
KernelEntries,
|
||||
/// [`Gauges::render_contents`].
|
||||
@@ -545,6 +552,10 @@ pub(crate) enum Gauge {
|
||||
ResolveImages,
|
||||
/// [`Gauges::resolve_image_bytes`].
|
||||
ResolveImageBytes,
|
||||
/// [`Gauges::plane_stand_ins`].
|
||||
PlaneStandIns,
|
||||
/// [`Gauges::plane_stand_in_bytes`].
|
||||
PlaneStandInBytes,
|
||||
/// [`Gauges::textures_copied_over`].
|
||||
TexturesCopiedOver,
|
||||
/// [`Gauges::timestamp_pools`].
|
||||
@@ -646,13 +657,22 @@ const SITES: usize = Site::PrivateArena as usize + 1;
|
||||
|
||||
/// No Metal counterpart, as Metal makes no such copy: why a texture over a buffer
|
||||
/// ([`Buffer::new_texture`](crate::Buffer::new_texture)) lives in an image of its own that the
|
||||
/// device copies its bytes into and back, as the texture's making decides it: the [`Metrics`] pair
|
||||
/// its copies count in, and an [`OverCopyKind`]'s cause.
|
||||
/// device copies its bytes into and back, as the texture's making decides it, or, for one in place
|
||||
/// over host memory's import, its one restore pair: the [`Metrics`] pair its copies count in, and
|
||||
/// an [`OverCopyKind`]'s cause.
|
||||
#[non_exhaustive]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum OverCause {
|
||||
/// The buffer's bytes are in host memory's import ([`Metrics::over_copies_host_memory`]).
|
||||
/// The buffer's bytes are in host memory's import, and the device is discrete or virtual
|
||||
/// ([`Device::has_unified_memory`](crate::Device::has_unified_memory) false) or its external
|
||||
/// image query offers no linear image of the texture's format and usage for its handle: the
|
||||
/// copies at the texture's uses ([`Metrics::over_copies_host_memory`]).
|
||||
HostMemory,
|
||||
/// Not a copied texture: one in place over host memory's import, on an integrated or CPU
|
||||
/// device, whose move home comes between a save of the bytes under it and their write-back,
|
||||
/// one pair of copies in the texture's life, inside its make
|
||||
/// ([`Metrics::over_copies_host_memory_restore`]).
|
||||
HostMemoryRestore,
|
||||
/// A dma-buf's one import that takes no image here ([`Metrics::over_copies_dma_buf`]).
|
||||
DmaBuf,
|
||||
/// An import over several dma-bufs ([`Metrics::over_copies_dma_bufs`]).
|
||||
@@ -683,14 +703,16 @@ const OVER_CAUSES: usize = OverCause::ImageMemory as usize + 1;
|
||||
/// The kinds of counted copy [`Counters::over_copy_kinds`] keeps: the first this many copied.
|
||||
pub(crate) const OVER_COPY_KINDS: usize = 256;
|
||||
|
||||
/// No Metal counterpart, as Metal makes no such copy: a kind of texture over a buffer that the
|
||||
/// device copies into an image of its own and back ([`Metrics::over_copies`]), as the device first
|
||||
/// copied one ([`Counters::over_copy_kinds`]): why, and the texture's pixel format, size and
|
||||
/// usage.
|
||||
/// No Metal counterpart, as Metal makes no such copy: a kind of texture over a buffer whose bytes
|
||||
/// the device copies ([`Metrics::over_copies`]), into an image of its own and back or, in place
|
||||
/// over host memory's import, once around its move home ([`OverCause::HostMemoryRestore`]), as
|
||||
/// the device first copied one ([`Counters::over_copy_kinds`]): why, and the texture's pixel
|
||||
/// format, size and usage.
|
||||
#[non_exhaustive]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct OverCopyKind {
|
||||
/// Why the texture is not in place.
|
||||
/// Why the texture is copied: not in place, or restored in place
|
||||
/// ([`OverCause::HostMemoryRestore`]).
|
||||
pub cause: OverCause,
|
||||
/// The texture's pixel format.
|
||||
pub pixel_format: PixelFormat,
|
||||
@@ -800,6 +822,8 @@ struct Atomics {
|
||||
first_use_sites: [[AtomicU64; 3]; FIRST_USE_SITES],
|
||||
/// The makes ahead of a dispatch: their count and total nanoseconds.
|
||||
made_ahead: [AtomicU64; 2],
|
||||
/// The words twins made: their count and total nanoseconds.
|
||||
word_pipelines_made: [AtomicU64; 2],
|
||||
/// The pipelines `finish_pipeline` calls made: their count and total nanoseconds.
|
||||
finished: [AtomicU64; 2],
|
||||
/// [`Metrics::failed_finishes`].
|
||||
@@ -827,6 +851,8 @@ struct Atomics {
|
||||
emulated_simdgroup_dispatches: AtomicU64,
|
||||
partial_variant_whole_grids: AtomicU64,
|
||||
partial_variant_ragged_grids: AtomicU64,
|
||||
translations_at_encode: AtomicU64,
|
||||
translation_at_encode_max_nanos: AtomicU64,
|
||||
extended_view_dispatches: AtomicU64,
|
||||
level_field_commands: AtomicU64,
|
||||
private_arena_pieces: AtomicU64,
|
||||
@@ -840,6 +866,7 @@ struct Atomics {
|
||||
translations_loaded: AtomicU64,
|
||||
render_records_read: AtomicU64,
|
||||
render_records_stale: AtomicU64,
|
||||
word_contents: AtomicU64,
|
||||
creations_before_seed: AtomicU64,
|
||||
pipeline_cache_looks_skipped: AtomicU64,
|
||||
pipeline_cache_lock_waits: AtomicU64,
|
||||
@@ -876,6 +903,10 @@ struct Atomics {
|
||||
attachment_read_copy_bytes: AtomicU64,
|
||||
resolve_copies: AtomicU64,
|
||||
resolve_copy_bytes: AtomicU64,
|
||||
plane_copies_in: AtomicU64,
|
||||
plane_copy_in_bytes: AtomicU64,
|
||||
plane_copies_out: AtomicU64,
|
||||
plane_copy_out_bytes: AtomicU64,
|
||||
attachment_loop_reads: AtomicU64,
|
||||
unslotted_attachment_reads: AtomicU64,
|
||||
allocations_freed: AtomicU64,
|
||||
@@ -901,6 +932,7 @@ struct Atomics {
|
||||
d3d11_plane_parts: AtomicU64,
|
||||
surfaces_in_place: AtomicU64,
|
||||
surfaces_copied: AtomicU64,
|
||||
textures_in_place_over_imports: AtomicU64,
|
||||
exported_blocks_addressed: AtomicU64,
|
||||
surface_waits: AtomicU64,
|
||||
surface_wait_nanos: AtomicU64,
|
||||
@@ -914,7 +946,6 @@ struct Atomics {
|
||||
render_makes_past_kernel_bound: AtomicU64,
|
||||
render_weight_past_kernel_bound_max: AtomicU64,
|
||||
visibility_interrupts_refused: AtomicU64,
|
||||
accumulated_visibility_refused: AtomicU64,
|
||||
overlapping_copies_refused: AtomicU64,
|
||||
heap_moves: AtomicU64,
|
||||
stencil_bit_draws: AtomicU64,
|
||||
@@ -933,6 +964,8 @@ struct Atomics {
|
||||
pipelines: AtomicU64,
|
||||
kernels: AtomicU64,
|
||||
kernel_variants: AtomicU64,
|
||||
word_pipelines: AtomicU64,
|
||||
word_texture_buffers: AtomicU64,
|
||||
kernel_entries: AtomicU64,
|
||||
render_contents: AtomicU64,
|
||||
attachment_views: AtomicU64,
|
||||
@@ -969,6 +1002,8 @@ struct Atomics {
|
||||
shadow_bytes: AtomicU64,
|
||||
resolve_images: AtomicU64,
|
||||
resolve_image_bytes: AtomicU64,
|
||||
plane_stand_ins: AtomicU64,
|
||||
plane_stand_in_bytes: AtomicU64,
|
||||
textures_copied_over: AtomicU64,
|
||||
timestamp_pools: AtomicU64,
|
||||
occlusion_pools: AtomicU64,
|
||||
@@ -1024,6 +1059,12 @@ struct Atomics {
|
||||
/// tests.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
closings: [AtomicU64; 2],
|
||||
/// Reads of the pipeline cache's data for a blob write, for the tests.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
cache_data_reads: AtomicU64,
|
||||
/// Dispatches and draws that ran a words twin, for the tests.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
twin_runs: AtomicU64,
|
||||
}
|
||||
|
||||
impl Counters {
|
||||
@@ -1087,6 +1128,7 @@ impl Counters {
|
||||
Metric::TranslationsLoaded => &a.translations_loaded,
|
||||
Metric::RenderRecordsRead => &a.render_records_read,
|
||||
Metric::RenderRecordsStale => &a.render_records_stale,
|
||||
Metric::WordContents => &a.word_contents,
|
||||
Metric::CreationsBeforeSeed => &a.creations_before_seed,
|
||||
Metric::CacheWritesDropped => &a.cache_writes_dropped,
|
||||
Metric::PipelineCachesReplaced => &a.pipeline_caches_replaced,
|
||||
@@ -1114,6 +1156,7 @@ impl Counters {
|
||||
Metric::D3d11PlaneParts => &a.d3d11_plane_parts,
|
||||
Metric::SurfacesInPlace => &a.surfaces_in_place,
|
||||
Metric::SurfacesCopied => &a.surfaces_copied,
|
||||
Metric::TexturesInPlaceOverImports => &a.textures_in_place_over_imports,
|
||||
Metric::ExportedBlocksAddressed => &a.exported_blocks_addressed,
|
||||
Metric::TextureClearBarriers => &a.texture_clear_barriers,
|
||||
Metric::AttachmentLoopReads => &a.attachment_loop_reads,
|
||||
@@ -1124,7 +1167,6 @@ impl Counters {
|
||||
Metric::StageFills => &a.stage_fills,
|
||||
Metric::PipelinesFromStageFills => &a.pipelines_from_stage_fills,
|
||||
Metric::VisibilityInterruptsRefused => &a.visibility_interrupts_refused,
|
||||
Metric::AccumulatedVisibilityRefused => &a.accumulated_visibility_refused,
|
||||
Metric::OverlappingCopiesRefused => &a.overlapping_copies_refused,
|
||||
Metric::HeapMoves => &a.heap_moves,
|
||||
Metric::StencilBitDraws => &a.stencil_bit_draws,
|
||||
@@ -1163,6 +1205,14 @@ impl Counters {
|
||||
total.fetch_add(nanos, Relaxed);
|
||||
}
|
||||
|
||||
/// One more words twin made, for `nanos` nanoseconds of its make
|
||||
/// ([`Metrics::word_pipelines_created`]).
|
||||
pub(crate) fn word_pipeline(&self, nanos: u64) {
|
||||
let [count, total] = &self.atomics.word_pipelines_made;
|
||||
count.fetch_add(1, Relaxed);
|
||||
total.fetch_add(nanos, Relaxed);
|
||||
}
|
||||
|
||||
/// One more pipeline a `finish_pipeline` call made, for `nanos` nanoseconds
|
||||
/// ([`Metrics::finished_pipelines`]).
|
||||
pub(crate) fn finished(&self, nanos: u64) {
|
||||
@@ -1526,6 +1576,13 @@ impl Counters {
|
||||
answer
|
||||
}
|
||||
|
||||
/// A make at encode that took `nanos` nanoseconds ([`Metrics::translations_at_encode`]).
|
||||
pub(crate) fn translation_at_encode(&self, nanos: u64) {
|
||||
let a = &self.atomics;
|
||||
a.translations_at_encode.fetch_add(1, Relaxed);
|
||||
a.translation_at_encode_max_nanos.fetch_max(nanos, Relaxed);
|
||||
}
|
||||
|
||||
/// A call that waited `nanos` nanoseconds for the block-maker thread's make of an internal it
|
||||
/// needs ([`Metrics::maker_waits`]).
|
||||
pub(crate) fn maker_wait(&self, nanos: u64) {
|
||||
@@ -1645,6 +1702,21 @@ impl Counters {
|
||||
a.bytes_copied.fetch_add(bytes, Relaxed);
|
||||
}
|
||||
|
||||
/// A copy between a marked surface plane and its stand-in, of `bytes`, into the stand-in
|
||||
/// (`into`) as a pass begins or out of it as the pass ends ([`Metrics::plane_copies_in`],
|
||||
/// [`Metrics::plane_copies_out`] and their bytes), which counts in [`Metrics::bytes_copied`]
|
||||
/// too.
|
||||
pub(crate) fn plane_copied(&self, into: bool, bytes: u64) {
|
||||
let a = &self.atomics;
|
||||
let (copies, sum) = match into {
|
||||
true => (&a.plane_copies_in, &a.plane_copy_in_bytes),
|
||||
false => (&a.plane_copies_out, &a.plane_copy_out_bytes),
|
||||
};
|
||||
copies.fetch_add(1, Relaxed);
|
||||
sum.fetch_add(bytes, Relaxed);
|
||||
a.bytes_copied.fetch_add(bytes, Relaxed);
|
||||
}
|
||||
|
||||
/// A copy of what a pass resolved into a resolve image, of `bytes`
|
||||
/// ([`Metrics::resolve_copies`], [`Metrics::resolve_copy_bytes`]), which counts in
|
||||
/// [`Metrics::bytes_copied`] too.
|
||||
@@ -1806,6 +1878,30 @@ impl Counters {
|
||||
(closings[0].load(Relaxed), closings[1].load(Relaxed))
|
||||
}
|
||||
|
||||
/// One more read of the pipeline cache's data for a blob write.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn read_cache_data(&self) {
|
||||
self.atomics.cache_data_reads.fetch_add(1, Relaxed);
|
||||
}
|
||||
|
||||
/// The reads of the pipeline cache's data for a blob write.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn cache_data_reads(&self) -> u64 {
|
||||
self.atomics.cache_data_reads.load(Relaxed)
|
||||
}
|
||||
|
||||
/// One more dispatch or draw that ran a words twin.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn ran_twin(&self) {
|
||||
self.atomics.twin_runs.fetch_add(1, Relaxed);
|
||||
}
|
||||
|
||||
/// The dispatches and draws that ran a words twin.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn twin_runs(&self) -> u64 {
|
||||
self.atomics.twin_runs.load(Relaxed)
|
||||
}
|
||||
|
||||
/// One more live resource of `gauge`'s kind.
|
||||
pub(crate) fn rise(&self, gauge: Gauge) {
|
||||
self.gauge(gauge).fetch_add(1, Relaxed);
|
||||
@@ -1819,6 +1915,11 @@ impl Counters {
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
/// The live resources of `gauge`'s kind.
|
||||
pub(crate) fn live(&self, gauge: Gauge) -> u64 {
|
||||
self.gauge(gauge).load(Relaxed)
|
||||
}
|
||||
|
||||
/// One fewer live resource of `gauge`'s kind.
|
||||
pub(crate) fn fall(&self, gauge: Gauge) {
|
||||
self.gauge(gauge).fetch_sub(1, Relaxed);
|
||||
@@ -1852,6 +1953,8 @@ impl Counters {
|
||||
Gauge::Pipelines => &a.pipelines,
|
||||
Gauge::Kernels => &a.kernels,
|
||||
Gauge::KernelVariants => &a.kernel_variants,
|
||||
Gauge::WordPipelines => &a.word_pipelines,
|
||||
Gauge::WordTextureBuffers => &a.word_texture_buffers,
|
||||
Gauge::KernelEntries => &a.kernel_entries,
|
||||
Gauge::RenderContents => &a.render_contents,
|
||||
Gauge::AttachmentViews => &a.attachment_views,
|
||||
@@ -1873,6 +1976,8 @@ impl Counters {
|
||||
Gauge::ShadowBytes => &a.shadow_bytes,
|
||||
Gauge::ResolveImages => &a.resolve_images,
|
||||
Gauge::ResolveImageBytes => &a.resolve_image_bytes,
|
||||
Gauge::PlaneStandIns => &a.plane_stand_ins,
|
||||
Gauge::PlaneStandInBytes => &a.plane_stand_in_bytes,
|
||||
Gauge::TexturesCopiedOver => &a.textures_copied_over,
|
||||
Gauge::TimestampPools => &a.timestamp_pools,
|
||||
Gauge::OcclusionPools => &a.occlusion_pools,
|
||||
@@ -1933,6 +2038,7 @@ impl Counters {
|
||||
]
|
||||
.map(first_use);
|
||||
let made_ahead = (a.made_ahead.each_ref()).map(|n| n.load(Relaxed));
|
||||
let word_pipelines = (a.word_pipelines_made.each_ref()).map(|n| n.load(Relaxed));
|
||||
let finished = (a.finished.each_ref()).map(|n| n.load(Relaxed));
|
||||
let part = |part: Part| {
|
||||
let [count, bytes, total, _, over_1, over_5, over_20] = &a.parts[part as usize];
|
||||
@@ -2070,6 +2176,8 @@ impl Counters {
|
||||
first_use_unfinished_wait_max_nanos: unfinished[2],
|
||||
made_ahead_variants: made_ahead[0],
|
||||
made_ahead_variant_nanos: made_ahead[1],
|
||||
word_pipelines_created: word_pipelines[0],
|
||||
word_pipeline_nanos: word_pipelines[1],
|
||||
finished_pipelines: finished[0],
|
||||
finished_pipeline_nanos: finished[1],
|
||||
failed_finishes: a.failed_finishes.load(Relaxed),
|
||||
@@ -2103,6 +2211,8 @@ impl Counters {
|
||||
emulated_simdgroup_dispatches: a.emulated_simdgroup_dispatches.load(Relaxed),
|
||||
partial_variant_whole_grids: a.partial_variant_whole_grids.load(Relaxed),
|
||||
partial_variant_ragged_grids: a.partial_variant_ragged_grids.load(Relaxed),
|
||||
translations_at_encode: a.translations_at_encode.load(Relaxed),
|
||||
translation_at_encode_max_nanos: a.translation_at_encode_max_nanos.load(Relaxed),
|
||||
extended_view_dispatches: a.extended_view_dispatches.load(Relaxed),
|
||||
level_field_commands: a.level_field_commands.load(Relaxed),
|
||||
private_arena_pieces: a.private_arena_pieces.load(Relaxed),
|
||||
@@ -2111,6 +2221,7 @@ impl Counters {
|
||||
translations_loaded: a.translations_loaded.load(Relaxed),
|
||||
render_records_read: a.render_records_read.load(Relaxed),
|
||||
render_records_stale: a.render_records_stale.load(Relaxed),
|
||||
word_contents: a.word_contents.load(Relaxed),
|
||||
creations_before_seed: a.creations_before_seed.load(Relaxed),
|
||||
pipeline_cache_looks_skipped: a.pipeline_cache_looks_skipped.load(Relaxed),
|
||||
pipeline_cache_lock_waits: a.pipeline_cache_lock_waits.load(Relaxed),
|
||||
@@ -2141,6 +2252,8 @@ impl Counters {
|
||||
over_copy_bytes_shared: a.over_copy_bytes_shared.load(Relaxed),
|
||||
over_copies_host_memory: over(OverCause::HostMemory)[0],
|
||||
over_copy_bytes_host_memory: over(OverCause::HostMemory)[1],
|
||||
over_copies_host_memory_restore: over(OverCause::HostMemoryRestore)[0],
|
||||
over_copy_bytes_host_memory_restore: over(OverCause::HostMemoryRestore)[1],
|
||||
over_copies_dma_buf: over(OverCause::DmaBuf)[0],
|
||||
over_copy_bytes_dma_buf: over(OverCause::DmaBuf)[1],
|
||||
over_copies_dma_bufs: over(OverCause::DmaBufs)[0],
|
||||
@@ -2168,6 +2281,10 @@ impl Counters {
|
||||
attachment_read_copy_bytes: a.attachment_read_copy_bytes.load(Relaxed),
|
||||
resolve_copies: a.resolve_copies.load(Relaxed),
|
||||
resolve_copy_bytes: a.resolve_copy_bytes.load(Relaxed),
|
||||
plane_copies_in: a.plane_copies_in.load(Relaxed),
|
||||
plane_copy_in_bytes: a.plane_copy_in_bytes.load(Relaxed),
|
||||
plane_copies_out: a.plane_copies_out.load(Relaxed),
|
||||
plane_copy_out_bytes: a.plane_copy_out_bytes.load(Relaxed),
|
||||
attachment_loop_reads: a.attachment_loop_reads.load(Relaxed),
|
||||
unslotted_attachment_reads: a.unslotted_attachment_reads.load(Relaxed),
|
||||
allocations_freed: a.allocations_freed.load(Relaxed),
|
||||
@@ -2193,6 +2310,7 @@ impl Counters {
|
||||
d3d11_plane_parts: a.d3d11_plane_parts.load(Relaxed),
|
||||
surfaces_in_place: a.surfaces_in_place.load(Relaxed),
|
||||
surfaces_copied: a.surfaces_copied.load(Relaxed),
|
||||
textures_in_place_over_imports: a.textures_in_place_over_imports.load(Relaxed),
|
||||
exported_blocks_addressed: a.exported_blocks_addressed.load(Relaxed),
|
||||
surface_waits: a.surface_waits.load(Relaxed),
|
||||
surface_wait_nanos: a.surface_wait_nanos.load(Relaxed),
|
||||
@@ -2208,7 +2326,6 @@ impl Counters {
|
||||
.render_weight_past_kernel_bound_max
|
||||
.load(Relaxed),
|
||||
visibility_interrupts_refused: a.visibility_interrupts_refused.load(Relaxed),
|
||||
accumulated_visibility_refused: a.accumulated_visibility_refused.load(Relaxed),
|
||||
overlapping_copies_refused: a.overlapping_copies_refused.load(Relaxed),
|
||||
heap_moves: a.heap_moves.load(Relaxed),
|
||||
stencil_bit_draws: a.stencil_bit_draws.load(Relaxed),
|
||||
@@ -2265,6 +2382,8 @@ impl Counters {
|
||||
pipelines: a.pipelines.load(Relaxed),
|
||||
kernels: a.kernels.load(Relaxed),
|
||||
kernel_variants: a.kernel_variants.load(Relaxed),
|
||||
word_pipelines: a.word_pipelines.load(Relaxed),
|
||||
word_texture_buffers: a.word_texture_buffers.load(Relaxed),
|
||||
kernel_entries: a.kernel_entries.load(Relaxed),
|
||||
render_contents: a.render_contents.load(Relaxed),
|
||||
attachment_views: a.attachment_views.load(Relaxed),
|
||||
@@ -2293,6 +2412,8 @@ impl Counters {
|
||||
shadow_bytes: a.shadow_bytes.load(Relaxed),
|
||||
resolve_images: a.resolve_images.load(Relaxed),
|
||||
resolve_image_bytes: a.resolve_image_bytes.load(Relaxed),
|
||||
plane_stand_ins: a.plane_stand_ins.load(Relaxed),
|
||||
plane_stand_in_bytes: a.plane_stand_in_bytes.load(Relaxed),
|
||||
textures_copied_over: a.textures_copied_over.load(Relaxed),
|
||||
timestamp_pools: a.timestamp_pools.load(Relaxed),
|
||||
occlusion_pools: a.occlusion_pools.load(Relaxed),
|
||||
@@ -2534,9 +2655,10 @@ pub struct Metrics {
|
||||
/// feedback layout, one at a draw that reads an attachment after a memory barrier owed to it,
|
||||
/// and two around the copies a draw that reads an attachment makes into its image's shadow
|
||||
/// ([`attachment_read_copies`](Self::attachment_read_copies)), or the clear of the shadow
|
||||
/// that stands for a copy of what its pass cleared, one for each acquire of an exported
|
||||
/// block ([`external_acquires`](Self::external_acquires)), and one for each release of one
|
||||
/// ([`external_releases`](Self::external_releases)). Any other draw takes none. An upload
|
||||
/// that stands for a copy of what its pass cleared. Any other draw takes none. The hand-overs
|
||||
/// of memory another API shares are the runtime's own command buffers' barriers
|
||||
/// ([`external_acquires`](Self::external_acquires),
|
||||
/// [`external_releases`](Self::external_releases)). An upload
|
||||
/// adds one where it moves new textures' images to their home layouts, one more after the
|
||||
/// zeroing of those it zeroes ([`texture_clear_barriers`](Self::texture_clear_barriers)), two
|
||||
/// around each copy between a texture's image and the staging region or a named buffer
|
||||
@@ -2582,7 +2704,8 @@ pub struct Metrics {
|
||||
/// reached indirect argument reads, whatever buffer was written.
|
||||
pub dispatch_indirect_barriers: u64,
|
||||
/// Of those, the ones for an access through an address outside every resource: a read after
|
||||
/// a write, a write after any access, or the barrier such a write owes the next dispatch.
|
||||
/// a write, a write after any access, a write of a resource after such a read, or the barrier
|
||||
/// such a write owes the next dispatch.
|
||||
pub dispatch_unbound_barriers: u64,
|
||||
/// Of those, the ones before each piece of a dispatch split for its Private-arena slots but
|
||||
/// the first in a block taken new: the piece reuses slots an earlier command may have used.
|
||||
@@ -2601,7 +2724,8 @@ pub struct Metrics {
|
||||
/// copy-ins: new textures' moves home and those after their zeroing
|
||||
/// ([`texture_clear_barriers`](Self::texture_clear_barriers)), the two around each staging copy
|
||||
/// (`replaceRegion` and `getBytes`), a heap texture's move before a host write, the acquires of
|
||||
/// exported blocks and surfaces, Direct3D 11 planes' hand-overs, those between zero fills that
|
||||
/// exported blocks and surfaces, an exported surface's planes' moves at its making, before its
|
||||
/// release, Direct3D 11 planes' hand-overs, those between zero fills that
|
||||
/// meet, a new indirect command buffer's, the two around each side of the copies of textures
|
||||
/// over a buffer an upload or a copy-in carries, each upload's end, and a copy-in's where it
|
||||
/// copies no texture.
|
||||
@@ -2611,14 +2735,19 @@ pub struct Metrics {
|
||||
/// read's shadow copies or the clear of its shadow, an execution count's, heap textures'
|
||||
/// moves), the two around each side of the copies between a texture over a buffer and its
|
||||
/// image of its own in a command buffer, heap textures' moves before a command or ahead of a
|
||||
/// segment, and each release of a block or a surface to another API.
|
||||
/// segment, each release of a block or a surface to another API, and the move of a pass's
|
||||
/// plane stand-ins to the attachment layout after their copies in
|
||||
/// ([`plane_copies_in`](Self::plane_copies_in)).
|
||||
pub other_barriers: u64,
|
||||
/// Bytes the runtime copied for a call: `replace_region` and `get_bytes` staging, the copies
|
||||
/// between a texture over a buffer and its image of its own
|
||||
/// ([`over_copy_bytes`](Self::over_copy_bytes)), the copies of attachments' images into their
|
||||
/// shadows ([`attachment_read_copy_bytes`](Self::attachment_read_copy_bytes)), and the copies of
|
||||
/// resolve images into buffers ([`resolve_copy_bytes`](Self::resolve_copy_bytes)). A blit's own
|
||||
/// copy, and a synchronize's, is the program's and is not counted.
|
||||
/// shadows ([`attachment_read_copy_bytes`](Self::attachment_read_copy_bytes)), the copies of
|
||||
/// resolve images into buffers ([`resolve_copy_bytes`](Self::resolve_copy_bytes)), and the
|
||||
/// copies between marked surface planes and their stand-ins
|
||||
/// ([`plane_copy_in_bytes`](Self::plane_copy_in_bytes),
|
||||
/// [`plane_copy_out_bytes`](Self::plane_copy_out_bytes)). A blit's own copy, and a
|
||||
/// synchronize's, is the program's and is not counted.
|
||||
pub bytes_copied: u64,
|
||||
/// Bytes of new buffers zeroed: [`Device::new_buffer`](crate::Device::new_buffer)'s from its
|
||||
/// `zero_from` to the buffer's end, and a Managed buffer's device copy's past its copied bytes
|
||||
@@ -2728,6 +2857,17 @@ pub struct Metrics {
|
||||
pub made_ahead_variants: u64,
|
||||
/// The nanoseconds of the [`made_ahead_variants`](Self::made_ahead_variants), in total.
|
||||
pub made_ahead_variant_nanos: u64,
|
||||
/// Words twins made ([`Gauges::word_pipelines`]): the second `VkPipeline` of each make of a
|
||||
/// module that declares `SpecKey::TexelBufferWords`, also counted in
|
||||
/// [`pipelines_created`](Self::pipelines_created). Only a device that holds some format's
|
||||
/// texture buffer as words makes them.
|
||||
pub word_pipelines_created: u64,
|
||||
/// The nanoseconds of [`host_time`](crate::host_time) the
|
||||
/// [`word_pipelines_created`](Self::word_pipelines_created) took, in total, each its
|
||||
/// specialization and its driver's create: also counted in
|
||||
/// [`pipeline_creation_nanos`](Self::pipeline_creation_nanos) and in the time of the make
|
||||
/// that made it.
|
||||
pub word_pipeline_nanos: u64,
|
||||
/// The states' main pipelines that `finish_pipeline` calls made on their callers' threads,
|
||||
/// after the state's creation answered
|
||||
/// ([`ComputePipelineState::finish_pipeline`](crate::ComputePipelineState::finish_pipeline),
|
||||
@@ -2773,7 +2913,9 @@ pub struct Metrics {
|
||||
/// took an allocation of their own, not a place in a texture block: an image the device
|
||||
/// requires an allocation of its own for or whose memory types leave out the Private type,
|
||||
/// and one made where device-local memory had no texture block left. A texture's shadow and
|
||||
/// a counted copy's image are among them.
|
||||
/// a counted copy's image are among them, and so are the Private blocks textures in place over
|
||||
/// host memory's import save their bytes in at their move home where no free range of the
|
||||
/// pool fit one.
|
||||
pub texture_allocations: SiteAllocations,
|
||||
/// Those of texture blocks: a texture's place that no texture block had room for took a
|
||||
/// Private block, and no free range of the pool, which the block-maker thread keeps a wholly
|
||||
@@ -2819,6 +2961,26 @@ pub struct Metrics {
|
||||
/// The longest of those waits, in nanoseconds of [`host_time`](crate::host_time); a maximum
|
||||
/// since the device was made, so the difference of two reads does not apply to it.
|
||||
pub maker_wait_max_nanos: u64,
|
||||
/// Translations made at encode, on the encoding thread, which the draw or dispatch that needs
|
||||
/// one waits for: each the make of a module or content the state's creation did not make,
|
||||
/// whether the translator lowers it or the cache directory holds its lowering, and whether it
|
||||
/// is made or refused. Four makes count: an observing kernel's partial-threadgroups variant
|
||||
/// on emulated SIMD groups (`KernelVariant::EmulatedPartialThreadgroups`) that a dispatch
|
||||
/// lowers because no
|
||||
/// [`ComputePipelineState::prepare_dispatch`](crate::ComputePipelineState::prepare_dispatch)
|
||||
/// of its shape lowered it first; a compute state's content for a dispatch's buffers bound
|
||||
/// at a multiple of 4 below their alignment or its 8-bit sRGB textures' UNORM twins; a
|
||||
/// render state's content for a draw's buffers bound at a multiple of 4 below their
|
||||
/// alignment or its 8-bit sRGB textures' UNORM twins; and a render state's content for a pass it does not render into as made (a
|
||||
/// colour attachment the pass lacks, or a fetched colour in a 2D array). Each is made once and
|
||||
/// kept in the device's map of contents, or with its content, so a reuse counts nothing; a
|
||||
/// content the map forgot counts again when it is made again. A consumer whose pre-pass
|
||||
/// prepares every dispatch reads none of the first kind; the other three have no pre-pass.
|
||||
/// No Metal counterpart: Metal compiles a state whole when it is made.
|
||||
pub translations_at_encode: u64,
|
||||
/// The longest of those makes, in nanoseconds of [`host_time`](crate::host_time); a maximum
|
||||
/// since the device was made, so the difference of two reads does not apply to it.
|
||||
pub translation_at_encode_max_nanos: u64,
|
||||
/// `vkAllocateMemory` and `vkFreeMemory` calls made ahead of need, off the consumer's calls:
|
||||
/// the block-maker thread's (the runtime's fixed-size internals, the pool's units, and the
|
||||
/// frees of idle allocations and of the imported and exported blocks given back), and each
|
||||
@@ -2924,6 +3086,11 @@ pub struct Metrics {
|
||||
/// a content with no record, decoding and specializing its functions, and kept the record
|
||||
/// again.
|
||||
pub render_records_stale: u64,
|
||||
/// Contents made, compute and render, one of whose modules declares
|
||||
/// `SpecKey::TexelBufferWords`: each makes a words twin of every `VkPipeline` it makes
|
||||
/// ([`Gauges::word_pipelines`]). Only a device that holds some format's texture buffer as words
|
||||
/// makes them.
|
||||
pub word_contents: u64,
|
||||
/// `VkPipeline` creations that went through the device's empty pipeline cache while the
|
||||
/// reaper read and took in the device's blob ([`DeviceOptions::pipeline_cache_dir`]): each
|
||||
/// compiled without the blob's data, and those pipelines are not in this run's blob, so a
|
||||
@@ -2962,14 +3129,18 @@ pub struct Metrics {
|
||||
/// Compiled contents, compute or render, a state's make dropped because an equal one landed
|
||||
/// in the device's map of contents first; the state takes the map's. No Metal counterpart.
|
||||
pub kernel_makes_dropped: u64,
|
||||
/// Writes of the pipeline cache's data over the device's blob skipped because the data was
|
||||
/// Writes of the pipeline cache's data over the device's blob skipped: because the data was
|
||||
/// past the bound of 128 MiB, as at the device's teardown where the cache grew past it after
|
||||
/// the reaper's last look: the blob keeps what it held, and a later device seeds from that.
|
||||
/// Metal has no counterpart.
|
||||
/// the reaper's last look, or because a quiesce's deadline passed before the reaper's last
|
||||
/// write began: a creation still ran, which that write waits for until the deadline, or the
|
||||
/// quiesce's earlier waits took the time ([`Device::quiesce`](crate::Device::quiesce)). Past the
|
||||
/// deadline before it takes the pipeline cache's lock, the write is counted without the
|
||||
/// cache's size read, so whether or not the cache changed. The blob keeps what it held, and a
|
||||
/// later device seeds from that. Metal has no counterpart.
|
||||
pub pipeline_cache_writes_skipped: u64,
|
||||
/// Bytes written to the cache directory ([`DeviceOptions::pipeline_cache_dir`]): lowered
|
||||
/// kernels, and the device's pipeline cache blob each time it is written: once creation is
|
||||
/// quiet where the cache grew by more than an eighth since the last write, and at the
|
||||
/// quiet where the cache's size at least doubled since the last write, and at the
|
||||
/// device's drop where it changed.
|
||||
///
|
||||
/// [`DeviceOptions::pipeline_cache_dir`]: crate::DeviceOptions::pipeline_cache_dir
|
||||
@@ -3040,6 +3211,22 @@ pub struct Metrics {
|
||||
pub resolve_copies: u64,
|
||||
/// The bytes of those copies, which count in [`bytes_copied`](Self::bytes_copied) too.
|
||||
pub resolve_copy_bytes: u64,
|
||||
/// Copies of a marked surface plane into its stand-in, which Metal does not make: one for each
|
||||
/// colour attachment of a pass that mixes a plane whose `LINEAR` tiling renders only through
|
||||
/// `VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV` with another attachment and loads it
|
||||
/// (`LoadAction::Load`), of the pass's render area as the pass begins. The stand-ins are
|
||||
/// [`Gauges::plane_stand_ins`]; a device whose `LINEAR` tiling renders the plane's format
|
||||
/// makes none.
|
||||
pub plane_copies_in: u64,
|
||||
/// The bytes of those copies, which count in [`bytes_copied`](Self::bytes_copied) too.
|
||||
pub plane_copy_in_bytes: u64,
|
||||
/// Copies of a marked surface plane's stand-in into the plane, which Metal does not make: one
|
||||
/// for each colour attachment of such a pass whose store action stores (all but `DontCare`),
|
||||
/// and for each resolve of such a pass into a plane, of the pass's render area as the pass
|
||||
/// ends.
|
||||
pub plane_copies_out: u64,
|
||||
/// The bytes of those copies, which count in [`bytes_copied`](Self::bytes_copied) too.
|
||||
pub plane_copy_out_bytes: u64,
|
||||
/// Draws that read an attachment of their own pass through the attachment feedback loop, a
|
||||
/// fragment function's colour read (`[[color(n)]]`) or a texture argument over the
|
||||
/// attachment: each with the image in the feedback layout, after the barrier that moved it
|
||||
@@ -3082,13 +3269,25 @@ pub struct Metrics {
|
||||
/// shaders reach are in Shared memory ([`MemoryClass::Shared`], `MTLStorageModeShared`), an
|
||||
/// imported block's among them; the rest are over a Managed buffer's device copy.
|
||||
pub over_copy_bytes_shared: u64,
|
||||
/// Of [`over_copies`](Self::over_copies), those of a texture over a buffer in host memory's import
|
||||
/// ([`Device::import_host_memory`](crate::Device::import_host_memory)): Vulkan shares that memory's
|
||||
/// ownership with the host, and an image made for it starts undefined, a layout whose move
|
||||
/// keeps no bytes.
|
||||
/// Of [`over_copies`](Self::over_copies), those of a texture over a buffer in host memory's
|
||||
/// import ([`Device::import_host_memory`](crate::Device::import_host_memory)) at its uses: on a
|
||||
/// discrete or virtual device
|
||||
/// ([`Device::has_unified_memory`](crate::Device::has_unified_memory) false), and where the
|
||||
/// device's external image query offers no linear image of the texture's format and usage for
|
||||
/// host memory's handle, the texture's copies in and back.
|
||||
pub over_copies_host_memory: u64,
|
||||
/// The bytes of those copies, which count in [`over_copy_bytes`](Self::over_copy_bytes) too.
|
||||
pub over_copy_bytes_host_memory: u64,
|
||||
/// Of [`over_copies`](Self::over_copies), those of a texture in place over a buffer in host
|
||||
/// memory's import, on an integrated or CPU device: two in the texture's life, inside its
|
||||
/// make, which has them go in the submit thread's next submission, the runtime's own or a
|
||||
/// group's, and returns once it completed.
|
||||
/// An image made for that memory starts undefined, and its move from there may discard the
|
||||
/// bytes, so the move comes between a save of the bytes under it and their write-back
|
||||
/// ([`textures_in_place_over_imports`](Self::textures_in_place_over_imports)).
|
||||
pub over_copies_host_memory_restore: u64,
|
||||
/// The bytes of those copies, which count in [`over_copy_bytes`](Self::over_copy_bytes) too.
|
||||
pub over_copy_bytes_host_memory_restore: u64,
|
||||
/// Of [`over_copies`](Self::over_copies), those of a texture over a buffer in a dma-buf's one import (`Device::import_dma_buf`, on
|
||||
/// Unix) on a device without `VK_EXT_queue_family_foreign`, or whose external image query
|
||||
/// (`VkPhysicalDeviceExternalImageFormatInfo`) takes no linear image of the texture's format,
|
||||
@@ -3190,8 +3389,8 @@ pub struct Metrics {
|
||||
/// a class's reserve, which the idle rule does not free, is taken again past 250 ms.
|
||||
pub idle_reuses_by_age: [u64; 7],
|
||||
/// Bytes the commits' copy-ins copy on the GPU from Managed buffers' bytes into their device
|
||||
/// copies: each range `didModifyRange:` named since the last capture, once, on a device whose
|
||||
/// Managed buffers have device copies
|
||||
/// copies: each range `didModifyRange:` named, once, at the first commit that names its buffer,
|
||||
/// on a device whose Managed buffers have device copies
|
||||
/// ([`Buffer::did_modify_range`](crate::Buffer::did_modify_range)).
|
||||
pub managed_bytes_captured: u64,
|
||||
/// Releases of a texture or a block while an upload not yet submitted held it: a texture
|
||||
@@ -3247,25 +3446,26 @@ pub struct Metrics {
|
||||
/// value, the order Vulkan defines for what the guest then reads; this counts a driver whose
|
||||
/// counter runs ahead of its wait.
|
||||
pub waits_behind_counter: u64,
|
||||
/// Acquires of another API's writes into exported blocks recorded
|
||||
/// ([`Block::external_writes_done`](crate::Block::external_writes_done)) and into exported
|
||||
/// surfaces ([`Surface::external_writes_done`](crate::Surface::external_writes_done), and an
|
||||
/// in-place surface's buffer at the [`Surface::buffer`](crate::Surface::buffer) call that
|
||||
/// makes it): one barrier each, in the upload, also counted in [`barriers`](Self::barriers).
|
||||
/// Also one for each texture in place over a buffer in a dma-buf's import
|
||||
/// (`Device::import_dma_buf`, on Unix), whose move home acquires its image and the buffer's
|
||||
/// range under it from the foreign queue family, in the barrier of the upload's moves home.
|
||||
/// Also one for each `vkQueueSubmit2` that uses a Direct3D 11 plane
|
||||
/// ([`d3d11_plane_submissions`](Self::d3d11_plane_submissions)), in a command buffer of its
|
||||
/// own.
|
||||
/// Acquires of memory another API shares, one for each `vkQueueSubmit2` whose command buffers
|
||||
/// or uploads use any (an exported block, an exported surface's planes in place or its buffer,
|
||||
/// a Direct3D 11 plane, `Device::import_d3d11_surface` on Windows): one barrier of everything
|
||||
/// the call uses of it, from the other API's queue family, in a command buffer of the
|
||||
/// runtime's own ahead of everything in the call, after a global barrier from and to every
|
||||
/// stage; both counted in [`barriers`](Self::barriers). A group sent member by member acquires
|
||||
/// in each of its calls that uses any. Also one for each texture in place over a buffer in a
|
||||
/// dma-buf's import (`Device::import_dma_buf`, on Unix), whose move home acquires its image
|
||||
/// and the buffer's range under it from the foreign queue family, in the barrier of the
|
||||
/// upload's moves home. No Metal counterpart: an IOSurface needs no hand-over between APIs.
|
||||
pub external_acquires: u64,
|
||||
/// Releases of exported blocks and surfaces to another API recorded
|
||||
/// ([`BlitCommandEncoder::release_to_external`](crate::BlitCommandEncoder::release_to_external),
|
||||
/// [`BlitCommandEncoder::release_surface_to_external`](crate::BlitCommandEncoder::release_surface_to_external)):
|
||||
/// one barrier each, in the command buffer's work, also counted in
|
||||
/// [`barriers`](Self::barriers). Also one for each `vkQueueSubmit2` that uses a Direct3D 11
|
||||
/// plane ([`d3d11_plane_submissions`](Self::d3d11_plane_submissions)), in a command buffer of
|
||||
/// its own.
|
||||
/// Releases of memory another API shares: one for each `vkQueueSubmit2` that acquired it
|
||||
/// ([`external_acquires`](Self::external_acquires)), one barrier of what it acquired, in a
|
||||
/// command buffer of the runtime's own after everything in the call, which takes the call's
|
||||
/// last signals; and one for each submission that carries the making of exported memory
|
||||
/// ([`Device::new_exported_block`](crate::Device::new_exported_block),
|
||||
/// [`Device::new_exported_surface`](crate::Device::new_exported_surface)), one barrier of
|
||||
/// what was made, a plane's first move out of the undefined layout among it, in a command
|
||||
/// buffer at the submission's head, ahead of any acquire. Each counted in
|
||||
/// [`barriers`](Self::barriers). No Metal counterpart, as above.
|
||||
pub external_releases: u64,
|
||||
/// `vkQueueSubmit2` calls whose command buffers keep a plane of a Direct3D 11 surface
|
||||
/// (`Device::import_d3d11_surface`, on Windows), or whose uploads copy into or out of one:
|
||||
@@ -3298,6 +3498,15 @@ pub struct Metrics {
|
||||
/// ([`Device::new_exported_surface`](crate::Device::new_exported_surface),
|
||||
/// [`SurfaceForm::Copy`](crate::SurfaceForm::Copy)).
|
||||
pub surfaces_copied: u64,
|
||||
/// Textures over a buffer in an imported block made in place in the import's own memory, each
|
||||
/// counted at its making ([`Buffer::new_texture`](crate::Buffer::new_texture)): over a
|
||||
/// dma-buf's one import (`Device::import_dma_buf`, on Unix), whose move home is an acquire
|
||||
/// ([`external_acquires`](Self::external_acquires)), and over host memory's import
|
||||
/// ([`Device::import_host_memory`](crate::Device::import_host_memory)) on an integrated or CPU
|
||||
/// device, whose move home is between a save of the bytes under it and their write-back, two
|
||||
/// copies in [`over_copies_host_memory_restore`](Self::over_copies_host_memory_restore). No
|
||||
/// Metal counterpart: Metal's texture over a no-copy buffer is its bytes, with no move.
|
||||
pub textures_in_place_over_imports: u64,
|
||||
/// Exported blocks a public call handed out a device address of, each counted at the first:
|
||||
/// [`Buffer::gpu_address`](crate::Buffer::gpu_address) answering an address in one, and a
|
||||
/// texture buffer's storage element at an index over its bytes; the block's own handle states
|
||||
@@ -3306,10 +3515,12 @@ pub struct Metrics {
|
||||
/// address went out; 0 where none went out, as for a surface's block in the copy form whose
|
||||
/// buffer's address nothing read.
|
||||
pub exported_blocks_addressed: u64,
|
||||
/// Waits of surfaces made in place for the submission that moves their planes to the general
|
||||
/// layout ([`Surface::wait_until_ready`](crate::Surface::wait_until_ready)), on the
|
||||
/// consumer's thread: one per call. The make
|
||||
/// ([`Device::new_exported_surface`](crate::Device::new_exported_surface)) waits for none.
|
||||
/// Waits for the submission that carries the making of an exported surface or block
|
||||
/// ([`Surface::wait_until_ready`](crate::Surface::wait_until_ready),
|
||||
/// [`Block::wait_until_ready`](crate::Block::wait_until_ready)), on the consumer's thread:
|
||||
/// one per call that waits (a Direct3D 11 import's waits for nothing). The makes
|
||||
/// ([`Device::new_exported_surface`](crate::Device::new_exported_surface),
|
||||
/// [`Device::new_exported_block`](crate::Device::new_exported_block)) wait for none.
|
||||
pub surface_waits: u64,
|
||||
/// The nanoseconds of [`host_time`](crate::host_time) the surface waits took, in total.
|
||||
pub surface_wait_nanos: u64,
|
||||
@@ -3317,9 +3528,9 @@ pub struct Metrics {
|
||||
/// difference of two reads does not apply to it.
|
||||
pub surface_wait_max_nanos: u64,
|
||||
/// The runtime's submissions the surface waits waited for, in total: at each wait's start,
|
||||
/// those of the device not yet complete, through the one that moves the planes, which is
|
||||
/// those of the device not yet complete, through the one that carries the making, which is
|
||||
/// among them unless it had completed before the wait began (a submission made after the
|
||||
/// make, for any command buffer, takes the moves). Another API's work is not counted: a wait
|
||||
/// make, for any command buffer, takes the making). Another API's work is not counted: a wait
|
||||
/// much longer than these submissions' GPU times waited behind work the runtime did not
|
||||
/// submit.
|
||||
pub surface_wait_submissions: u64,
|
||||
@@ -3362,17 +3573,12 @@ pub struct Metrics {
|
||||
/// ([`DrawKind::VisibilityResultInterrupt`](crate::DrawKind::VisibilityResultInterrupt)):
|
||||
/// memory barriers and draws the guest asked for that did not run.
|
||||
pub visibility_interrupts_refused: u64,
|
||||
/// `setVisibilityResultMode:offset:` calls of a `Boolean` or `Counting` mode refused in a pass
|
||||
/// whose `visibilityResultType` is `Accumulate`
|
||||
/// ([`DrawKind::AccumulatedVisibilityResults`](crate::DrawKind::AccumulatedVisibilityResults)):
|
||||
/// results the guest asked for that were not written.
|
||||
pub accumulated_visibility_refused: u64,
|
||||
/// Blit copies refused because their source and destination share memory that no copy
|
||||
/// command orders as from the source before the copy
|
||||
/// ([`Gap::OverlappingCopy`](crate::Gap::OverlappingCopy)): rows of a texture in place over
|
||||
/// a buffer that meet the other side's shifted both ways, or not shifted, along each axis,
|
||||
/// and a texture placed in a heap whose memory meets the other side's. Copies the guest
|
||||
/// asked for that did not run.
|
||||
/// and a whole level into a whole level between two textures placed in a heap whose memory
|
||||
/// meets. Copies the guest asked for that did not run.
|
||||
pub overlapping_copies_refused: u64,
|
||||
/// Heap textures' images moved from undefined to their home layout before a command that
|
||||
/// writes them (a dispatch's slot or declared write, a pass's attachment, a draw's write, a
|
||||
@@ -3451,7 +3657,10 @@ pub struct Metrics {
|
||||
/// placement and vacating of an index takes; no bytes.
|
||||
pub texture_place_lock_waits: Timed,
|
||||
/// Each wait for the submit side's work lock of a new texture's or shadow's entry, or an
|
||||
/// acquired drawable's, in the next commit's upload, which moves it to its home layout; no
|
||||
/// acquired drawable's, in the next commit's upload, which moves it to its home layout, and
|
||||
/// of an exported block's or surface's, which owes its making there
|
||||
/// ([`Device::new_exported_block`](crate::Device::new_exported_block),
|
||||
/// [`Device::new_exported_surface`](crate::Device::new_exported_surface): one a make); no
|
||||
/// bytes.
|
||||
pub home_lock_waits: Timed,
|
||||
/// Each `vkCreateImage` of a texture's or a shadow's make and of an exported surface's
|
||||
@@ -3622,6 +3831,16 @@ pub struct Gauges {
|
||||
/// past them, which it keeps for later dispatches, and those past them that command buffers
|
||||
/// not yet retired held at its last make.
|
||||
pub kernel_variants: u64,
|
||||
/// Words twins: `VkPipeline`s of modules that declare `SpecKey::TexelBufferWords`,
|
||||
/// specialized with it true, each made in the same make as its plain pipeline, which a draw or
|
||||
/// dispatch that binds a texture buffer held as words runs; also counted in
|
||||
/// [`kernel_variants`](Self::kernel_variants)' kernels' variants and in a render content's
|
||||
/// pipelines. Only a device that holds some format's texture buffer as words makes them.
|
||||
pub word_pipelines: u64,
|
||||
/// Texture buffers held as words (`metal2vulkan::metal::format::texel_buffer_form`): while
|
||||
/// any lives, a draw or dispatch of a stage that reaches a texture buffer through a handle runs
|
||||
/// its words twin ([`word_pipelines`](Self::word_pipelines)).
|
||||
pub word_texture_buffers: u64,
|
||||
/// Entries of the device's map of compiled contents, compute and render, which holds at most
|
||||
/// 1,024 and forgets the least recently used past them.
|
||||
pub kernel_entries: u64,
|
||||
@@ -3630,8 +3849,10 @@ pub struct Gauges {
|
||||
/// with its shader modules and their `VkPipeline`s, shared by every state of that content.
|
||||
/// One lives while a state or the device's map of contents holds it.
|
||||
pub render_contents: u64,
|
||||
/// The image views textures keep for render passes: one for each level and slice a pass
|
||||
/// rendered into, freed with the texture.
|
||||
/// The image views textures keep for render passes: one for each level, first slice and
|
||||
/// layer count a pass rendered into, freed with the texture. A texture keeps at most one for
|
||||
/// each level and slice (each depth plane of a 3D texture's levels) and one more a level; past
|
||||
/// that, a new one first frees the least recently used one no command buffer in flight holds.
|
||||
pub attachment_views: u64,
|
||||
/// Command buffers not yet retired.
|
||||
pub command_buffers: u64,
|
||||
@@ -3715,6 +3936,14 @@ pub struct Gauges {
|
||||
pub resolve_images: u64,
|
||||
/// The bytes of the resolve images' memory.
|
||||
pub resolve_image_bytes: u64,
|
||||
/// Plane stand-ins: optimal images a pass that mixes a surface plane whose `LINEAR` tiling
|
||||
/// renders only through `VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV` with another
|
||||
/// attachment renders or resolves into in the plane's place, at most one for each format of
|
||||
/// the plane, made at the first such pass and freed with the plane
|
||||
/// ([`Metrics::plane_copies_in`], [`Metrics::plane_copies_out`]).
|
||||
pub plane_stand_ins: u64,
|
||||
/// The bytes of the plane stand-ins' memory.
|
||||
pub plane_stand_in_bytes: u64,
|
||||
/// Textures over a buffer the runtime holds in an image of their own, where the device's
|
||||
/// linear image does not take the texture or the buffer's bytes are imported
|
||||
/// ([`Buffer::new_texture`](crate::Buffer::new_texture)): the copies between them and their
|
||||
@@ -3832,13 +4061,15 @@ pub struct Gauges {
|
||||
/// Bytes of the surface plane imports [`surface_imports`](Self::surface_imports) counts, as
|
||||
/// each was allocated.
|
||||
pub surface_import_bytes: u64,
|
||||
/// Releases of textures' indices, views and images, texture views' views, sampler states'
|
||||
/// indices and device samplers that wait for the command buffers committed before them to
|
||||
/// retire, which may reach them through set 1 with no handle of them; none where nothing was
|
||||
/// in flight at the release. One stops counting once that work has retired and the
|
||||
/// block-maker thread has taken it: an index vacated, so
|
||||
/// [`descriptor_slots`](Self::descriptor_slots) no longer counts it, an object handed to the
|
||||
/// reaper thread, which frees it next.
|
||||
/// Releases the runtime has not yet done. Textures' indices, views and images, texture views'
|
||||
/// views, sampler states' indices and device samplers wait for the command buffers committed
|
||||
/// before them to retire, which may reach them through set 1 with no handle of them; none
|
||||
/// waits where nothing was in flight at the release. Once that work has retired, an index is
|
||||
/// vacated, so [`descriptor_slots`](Self::descriptor_slots) no longer counts it, and an object
|
||||
/// goes to the reaper thread. An object the reaper thread is given counts until it has freed
|
||||
/// it, and an imported or exported block or memory of its own another object held, given back,
|
||||
/// counts until the block-maker thread has freed it. So once this reads 0 with no command
|
||||
/// buffer live, every release made before is done.
|
||||
pub releases_waiting: u64,
|
||||
/// Indirect command buffers alive, each with its records' block
|
||||
/// ([`Device::new_indirect_command_buffer`](crate::Device::new_indirect_command_buffer)).
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
//! host's: the planes another API decodes or draws into, shared by their NT handles, each
|
||||
//! imported as an optimal image of its own and read by rt's shaders in place.
|
||||
//!
|
||||
//! The import makes no submission and waits for nothing. A plane's image is made undefined, and
|
||||
//! Vulkan takes it as general once Direct3D 11 has accessed it (section 12.5.2, below), which the
|
||||
//! consumer reports by `Surface::external_writes_done`: no upload moves it, and its first acquire
|
||||
//! names the undefined layout where no such access was reported before it. Each `vkQueueSubmit2`
|
||||
//! that uses a plane takes it from `VK_QUEUE_FAMILY_EXTERNAL` at its start and gives it back at
|
||||
//! its end, before its signals (`crate::submit::parts`).
|
||||
//! The import makes no submission and waits for nothing. A plane's image is made undefined, a
|
||||
//! placeholder: Direct3D 11 made the memory, and Vulkan implies the general layout for it outside
|
||||
//! Vulkan (section 12.5.2, below), so no upload moves it and every acquire, the first included,
|
||||
//! takes it from the general layout. Each `vkQueueSubmit2` that uses a plane takes it from
|
||||
//! `VK_QUEUE_FAMILY_EXTERNAL` at its start and gives it back at its end, before its signals
|
||||
//! (`crate::submit::parts`).
|
||||
|
||||
use crate::counters::Gauge;
|
||||
use crate::device::{Core, Device};
|
||||
@@ -116,21 +116,22 @@ impl Device {
|
||||
/// the layout specified in the table, and can be assumed to be in that layout when they are
|
||||
/// accessed in Vulkan after external access", and its Table 17 gives
|
||||
/// `VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT` the layout `VK_IMAGE_LAYOUT_GENERAL`.
|
||||
/// So a plane's first acquire names the undefined layout as its old layout where the
|
||||
/// consumer reported no Direct3D 11 access of it before
|
||||
/// ([`Surface::external_writes_done`]), and the general layout where it did; every later
|
||||
/// acquire names the general layout, the plane being general after rt's own first acquire
|
||||
/// and release. "First" is the first acquire rt records for the plane. The Khronos validation
|
||||
/// layer does not track this import's layout: on the UHD 630 its 1.4.363.0 reported neither
|
||||
/// a first acquire from the general layout nor one from the undefined layout, so its silence
|
||||
/// is no evidence of either.
|
||||
/// Section 12.10.1 (External Resource Sharing) says of an image bound to memory another
|
||||
/// API owns: "Such an image is not usable until it acquires ownership of its memory from the
|
||||
/// existing owner. Therefore, the layout specified as part of this transition will be the
|
||||
/// true initial layout of the image. The undefined layout specified when creating it is a
|
||||
/// placeholder to simplify valid usage requirements." Direct3D 11 made the texture, so it is
|
||||
/// that owner, and every acquire of a plane, the first included, names the general layout
|
||||
/// as its old layout, whether or not the consumer called [`Surface::external_writes_done`]
|
||||
/// before the commit: a move from the undefined layout would not preserve what Direct3D 11
|
||||
/// wrote (section 12.5.1). The Khronos validation layer does not track this import's layout:
|
||||
/// on the UHD 630 its 1.4.363.0 reported neither a first acquire from the general layout nor
|
||||
/// one from the undefined layout, so its silence is no evidence of either.
|
||||
///
|
||||
/// **Ownership.** Each `vkQueueSubmit2` whose command buffers or uploads use a plane acquires
|
||||
/// it from `VK_QUEUE_FAMILY_EXTERNAL` in a command buffer of rt's own ahead of everything in
|
||||
/// it, from the general layout, or from the undefined layout at its first acquire as
|
||||
/// **Layout** says (`VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-12332` allows either), to
|
||||
/// the general layout, and releases it to that family in another after everything in it, in
|
||||
/// the general layout
|
||||
/// it, from and to the general layout (`VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-12332`),
|
||||
/// and releases it to that family in another after everything in it, in the general layout
|
||||
/// (`...-dstQueueFamilyIndex-12331`), which takes that call's last signals, its progress value
|
||||
/// among them, so it adds no submit info and a command buffer that uses a plane is seen
|
||||
/// complete only once the plane's release has run: Direct3D 11 owns the planes' memory
|
||||
@@ -141,24 +142,18 @@ impl Device {
|
||||
/// ([`Metrics::d3d11_plane_parts`](crate::Metrics::d3d11_plane_parts)). The acquire follows
|
||||
/// a global barrier from and to every stage, so an earlier submission's release on rt's one
|
||||
/// queue happens before it (Vulkan 1.4, section 7.7.6).
|
||||
/// [`Surface::external_writes_done`] and
|
||||
/// [`release_surface_to_external`](crate::BlitCommandEncoder::release_surface_to_external)
|
||||
/// record nothing for such a surface; the first marks its planes accessed by Direct3D 11, on
|
||||
/// the host (**Layout**). No keyed mutex is used, by rt or on the textures: each
|
||||
/// is made with `D3D11_RESOURCE_MISC_SHARED | D3D11_RESOURCE_MISC_SHARED_NTHANDLE`, not
|
||||
/// [`Surface::external_writes_done`] records nothing for such a surface and changes nothing.
|
||||
/// No keyed mutex is used, by rt or on
|
||||
/// the textures: each is made with
|
||||
/// `D3D11_RESOURCE_MISC_SHARED | D3D11_RESOURCE_MISC_SHARED_NTHANDLE`, not
|
||||
/// `D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX`, whose mutex the device that makes the texture and
|
||||
/// each device that opens it must acquire before rendering to it; the consumer orders the two
|
||||
/// APIs' work by its waits.
|
||||
///
|
||||
/// **The consumer's precondition.** Direct3D 11's work that accesses a plane has completed
|
||||
/// before the consumer commits the command buffers that use it, the consumer calls
|
||||
/// [`Surface::external_writes_done`] after each such access and before that commit, and rt's
|
||||
/// command buffers that use a plane have completed before Direct3D 11 accesses it again.
|
||||
/// Without the call after Direct3D 11's first access, rt's first acquire of the plane names
|
||||
/// the undefined layout, and a transition from it does not preserve the contents (section
|
||||
/// 12.5.1: "implying that the contents of the image subresource need not be preserved"), so
|
||||
/// the device may discard what Direct3D 11 wrote. A plane rt uses before any Direct3D 11
|
||||
/// access has undefined contents, as a Metal texture nothing wrote does.
|
||||
/// before the consumer commits the command buffers that use it, and rt's command buffers that
|
||||
/// use a plane have completed before Direct3D 11 accesses it again. A plane nothing wrote has
|
||||
/// undefined contents, as a Metal texture nothing wrote does.
|
||||
///
|
||||
/// The surface has no buffer: [`Surface::buffer`] is [`Gap::D3d11SurfaceBuffer`], as its
|
||||
/// planes lie in memories of their own.
|
||||
@@ -365,9 +360,9 @@ impl Device {
|
||||
.tiling(vk::ImageTiling::OPTIMAL)
|
||||
.usage(usage)
|
||||
.sharing_mode(vk::SharingMode::EXCLUSIVE)
|
||||
// An external image is made undefined (`VUID-VkImageCreateInfo-pNext-01443`), which
|
||||
// its first acquire names where no Direct3D 11 access was reported; after one, it is
|
||||
// in the general layout (section 12.5.2, `Image::handed`).
|
||||
// An external image is made undefined (`VUID-VkImageCreateInfo-pNext-01443`), a
|
||||
// placeholder: each acquire takes it from the general layout, Direct3D 11's
|
||||
// (sections 12.5.2 and 12.10.1, `Image::handed`).
|
||||
.initial_layout(vk::ImageLayout::UNDEFINED)
|
||||
.push_next(&mut external);
|
||||
if !list.is_empty() {
|
||||
@@ -453,9 +448,11 @@ impl Device {
|
||||
view_formats: list,
|
||||
block: None,
|
||||
d3d11: true,
|
||||
family: vk::QUEUE_FAMILY_EXTERNAL,
|
||||
linear_attachment: false,
|
||||
laid: None,
|
||||
};
|
||||
self.surface_texture(d, plane.index, made, unit)
|
||||
self.surface_texture(d, plane.index, made, unit, None)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ use crate::memory::{self, BlockId, BlockMappings, Memory, MemoryClass, Pool};
|
||||
use crate::pass::ResolveModes;
|
||||
use crate::pipeline::{PUSH_STAGES, VOTE_BYTES};
|
||||
use crate::places::Places;
|
||||
use crate::positions::SamplePosition;
|
||||
use crate::reaper::{self, Job, Reaper};
|
||||
use crate::record::Recorders;
|
||||
use crate::ring::Ring;
|
||||
@@ -272,8 +273,9 @@ pub(crate) struct Core {
|
||||
/// Native mesh drawing entry points, only when meshShader was enabled.
|
||||
pub(crate) mesh: Option<ash::ext::mesh_shader::Device>,
|
||||
/// Device creation enabled the attachment feedback loop (`floor::Capabilities::feedback_loop`):
|
||||
/// every render pipeline takes its colour flag, and a draw reads an attachment of its pass
|
||||
/// with the image in the feedback layout.
|
||||
/// a draw reads an attachment of its pass with the image in the feedback layout, through a
|
||||
/// pipeline of a state whose functions can read a texture, which takes the loop's colour flag
|
||||
/// at the state's make (`crate::render::Draws::reads_textures`).
|
||||
pub(crate) feedback_loop: bool,
|
||||
/// `VK_EXT_device_fault`'s command, where device creation enabled it (where the device lists
|
||||
/// it): a lost device's fault report, read once, at its first loss (`crate::fault`).
|
||||
@@ -289,11 +291,17 @@ pub(crate) struct Core {
|
||||
/// Device creation enabled `linearColorAttachment` (`VK_NV_linear_color_attachment`, where
|
||||
/// the device lists it): an opaque handle's surface plane whose format's `LINEAR` tiling
|
||||
/// renders through `VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV` alone lies in place
|
||||
/// (`crate::surface`), its image marked, and a pass renders it only where Vulkan's rule for
|
||||
/// such images holds ([`Gap::LinearPlanePass`](crate::Gap::LinearPlanePass)).
|
||||
/// (`crate::surface`), its image marked: a pass of such planes alone renders it in place, and
|
||||
/// a pass that mixes it with another attachment renders it through its stand-in
|
||||
/// (`crate::pass::StandIn`).
|
||||
pub(crate) linear_attachments: bool,
|
||||
/// The depth and stencil resolve modes a render pass may resolve by.
|
||||
pub(crate) resolve_modes: ResolveModes,
|
||||
/// `VK_EXT_sample_locations`' commands and sample counts, where device creation enabled it
|
||||
/// and its properties hold what a pass's sample positions need
|
||||
/// ([`Locations::offered`](crate::positions::Locations::offered)): the device answers
|
||||
/// `programmableSamplePositionsSupported` yes.
|
||||
pub(crate) sample_locations: Option<crate::positions::Locations>,
|
||||
/// The longest block: the device's `maxMemoryAllocationSize` or `maxBufferSize`, whichever is
|
||||
/// less.
|
||||
pub(crate) max_block_len: u64,
|
||||
@@ -307,6 +315,20 @@ pub(crate) struct Core {
|
||||
/// of device memory, before the driver is called.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fail_private: std::sync::atomic::AtomicU32,
|
||||
/// For the device tests: how many more begins of a command buffer's recording
|
||||
/// (`command::Building::begin`) fail as `vkBeginCommandBuffer` out of host memory, before the
|
||||
/// driver is called.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fail_begins: std::sync::atomic::AtomicU32,
|
||||
/// For the device tests: how many more of the completion thread's wakes
|
||||
/// (`complete::Done::wake`) fail as `vkSignalSemaphore` out of host memory, before the driver
|
||||
/// is called.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fail_wakes: std::sync::atomic::AtomicU32,
|
||||
/// For the device tests: how many more host waits on what the GPU has pending (the device's
|
||||
/// idle wait, an import's bind wait) fail as out of host memory, before the driver is called.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fail_waits: std::sync::atomic::AtomicU32,
|
||||
/// For the device tests: where nonzero, the private arena's budget in place of the device's
|
||||
/// ([`Core::arena_budget`]), so a small dispatch splits.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
@@ -330,6 +352,9 @@ pub(crate) struct Core {
|
||||
/// ([`DeviceOptions::maker`]).
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) maker_test: memory::MakerTest,
|
||||
/// For the device tests: [`DeviceOptions::placed_past`].
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) placed_past: u64,
|
||||
pub(crate) pool: Pool,
|
||||
/// The runtime's `vkQueueSubmit2` calls inside the driver, which the block-maker thread waits
|
||||
/// out after each of its memory calls.
|
||||
@@ -389,6 +414,9 @@ pub(crate) struct Core {
|
||||
pub(crate) caches: Caches,
|
||||
/// [`DeviceOptions::stage_memory_ceiling`], kept with a memory breach and compared at a make.
|
||||
pub(crate) stage_memory_ceiling: u64,
|
||||
/// This device life's id, kept with a time breach and compared at a make
|
||||
/// (`crate::stage::life`).
|
||||
pub(crate) stage_life: u64,
|
||||
/// The compiled kernels by content, which every compute pipeline state of a content shares.
|
||||
pub(crate) kernels: KernelMap,
|
||||
/// The runtime's own kernels made so far (`crate::own`).
|
||||
@@ -456,7 +484,7 @@ pub struct DeviceOptions {
|
||||
/// of the `VkPipelineCache` every `VkPipeline` of the device is made through, at most 128 MiB:
|
||||
/// the device's cache takes it in off every guest thread, and it is
|
||||
/// replaced, never appended to, once pipeline creation has been quiet for 20 ms after the
|
||||
/// cache grew by more than an eighth, and at the device's drop where the cache changed. A
|
||||
/// cache's size at least doubled, and at the device's drop where the cache changed. A
|
||||
/// file that does not check, or a failed read or write, is a miss and never fails a call.
|
||||
/// `None` keeps nothing on disk, so every boot lowers every function and compiles every
|
||||
/// pipeline cold: a consumer should pass a directory. Metal keeps its compiled shaders in a
|
||||
@@ -486,6 +514,11 @@ pub struct DeviceOptions {
|
||||
/// from its first work on.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) maker: memory::MakerTest,
|
||||
/// For the device tests: bytes added to the device address each allocation of the pool reads
|
||||
/// (`vkGetBufferDeviceAddress`), as a device that places its memory there would answer; 0
|
||||
/// for the device's own answer.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) placed_past: u64,
|
||||
/// For the device tests: the device's description as the translator is to read it, in place
|
||||
/// of the device's own answers (a device that answers otherwise); the Vulkan device is the
|
||||
/// same.
|
||||
@@ -794,6 +827,28 @@ impl Device {
|
||||
.extensions
|
||||
.contains(&ash::ext::device_fault::NAME))
|
||||
.then(|| ash::ext::device_fault::Device::new(vk_instance, &device));
|
||||
let sample_locations = (capabilities.extensions)
|
||||
.contains(&ash::ext::sample_locations::NAME)
|
||||
.then(|| {
|
||||
let mut locations = vk::PhysicalDeviceSampleLocationsPropertiesEXT::default();
|
||||
{
|
||||
let mut properties =
|
||||
vk::PhysicalDeviceProperties2::default().push_next(&mut locations);
|
||||
// SAFETY: as for the floor check; the device lists the extension, which
|
||||
// defines the structure.
|
||||
unsafe { vk_instance.get_physical_device_properties2(raw, &mut properties) };
|
||||
}
|
||||
// The translator's flags are its own `vk`'s: the same bits.
|
||||
let raster = translator.metal_properties().raster_sample_counts.as_raw();
|
||||
let raster = vk::SampleCountFlags::from_raw(raster);
|
||||
crate::positions::Locations::offered(&locations, raster).then(|| {
|
||||
crate::positions::Locations {
|
||||
loader: ash::ext::sample_locations::Device::new(vk_instance, &device),
|
||||
counts: locations.sample_location_sample_counts,
|
||||
}
|
||||
})
|
||||
})
|
||||
.flatten();
|
||||
let indirect = (capabilities.indirect_commands).and_then(|limits| {
|
||||
// SAFETY: the device was made from `vk_instance`, with the extension, as the limits
|
||||
// are there.
|
||||
@@ -851,6 +906,7 @@ impl Device {
|
||||
alignment,
|
||||
);
|
||||
let submit_calls = Arc::new(SubmitCalls::new(counters.clone()));
|
||||
let reaper = Reaper::new(counters.clone());
|
||||
let live = instance.teardowns().live();
|
||||
let core = Arc::new(Core {
|
||||
mesh,
|
||||
@@ -875,12 +931,19 @@ impl Device {
|
||||
linear_attachments: (capabilities.features.linear_attachment).linear_color_attachment
|
||||
== vk::TRUE,
|
||||
resolve_modes,
|
||||
sample_locations,
|
||||
max_block_len,
|
||||
max_allocations,
|
||||
granularity,
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
fail_private: std::sync::atomic::AtomicU32::new(0),
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
fail_begins: std::sync::atomic::AtomicU32::new(0),
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
fail_wakes: std::sync::atomic::AtomicU32::new(0),
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
fail_waits: std::sync::atomic::AtomicU32::new(0),
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
arena_budget: std::sync::atomic::AtomicU64::new(0),
|
||||
arena: Mutex::new(Weak::new()),
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
@@ -891,6 +954,8 @@ impl Device {
|
||||
park_region: Mutex::new(None),
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
maker_test: options.maker,
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
placed_past: options.placed_past,
|
||||
pool,
|
||||
submit_calls,
|
||||
imports,
|
||||
@@ -901,7 +966,7 @@ impl Device {
|
||||
recorders: Recorders::new(family),
|
||||
work,
|
||||
done,
|
||||
reaper: Reaper::new(),
|
||||
reaper,
|
||||
stamps: StampPools::new(),
|
||||
occlusion: OcclusionPools::new(),
|
||||
buffer_sets: crate::bound::SetPools::new(),
|
||||
@@ -920,6 +985,7 @@ impl Device {
|
||||
translator,
|
||||
caches,
|
||||
stage_memory_ceiling: options.stage_memory_ceiling,
|
||||
stage_life: crate::stage::life(),
|
||||
kernels: KernelMap::new(),
|
||||
own: crate::own::OwnKernels::default(),
|
||||
entries: metal2vulkan::pipeline::StageEntries::new(),
|
||||
@@ -998,10 +1064,12 @@ impl Device {
|
||||
}
|
||||
|
||||
/// `supportsTextureSampleCount:`: whether `count` is a sample count the device renders into a
|
||||
/// colour and a depth attachment (its `framebufferColorSampleCounts` and
|
||||
/// `framebufferDepthSampleCounts`, of which Vulkan requires 1 and 4) that an Apple GPU takes:
|
||||
/// 1, 2 or 4 (Apple9's "Maximum sample count in render passes with MSAA" is 4). A count Vulkan
|
||||
/// has no bit for (0, 3, above 64) is not. A texture's own format may take fewer
|
||||
/// colour, a depth and a stencil attachment (its `framebufferColorSampleCounts`,
|
||||
/// `framebufferDepthSampleCounts` and `framebufferStencilSampleCounts`, of which Vulkan
|
||||
/// requires 1 and 4) that a Mac's Metal renders: 1, 2, 4 or 8. A Mac's AMD GPU answers yes for
|
||||
/// 8 (an AMD Radeon Pro 5300M, macOS 26.7.1), as Apple10 does, where an Apple M3 Max answers
|
||||
/// no; so a device that renders 8 answers yes where the M3 Max does not. A count Vulkan has no
|
||||
/// bit for (0, 3, above 64) is not, nor is 16. A texture's own format may take fewer
|
||||
/// ([`Limit::TextureSamples`](crate::Limit::TextureSamples)).
|
||||
pub fn supports_texture_sample_count(&self, count: u32) -> bool {
|
||||
let counts = self
|
||||
@@ -1013,6 +1081,46 @@ impl Device {
|
||||
count.is_power_of_two() && count <= 64 && counts.as_raw() & count != 0
|
||||
}
|
||||
|
||||
/// `programmableSamplePositionsSupported`: whether a render pass rasterizes at the sample
|
||||
/// positions its descriptor sets
|
||||
/// ([`RenderPassDescriptor::sample_positions`](crate::RenderPassDescriptor::sample_positions)).
|
||||
/// True where the device lists `VK_EXT_sample_locations` (one of the floor's
|
||||
/// [`OPTIONAL_EXTENSIONS`](crate::floor::OPTIONAL_EXTENSIONS)) with locations at each sample
|
||||
/// count above 1 that [`supports_texture_sample_count`](Device::supports_texture_sample_count)
|
||||
/// answers, one set for every pixel, every sixteenth of a pixel from 0 to 15/16 (Metal's
|
||||
/// grid), and locations that may differ between the pipelines of one command buffer
|
||||
/// (`variableSampleLocations`). False elsewhere, where a pass whose positions differ from the
|
||||
/// defaults is refused ([`Refusal::SamplePositions`]), as Metal refuses positions on a device
|
||||
/// that does not support them.
|
||||
pub fn programmable_sample_positions_supported(&self) -> bool {
|
||||
self.shared.core.sample_locations.is_some()
|
||||
}
|
||||
|
||||
/// `getDefaultSamplePositions:count:`: where the samples of a pass of `count` samples lie when
|
||||
/// it sets no positions, sample `i` at `i`: Vulkan's standard sample locations, which the
|
||||
/// floor's `standardSampleLocations` makes every pass that sets none rasterize at. At 1, 2, 4
|
||||
/// and 8 samples, the counts [`supports_texture_sample_count`](Device::supports_texture_sample_count)
|
||||
/// can answer, they are Metal's own (an Apple M3 Max, macOS 27.0.1: (0.5, 0.5); (0.75, 0.75),
|
||||
/// (0.25, 0.25); (0.375, 0.125), (0.875, 0.375), (0.125, 0.625), (0.625, 0.875); and an AMD
|
||||
/// Radeon Pro 5300M, macOS 26.7.1, at 8: (0.5625, 0.3125), (0.4375, 0.6875), (0.8125, 0.5625),
|
||||
/// (0.3125, 0.1875), (0.1875, 0.8125), (0.0625, 0.4375), (0.6875, 0.9375), (0.9375, 0.0625)).
|
||||
/// Metal writes the positions into the caller's array; this returns them.
|
||||
///
|
||||
/// Err: [`Refusal::DefaultSamplePositions`] for a count the device does not render, where plain
|
||||
/// Metal ends the process.
|
||||
pub fn default_sample_positions(&self, count: u32) -> Result<Vec<SamplePosition>, Error> {
|
||||
let table = (self.supports_texture_sample_count(count))
|
||||
.then(|| crate::positions::standard(count))
|
||||
.flatten();
|
||||
let Some(table) = table else {
|
||||
return Err(Error::Refused(Refusal::DefaultSamplePositions { count }));
|
||||
};
|
||||
Ok(table
|
||||
.iter()
|
||||
.map(|&[x, y]| SamplePosition::new(x, y))
|
||||
.collect())
|
||||
}
|
||||
|
||||
/// No Metal counterpart: the device extensions enabled: the floor's first, then each of the
|
||||
/// consumer's ([`DeviceOptions::extensions`]) the device offers with its features.
|
||||
pub fn extensions(&self) -> &[CString] {
|
||||
@@ -1147,7 +1255,9 @@ impl Device {
|
||||
/// buffer; [`Limit::BlockIds`](crate::Limit::BlockIds);
|
||||
/// [`Limit::MemoryAllocations`](crate::Limit::MemoryAllocations) where the block takes an
|
||||
/// allocation past the device's count; [`Limit::AllocationNotMapped`](crate::Limit::AllocationNotMapped)
|
||||
/// where the consumer did not map the allocation the take made; [`Error::Vulkan`] where the
|
||||
/// where the consumer did not map the allocation the take made;
|
||||
/// [`Limit::AllocationAddress`](crate::Limit::AllocationAddress) where the device placed the
|
||||
/// allocation the take made off a multiple of 16; [`Error::Vulkan`] where the
|
||||
/// device is out of memory or lost; [`Error::Quiesced`].
|
||||
pub fn take_block(&self, class: MemoryClass, len: u64) -> Result<Block, Error> {
|
||||
let core = &self.shared.core;
|
||||
@@ -1170,8 +1280,14 @@ impl Device {
|
||||
/// every command buffer it holds or has not yet submitted with
|
||||
/// [`CommandBufferError::NotRun`](crate::CommandBufferError::NotRun), and ends; the
|
||||
/// block-maker thread ends; the GPU completes everything submitted; the completion thread
|
||||
/// retires it, runs the completed handlers, and ends; then [`BlockMappings::unmap`] runs on
|
||||
/// this thread for every allocation still mapped. After it, no runtime thread touches a block,
|
||||
/// retires it, runs the completed handlers, and ends; the reaper thread writes the pipeline
|
||||
/// cache's blob ([`DeviceOptions::pipeline_cache_dir`]) where the cache changed since its last
|
||||
/// write, waiting for a pipeline creation still running until the same deadline, and ends; it
|
||||
/// begins no write past the deadline, which it skips (`Metrics::pipeline_cache_writes_skipped`)
|
||||
/// whether a creation or the waits before it took the time; then [`BlockMappings::unmap`] runs
|
||||
/// on this thread for every allocation still mapped. A write begun before the deadline runs to
|
||||
/// its end, and where it ends past it the call answers false; cut short by the process's end,
|
||||
/// it leaves the blob as it was. After it, no runtime thread touches a block,
|
||||
/// unless the call answered false. A thread past the timeout ends alone: the completion
|
||||
/// thread once the GPU completed what was submitted and it retired that, running its
|
||||
/// completed handlers, so what the work held goes then. Such a thread is not joined here; the device's last handle joins
|
||||
@@ -1411,7 +1527,7 @@ fn halt(
|
||||
false => idle &= finish(complete, core, deadline, &mut left.complete),
|
||||
true => left.complete = complete,
|
||||
}
|
||||
core.reaper.stop();
|
||||
core.reaper.stop(deadline);
|
||||
idle &= finish(reaper, core, deadline, &mut left.reaper);
|
||||
// The consumer's mappings go here, on the thread that stops the device, whichever thread
|
||||
// later drops the core's last reference and frees the memory.
|
||||
@@ -1740,13 +1856,21 @@ impl Core {
|
||||
}
|
||||
|
||||
/// Waits for the device to go idle. A lost device does so at once.
|
||||
///
|
||||
/// `vkDeviceWaitIdle` fails with `VK_ERROR_DEVICE_LOST`, after which nothing is pending, or for
|
||||
/// want of memory or with `VK_ERROR_UNKNOWN`, which say nothing of what is pending: the wait is
|
||||
/// then made again ([`complete::wait_through`]) until it succeeds or the device is lost. A
|
||||
/// lasting out-of-memory result on a live device so waits, and nothing the device may still
|
||||
/// use is destroyed after it.
|
||||
pub(crate) fn wait_idle(&self) {
|
||||
// `vkDeviceWaitIdle` needs every queue of the device externally synchronized.
|
||||
let _runtime = lock(&self.queues.runtime);
|
||||
let _present = (!Arc::ptr_eq(&self.queues.runtime, &self.queues.present))
|
||||
.then(|| lock(&self.queues.present));
|
||||
// SAFETY: every queue is held. A lost device fails the wait, and then nothing is pending.
|
||||
let _ = unsafe { self.device.device_wait_idle() };
|
||||
complete::wait_through(self, || {
|
||||
// `vkDeviceWaitIdle` needs every queue of the device externally synchronized.
|
||||
let _runtime = lock(&self.queues.runtime);
|
||||
let _present = (!Arc::ptr_eq(&self.queues.runtime, &self.queues.present))
|
||||
.then(|| lock(&self.queues.present));
|
||||
// SAFETY: every queue is held.
|
||||
unsafe { self.device.device_wait_idle() }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,20 @@ pub(crate) const TOKEN_PUSH_CONSTANT: i32 = 1;
|
||||
pub(crate) const TOKEN_SEQUENCE_INDEX: i32 = 2;
|
||||
pub(crate) const TOKEN_INDEX_BUFFER: i32 = 3;
|
||||
pub(crate) const TOKEN_DRAW_INDEXED: i32 = 5;
|
||||
pub(crate) const TOKEN_DRAW: i32 = 6;
|
||||
/// `VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT`.
|
||||
pub(crate) const INPUT_MODE_VULKAN: u32 = 1;
|
||||
/// The stages an execution's commands run: a render pipeline's vertex and fragment stages.
|
||||
pub(crate) const STAGES: vk::ShaderStageFlags = vk::ShaderStageFlags::from_raw(
|
||||
vk::ShaderStageFlags::VERTEX.as_raw() | vk::ShaderStageFlags::FRAGMENT.as_raw(),
|
||||
);
|
||||
/// The stages an execution of patch draws runs: a tessellation pipeline's vertex, control,
|
||||
/// evaluation and fragment stages.
|
||||
pub(crate) const PATCH_STAGES: vk::ShaderStageFlags = vk::ShaderStageFlags::from_raw(
|
||||
STAGES.as_raw()
|
||||
| vk::ShaderStageFlags::TESSELLATION_CONTROL.as_raw()
|
||||
| vk::ShaderStageFlags::TESSELLATION_EVALUATION.as_raw(),
|
||||
);
|
||||
|
||||
/// No Metal counterpart: `VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT`, which ash 0.38
|
||||
/// does not declare, as the floor reads and enables it ([`Features`](crate::floor::Features)).
|
||||
@@ -154,18 +162,19 @@ pub(crate) struct LayoutCreateInfo {
|
||||
}
|
||||
|
||||
impl LayoutCreateInfo {
|
||||
/// Ordered sequences (no flag) of `tokens` at `stride`, for vertex and fragment stages,
|
||||
/// through `layout`.
|
||||
/// Ordered sequences (no flag) of `tokens` at `stride`, for `stages` ([`STAGES`] or
|
||||
/// [`PATCH_STAGES`]), through `layout`.
|
||||
pub(crate) fn new(
|
||||
stride: u32,
|
||||
layout: vk::PipelineLayout,
|
||||
tokens: &[LayoutToken],
|
||||
stages: vk::ShaderStageFlags,
|
||||
) -> LayoutCreateInfo {
|
||||
LayoutCreateInfo {
|
||||
s_type: structure(6),
|
||||
p_next: std::ptr::null(),
|
||||
flags: 0,
|
||||
shader_stages: STAGES,
|
||||
shader_stages: stages,
|
||||
indirect_stride: stride,
|
||||
pipeline_layout: layout,
|
||||
token_count: tokens.len() as u32,
|
||||
@@ -235,11 +244,12 @@ pub(crate) struct CommandsInfo {
|
||||
|
||||
impl CommandsInfo {
|
||||
/// At most `sequences` sequences of `layout` at `indirect` (`size` bytes), preprocessed into
|
||||
/// `preprocess` (`preprocess_size` bytes), with the inherited `pipeline`: all of them where
|
||||
/// `count` is 0, else as many as the `u32` at device address `count` says, up to `sequences`.
|
||||
/// `preprocess` (`preprocess_size` bytes), with the inherited `pipeline` of `stages` (the
|
||||
/// layout's): all of them where `count` is 0, else as many as the `u32` at device address
|
||||
/// `count` says, up to `sequences`.
|
||||
pub(crate) fn new(
|
||||
pipeline: &PipelineInfo,
|
||||
layout: u64,
|
||||
(layout, stages): (u64, vk::ShaderStageFlags),
|
||||
(indirect, size): (u64, u64),
|
||||
(preprocess, preprocess_size): (u64, u64),
|
||||
(sequences, count): (u32, u64),
|
||||
@@ -247,7 +257,7 @@ impl CommandsInfo {
|
||||
CommandsInfo {
|
||||
s_type: structure(4),
|
||||
p_next: <*const PipelineInfo>::cast(pipeline),
|
||||
shader_stages: STAGES,
|
||||
shader_stages: stages,
|
||||
execution_set: 0,
|
||||
layout,
|
||||
indirect_address: indirect,
|
||||
|
||||
@@ -18,7 +18,7 @@ use crate::kept::{Handle, Lent, Uncounted};
|
||||
use crate::memory::BlockId;
|
||||
use crate::over::{self, Reached, Span};
|
||||
use crate::pipeline::{
|
||||
address_word, Compiled, ComputePipelineState, FieldValue, Form, Interface, Kernel, Place,
|
||||
address_word, Compiled, ComputePipelineState, FieldValue, Form, Interface, Kernel, Need, Place,
|
||||
VariantRefusal, Which, PUSH_STAGES, SQUARE,
|
||||
};
|
||||
use crate::record::Reach;
|
||||
@@ -27,8 +27,9 @@ use crate::sampler::SamplerState;
|
||||
use crate::texture::{Region, StorageGap, Texture, TextureObject};
|
||||
use ash::vk;
|
||||
use metal2vulkan::metal::format::{integer_channels_word, BICUBIC_TEXELS_UNBOUND};
|
||||
use metal2vulkan::metal::TextureUsage;
|
||||
use metal2vulkan::pipeline::{
|
||||
grid_tile, nonuniform_region_bytes, region_bytes, DEEP_THREADGROUP, GRID_TILE_THREADS,
|
||||
grid_tile, nonuniform_region_bytes, region_bytes, Stage, DEEP_THREADGROUP, GRID_TILE_THREADS,
|
||||
};
|
||||
use std::ops::BitOr;
|
||||
use std::sync::Arc;
|
||||
@@ -111,6 +112,26 @@ enum Slot {
|
||||
Bytes(Placed, u32),
|
||||
}
|
||||
|
||||
/// [`Refusal::TextureUsageAtSlot`] where a texture of `usage` (its usage as Metal answers it) is
|
||||
/// bound at texture slot `index`, which a function of `stage` uses, and lacks the usage `asked`
|
||||
/// that the function's access there asks (`crate::pipeline::slot_usage`). A dispatch and a draw
|
||||
/// check each texture their functions' slots reach before they record anything.
|
||||
pub(crate) fn check_usage(
|
||||
stage: Stage,
|
||||
index: u32,
|
||||
asked: TextureUsage,
|
||||
usage: TextureUsage,
|
||||
) -> Result<(), Error> {
|
||||
match usage.contains(asked) {
|
||||
true => Ok(()),
|
||||
false => Err(Error::Refused(Refusal::TextureUsageAtSlot {
|
||||
stage,
|
||||
index,
|
||||
usage,
|
||||
})),
|
||||
}
|
||||
}
|
||||
|
||||
/// [`Refusal::BufferOffsetAlignment`] where `buffer`, bound at `offset` to buffer argument
|
||||
/// `slot`, is at an address (its `gpuAddress` plus the offset) that is not a multiple of the
|
||||
/// alignment the module takes the argument to have, `mask + 1` (`FieldValue::BufferAddress`'s
|
||||
@@ -322,6 +343,9 @@ pub(crate) enum Module {
|
||||
Partial,
|
||||
/// The emulated-SIMD-group variant.
|
||||
Emulated,
|
||||
/// An observing kernel's partial-threadgroups variant on emulated SIMD groups, for a ragged
|
||||
/// grid at a threadgroup that is not whole SIMD groups of its partial-threadgroups variant.
|
||||
EmulatedPartial,
|
||||
}
|
||||
|
||||
/// The last dispatch's module and workgroup size, and its `VkPipeline`.
|
||||
@@ -331,6 +355,8 @@ struct Last {
|
||||
content: u64,
|
||||
module: Module,
|
||||
local: [u32; 3],
|
||||
/// It is the module's words twin (`pipeline::Twins`).
|
||||
words: bool,
|
||||
pipeline: vk::Pipeline,
|
||||
}
|
||||
|
||||
@@ -598,7 +624,9 @@ impl ComputeCommandEncoder {
|
||||
///
|
||||
/// Err, binding nothing: [`Refusal::TextureArgumentIndex`] for an index of 128 or more;
|
||||
/// [`Refusal::OtherDevice`] for another device's texture; [`Refusal::TextureWithoutIndex`]
|
||||
/// for a texture shaders reach through its views alone.
|
||||
/// for a texture shaders reach through its views alone. A texture whose usage lacks what the
|
||||
/// kernel's access at the slot asks binds, as Metal's does, and the dispatch is
|
||||
/// [`Refusal::TextureUsageAtSlot`].
|
||||
pub fn set_texture(&mut self, texture: Option<&Texture>, index: u32) -> Result<(), Error> {
|
||||
if index >= TEXTURE_SLOTS {
|
||||
return Err(Error::Refused(Refusal::TextureArgumentIndex { index }));
|
||||
@@ -922,13 +950,22 @@ impl ComputeCommandEncoder {
|
||||
/// runs stays valid under it. Metal states no retention for `useHeap:`; keeping is the safe
|
||||
/// reading. It declares no access: a dispatch touches its bound slots and the `use_resource`
|
||||
/// declarations, and a kernel that reaches a heap's resources through addresses outside its
|
||||
/// slots already orders against every write since the last barrier.
|
||||
/// slots already orders against every write since the last barrier, and every dispatch that
|
||||
/// writes after it before the next barrier orders against it. It is a read of each texture
|
||||
/// of the heap placed over another resource's bytes and not yet moved from the undefined
|
||||
/// layout it is made in (`crate::alias`), which a kernel may reach next through an address:
|
||||
/// its move goes here, after every earlier command of the command buffer that read the bytes
|
||||
/// it may change.
|
||||
///
|
||||
/// Err: [`Error::NoSuchBlock`] for a number no handle names.
|
||||
pub fn use_heap(&mut self, heap: BlockId) -> Result<(), Error> {
|
||||
let building = self.building();
|
||||
let block = building.device.block(heap)?;
|
||||
building.keep_block(&block);
|
||||
let unmoved = crate::alias::unmoved(building.device.core(), heap);
|
||||
if !unmoved.is_empty() {
|
||||
building.places(unmoved.iter().map(|place| (Some(place), Access::Read)))?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -979,7 +1016,9 @@ impl ComputeCommandEncoder {
|
||||
/// [`Refusal::BufferOffsetAlignment`] for a buffer the kernel reaches bound off the alignment
|
||||
/// its function holds it to, which nothing records (a function kernel's argument of 8 or 16
|
||||
/// bound at a multiple of 4 runs on its kernel's variant that holds it to 4);
|
||||
/// [`Gap::SwizzledReadWrite`]; [`Gap::BicubicTexels`];
|
||||
/// [`Gap::SwizzledReadWrite`]; [`Gap::OpenClLineTexture`]; [`Refusal::TextureUsageAtSlot`]
|
||||
/// for a texture the kernel's slot reaches whose usage lacks what the kernel's access there
|
||||
/// asks; [`Gap::BicubicTexels`];
|
||||
/// [`Limit::LevelElements`] where no run of level elements holds a texture of several levels
|
||||
/// the kernel writes or reads at a level other than the constant 0;
|
||||
/// [`Limit::ThreadgroupMemory`], the imageblock's cells at the size
|
||||
@@ -1099,7 +1138,28 @@ impl ComputeCommandEncoder {
|
||||
return Err(Error::Unsupported(Gap::SwizzledReadWrite { slot }));
|
||||
}
|
||||
}
|
||||
// Each texture the kernel's slots reach, of the usage its access there asks.
|
||||
for &(slot, asked) in &inner.whole.interface.usages {
|
||||
if let Some(Some(texture)) = self.textures.get(slot as usize) {
|
||||
check_usage(Stage::Kernel, slot, asked, texture.metal_usage())?;
|
||||
}
|
||||
}
|
||||
let interface = &inner.whole.interface;
|
||||
// A 1D texture bound for a kernel of OpenCL mode, which reads each 1D image as the 2D
|
||||
// texture Apple's OpenCL binds for it and never a 1D one.
|
||||
if interface.open_cl_mode {
|
||||
for &(slot, _) in &interface.textures {
|
||||
if let Some(Some(texture)) = self.textures.get(slot as usize) {
|
||||
let line = matches!(
|
||||
texture.descriptor().texture_type,
|
||||
crate::TextureType::Type1D | crate::TextureType::Type1DArray
|
||||
);
|
||||
if line {
|
||||
return Err(Error::Unsupported(Gap::OpenClLineTexture { slot }));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// A bicubic sample's texture, of a format the filter's treatment is known for.
|
||||
for field in &interface.fields {
|
||||
if let FieldValue::BicubicTexels(slot) = field.value {
|
||||
@@ -1233,7 +1293,13 @@ impl ComputeCommandEncoder {
|
||||
lengths: &self.threadgroup_lengths,
|
||||
imageblock: self.imageblock,
|
||||
};
|
||||
let (choice, module, kernel) = decide(inner, direct, size, limits.max_shared_memory)?;
|
||||
let (choice, module, kernel) = decide(
|
||||
inner,
|
||||
direct,
|
||||
size,
|
||||
limits.max_shared_memory,
|
||||
Need::Dispatch(state.descriptor()),
|
||||
)?;
|
||||
let Choice {
|
||||
local,
|
||||
nominal,
|
||||
@@ -1246,8 +1312,22 @@ impl ComputeCommandEncoder {
|
||||
if direct.is_some_and(|(_, groups, _)| groups.contains(&0)) {
|
||||
return Ok(());
|
||||
}
|
||||
// The module's words twin where a texture buffer held as words is bound where it reaches
|
||||
// one.
|
||||
let textures = &self.textures;
|
||||
let words = kernel.binds_words(
|
||||
core,
|
||||
|slot| matches!(textures.get(slot as usize), Some(Some(t)) if t.held_as_words()),
|
||||
);
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
if words {
|
||||
core.counters.ran_twin();
|
||||
}
|
||||
let vk_pipeline = match self.last {
|
||||
Some(last) if (last.content, last.module, last.local) == (inner.id, module, local) => {
|
||||
Some(last)
|
||||
if (last.content, last.module, last.local, last.words)
|
||||
== (inner.id, module, local, words) =>
|
||||
{
|
||||
last.pipeline
|
||||
}
|
||||
_ => {
|
||||
@@ -1261,7 +1341,7 @@ impl ComputeCommandEncoder {
|
||||
// A variant past the kernel's cells is held by the command buffer from its first
|
||||
// dispatch, so no make evicts it while the command buffer is not retired.
|
||||
let site = inner.first_use(variant);
|
||||
kernel.pipeline(core, variant, site, |listed| {
|
||||
kernel.pipeline(core, (variant, words), site, |listed| {
|
||||
recording(&mut self.building).hold_variant(listed)
|
||||
})?
|
||||
}
|
||||
@@ -1270,6 +1350,7 @@ impl ComputeCommandEncoder {
|
||||
content: inner.id,
|
||||
module,
|
||||
local,
|
||||
words,
|
||||
pipeline: vk_pipeline,
|
||||
});
|
||||
let interface = &kernel.interface;
|
||||
@@ -1300,6 +1381,9 @@ impl ComputeCommandEncoder {
|
||||
};
|
||||
let wrote = {
|
||||
let building = recording(&mut self.building);
|
||||
// The dispatch's segment marks what it does and takes the copies back owed to it, in
|
||||
// a new one past a signal.
|
||||
building.open_segment()?;
|
||||
// Heap textures it writes that an alias's write left stale move from undefined first
|
||||
// (`crate::alias`).
|
||||
if building.aliased() {
|
||||
@@ -1447,10 +1531,10 @@ impl ComputeCommandEncoder {
|
||||
// it: the barrier is owed once the dispatch is recorded, to the next command.
|
||||
recording(&mut self.building).owe(Owed::Unbound);
|
||||
}
|
||||
if recorded.is_ok() && module == Module::Emulated {
|
||||
if recorded.is_ok() && matches!(module, Module::Emulated | Module::EmulatedPartial) {
|
||||
recording(&mut self.building).count(Metric::EmulatedSimdgroupDispatches);
|
||||
}
|
||||
if recorded.is_ok() && module == Module::Partial {
|
||||
if recorded.is_ok() && matches!(module, Module::Partial | Module::EmulatedPartial) {
|
||||
recording(&mut self.building).count(match ragged {
|
||||
true => Metric::PartialVariantRaggedGrids,
|
||||
false => Metric::PartialVariantWholeGrids,
|
||||
@@ -1544,17 +1628,20 @@ pub(crate) fn size_checked(interface: &Interface, size: [u32; 3]) -> Result<(),
|
||||
|
||||
/// What a dispatch at threadgroup size `size`, direct over `direct` or indirect, of the content
|
||||
/// `compiled` runs, on a device of `max` bytes of threadgroup memory, decided once for the
|
||||
/// dispatch and for [`ComputePipelineState::prepare_dispatch`]: [`choose`]'s choice, then its
|
||||
/// module, an observer's partial-threadgroups variant for a ragged grid, and the emulated variant
|
||||
/// for a threadgroup that is not whole groups of a module that runs only whole ones (the
|
||||
/// partial-threadgroups variant has none), each lowered with the state. An observer's whole grids,
|
||||
/// threadgroup dispatches and indirect dispatches run its plain module.
|
||||
pub(crate) fn decide(
|
||||
compiled: &Compiled,
|
||||
/// dispatch and for [`ComputePipelineState::prepare_dispatch`] (`need`): [`choose`]'s choice,
|
||||
/// then its module, an observer's partial-threadgroups variant for a ragged grid, and the emulated
|
||||
/// variant for a threadgroup that is not whole groups of a module that runs only whole ones, each
|
||||
/// lowered with the state; for a ragged grid at a threadgroup that is not whole groups of the
|
||||
/// partial-threadgroups variant, that variant on emulated SIMD groups, lowered at the first such
|
||||
/// need ([`Compiled::emulated_partial_kernel`]). An observer's whole grids, threadgroup
|
||||
/// dispatches and indirect dispatches run its plain module.
|
||||
pub(crate) fn decide<'a>(
|
||||
compiled: &'a Compiled,
|
||||
direct: Option<Direct>,
|
||||
size: [u32; 3],
|
||||
max: u32,
|
||||
) -> Result<(Choice, Module, &Kernel), Error> {
|
||||
need: Need<'_>,
|
||||
) -> Result<(Choice, Module, &'a Kernel), Error> {
|
||||
let choice = choose(&compiled.form, direct, size);
|
||||
let partial_threadgroups = |site: PartialThreadgroupsSite| {
|
||||
Error::Unsupported(Gap::PartialThreadgroups {
|
||||
@@ -1590,9 +1677,14 @@ pub(crate) fn decide(
|
||||
match short(kernel) {
|
||||
None => Ok((choice, choice.module, kernel)),
|
||||
Some(width) if choice.module == Module::Partial => {
|
||||
Err(partial_threadgroups(PartialThreadgroupsSite::SimdGroups {
|
||||
width,
|
||||
}))
|
||||
let simd_groups = |_: VariantRefusal| {
|
||||
partial_threadgroups(PartialThreadgroupsSite::SimdGroups { width })
|
||||
};
|
||||
// A key's reader of a variant not made yet decides with the partial-threadgroups
|
||||
// variant, which declares the threadgroup arguments the key reads as this one does:
|
||||
// nothing is lowered for a key.
|
||||
let emulated = compiled.emulated_partial_kernel(need, simd_groups)?;
|
||||
Ok((choice, Module::EmulatedPartial, emulated.unwrap_or(kernel)))
|
||||
}
|
||||
Some(width) => {
|
||||
let partial_simdgroups = |_: VariantRefusal| {
|
||||
@@ -1895,6 +1987,8 @@ impl Parameters {
|
||||
// A compute content has none of these (`pipeline::interface`).
|
||||
FieldValue::Word(_)
|
||||
| FieldValue::TessellationFactors
|
||||
| FieldValue::PatchIndices
|
||||
| FieldValue::ControlPointIndices
|
||||
| FieldValue::AlphaTestReference
|
||||
| FieldValue::FetchedColor(_)
|
||||
| FieldValue::RenderTargetArrayLength
|
||||
@@ -1956,8 +2050,9 @@ struct Parameters {
|
||||
/// off 4 where it is 4): the block's bytes past the buffer, padding before the next buffer at a
|
||||
/// multiple of 256 that no zeroing of the buffer reaches, which hold zero or the same device's
|
||||
/// earlier bytes (a device's blocks are ranges of its own allocations), never another device's;
|
||||
/// - a `set_bytes` copy: its bytes, from its own first byte, at a multiple of `align` in the
|
||||
/// ring's buffer (`crate::ring`), with 0;
|
||||
/// - a `set_bytes` copy: its bytes, from its own first byte, whose device address is a multiple
|
||||
/// of `align` and whose offset in the ring's buffer is a multiple of the device's
|
||||
/// `minStorageBufferOffsetAlignment` (`crate::ring`), with 0;
|
||||
/// - nothing bound, or a buffer or a copy of no bytes: a null descriptor, with 0.
|
||||
fn view(slots: &[Slot], slot: u32, align: u64) -> (Descriptor, u32) {
|
||||
match slots.get(slot as usize) {
|
||||
@@ -1970,7 +2065,7 @@ fn view(slots: &[Slot], slot: u32, align: u64) -> (Descriptor, u32) {
|
||||
((reached, start, ahead + buffer.length()), word)
|
||||
}
|
||||
Some(Slot::Bytes(placed, length)) if *length > 0 => {
|
||||
debug_assert!(placed.offset % align == 0);
|
||||
debug_assert!(placed.address % align == 0);
|
||||
((placed.buffer, placed.offset, u64::from(*length)), 0)
|
||||
}
|
||||
_ => (NULL, 0),
|
||||
@@ -2148,7 +2243,9 @@ impl Building {
|
||||
// an owed barrier orders in either kind.
|
||||
let ordered = serial || owed.is_some();
|
||||
let mut depends = Depends::default();
|
||||
let mut writes = false;
|
||||
for ([tracked, own], access) in accesses.each(interface).filter(|_| ordered) {
|
||||
writes |= access.writes();
|
||||
let Some(on) = hazards.dependency(tracked, access) else {
|
||||
continue;
|
||||
};
|
||||
@@ -2162,9 +2259,12 @@ impl Building {
|
||||
None => depends.shared = true,
|
||||
}
|
||||
}
|
||||
// A read through an address outside every resource may have been of anything: it orders
|
||||
// after every write before it and before every write after it.
|
||||
let unbound = ordered
|
||||
&& ((interface.reads_unbound && hazards.wrote())
|
||||
|| (interface.writes_unbound && hazards.touched()));
|
||||
|| (interface.writes_unbound && hazards.touched())
|
||||
|| (writes && hazards.read_wild()));
|
||||
let conflict = serial && (depends.any() || unbound);
|
||||
if owed.is_some() || conflict || args {
|
||||
let cause = if depends.write {
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -33,6 +33,8 @@ impl Refusal {
|
||||
Refusal::PatchDraw => RefusalBasis::MetalMeasured,
|
||||
Refusal::MeshDraw => RefusalBasis::MetalDocumented,
|
||||
Refusal::NoTessellationFactorBuffer => RefusalBasis::MetalMeasured,
|
||||
Refusal::IndexedPatchDrawWithoutIndexType => RefusalBasis::MetalMeasured,
|
||||
Refusal::PatchDrawWithIndexType { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::PointSizeTopology { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::BufferIndex { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::TextureArgumentIndex { .. } => RefusalBasis::MetalDocumented,
|
||||
@@ -49,6 +51,7 @@ impl Refusal {
|
||||
Refusal::IndicesNotGranted { .. } => RefusalBasis::Ours,
|
||||
Refusal::TextureIndex { .. } => RefusalBasis::Ours,
|
||||
Refusal::TextureWithoutIndex { .. } => RefusalBasis::Ours,
|
||||
Refusal::TextureUsageAtSlot { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::TextureZeroExtent => RefusalBasis::MetalMeasured,
|
||||
Refusal::TextureExtentForType => RefusalBasis::MetalMeasured,
|
||||
Refusal::TextureCubeNotSquare => RefusalBasis::MetalMeasured,
|
||||
@@ -66,8 +69,11 @@ impl Refusal {
|
||||
Refusal::TextureViewFormat { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::MipmapFormat { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::TextureCopyMismatch { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::AliasingCopy { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::ManagedTextureBytes { .. } => RefusalBasis::Ours,
|
||||
Refusal::BufferTextureLayout { .. } => RefusalBasis::Ours,
|
||||
Refusal::TextureNotInPlace { .. } => RefusalBasis::Ours,
|
||||
Refusal::RestoreFenceRefused { .. } => RefusalBasis::Ours,
|
||||
Refusal::TextureBufferAlignment { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::TextureBufferNotOverBuffer => RefusalBasis::Ours,
|
||||
Refusal::HeapTexturePlace { .. } => RefusalBasis::Ours,
|
||||
@@ -79,16 +85,20 @@ impl Refusal {
|
||||
Refusal::DrawableNotAcquired => RefusalBasis::Ours,
|
||||
Refusal::DrawableSemaphoreRepeated => RefusalBasis::Ours,
|
||||
Refusal::BufferCopyRange { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::BufferCopyOverlap { .. } => RefusalBasis::Ours,
|
||||
Refusal::BufferCopyOverlap { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::AttachmentUsage { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::ResolveTexture => RefusalBasis::MetalDocumented,
|
||||
Refusal::ResolveFormat { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::AttachmentPlace { .. } => RefusalBasis::Ours,
|
||||
Refusal::AttachmentFormat { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::NoAttachmentPass { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::SamplePositions { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::DefaultSamplePositions { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::VertexBufferOffset { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::IndexBufferOffset { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::TessellationFactorOffset { .. } => RefusalBasis::MetalDocumented,
|
||||
Refusal::PatchIndexBufferOffset { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::ControlPointIndexBufferOffset { .. } => RefusalBasis::MetalMeasured,
|
||||
Refusal::ArgumentPlace { .. } => RefusalBasis::Ours,
|
||||
Refusal::ViewportNotFinite => RefusalBasis::MetalMeasured,
|
||||
Refusal::StencilAttachment => RefusalBasis::MetalMeasured,
|
||||
@@ -119,6 +129,7 @@ impl Limit {
|
||||
Limit::LevelElements { .. } => RefusalBasis::Ours,
|
||||
Limit::MemoryAllocations { .. } => RefusalBasis::Device,
|
||||
Limit::AllocationNotMapped { .. } => RefusalBasis::Ours,
|
||||
Limit::AllocationAddress { .. } => RefusalBasis::Device,
|
||||
Limit::NoImport { .. } => RefusalBasis::Device,
|
||||
Limit::ImportType { .. } => RefusalBasis::Device,
|
||||
Limit::ImportCoherence { .. } => RefusalBasis::Device,
|
||||
@@ -160,12 +171,12 @@ impl Gap {
|
||||
Gap::FillAlignment { .. } => RefusalBasis::Ours,
|
||||
Gap::RenderPipeline { .. } => RefusalBasis::Ours,
|
||||
Gap::SwizzledReadWrite { .. } => RefusalBasis::Ours,
|
||||
Gap::OpenClLineTexture { .. } => RefusalBasis::Ours,
|
||||
Gap::StorageElement { .. } => RefusalBasis::Ours,
|
||||
Gap::BicubicTexels { .. } => RefusalBasis::Ours,
|
||||
Gap::TextureView { .. } => RefusalBasis::Ours,
|
||||
Gap::RenderPass { .. } => RefusalBasis::Ours,
|
||||
Gap::Draw { .. } => RefusalBasis::Ours,
|
||||
Gap::LinearPlanePass { .. } => RefusalBasis::Device,
|
||||
Gap::StageSize { .. } => RefusalBasis::Device,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
//! Events: Metal's event values carried by timeline semaphores, and the host floor of a shared
|
||||
//! event.
|
||||
//! Events: Metal's event values, carried by timeline semaphores that count the events' signals,
|
||||
//! and the host floor of a shared event.
|
||||
//!
|
||||
//! **The semaphore counts signals.** An event's semaphore does not take Metal's values: the k-th
|
||||
//! signal the submit thread hands to `vkQueueSubmit2` signals it to k, and the event keeps each
|
||||
//! pending signal's count with its Metal value ([`EventState::pending`]). Metal's values only
|
||||
//! rise, so the counts and the values rise together, and the event's value is the value of the
|
||||
//! signal its semaphore's count reached. So no signal lies further from the semaphore's value, or
|
||||
//! from any signal pending on it, than the signals pending on it, which Vulkan bounds by the
|
||||
//! device's `maxTimelineSemaphoreValueDifference` (`VUID-VkSubmitInfo2-semaphore-03883`; at least
|
||||
//! 2,147,483,647), whatever Metal's values jump by: a first signal of `u64::MAX`, or a GPU signal
|
||||
//! just above a host value far above the last GPU signal, moves the semaphore by one. A wait for a
|
||||
//! Metal value waits for the count of the first pending signal that reaches it. The runtime
|
||||
//! submits no semaphore wait for an event (`crate::submit`'s `stage`), so only signals are bound.
|
||||
//! A count of 64 bits does not wrap: at one signal a nanosecond it would take 2^64 ns, about 584
|
||||
//! years.
|
||||
|
||||
use crate::counters::Gauge;
|
||||
use crate::device::{lock, Core, Device};
|
||||
@@ -11,11 +25,13 @@ use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::sync::{Arc, Condvar, Mutex, PoisonError};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
/// `MTLEvent`: a timeline semaphore whose values are Metal's values.
|
||||
/// `MTLEvent`: a timeline semaphore that counts the event's signals, each count standing for its
|
||||
/// signal's Metal value (the module doc).
|
||||
///
|
||||
/// Metal's values only rise, so a signal not above the highest value already submitted or set
|
||||
/// changes nothing: the submit thread leaves it out, and the semaphore only rises. A cheap handle:
|
||||
/// clones share one event. It holds the device.
|
||||
/// changes nothing (an Apple M3 Max keeps the higher of two signals in either order: the
|
||||
/// conformance case `event-highest-signal`): the submit thread leaves it out, and it takes no
|
||||
/// count. A cheap handle: clones share one event. It holds the device.
|
||||
#[derive(Clone)]
|
||||
pub struct Event {
|
||||
inner: Arc<EventInner>,
|
||||
@@ -46,19 +62,26 @@ pub(crate) struct EventInner {
|
||||
/// in flight may write was settled for the host (`crate::coherence`); 0, and never read, where
|
||||
/// the Shared type is host-coherent.
|
||||
settled: AtomicU64,
|
||||
/// The highest value of the semaphore a host wait confirmed ([`EventInner::reached`]).
|
||||
/// The highest count of the semaphore a host wait confirmed ([`EventInner::confirm`]).
|
||||
confirmed: AtomicU64,
|
||||
}
|
||||
|
||||
pub(crate) struct EventState {
|
||||
/// The highest value of a signal handed to `vkQueueSubmit2`.
|
||||
pub(crate) submitted: u64,
|
||||
/// The signals handed to `vkQueueSubmit2`: the count the last of them signals the semaphore
|
||||
/// to.
|
||||
pub(crate) signals: u64,
|
||||
/// The highest value the host set.
|
||||
pub(crate) floor: u64,
|
||||
/// The highest semaphore value the completion thread has seen.
|
||||
/// The value of the signal whose count the completion thread has seen, the highest seen.
|
||||
observed: u64,
|
||||
/// Values of submitted signals the completion thread has not yet seen, lowest first.
|
||||
pub(crate) pending: VecDeque<u64>,
|
||||
/// The semaphore's count the completion thread has seen.
|
||||
observed_count: u64,
|
||||
/// The submitted signals the completion thread has not yet seen, as their counts and their
|
||||
/// Metal values, lowest first: both rise. One entry each, 16 bytes, which the command buffers
|
||||
/// in flight bound: no other bound applies.
|
||||
pub(crate) pending: VecDeque<(u64, u64)>,
|
||||
/// In the completion thread's watch list: while signals are pending.
|
||||
pub(crate) watched: bool,
|
||||
listeners: Vec<(u64, Listener)>,
|
||||
@@ -80,8 +103,10 @@ impl Device {
|
||||
core: Arc::clone(core),
|
||||
state: Mutex::new(EventState {
|
||||
submitted: 0,
|
||||
signals: 0,
|
||||
floor: 0,
|
||||
observed: 0,
|
||||
observed_count: 0,
|
||||
pending: VecDeque::new(),
|
||||
watched: false,
|
||||
listeners: Vec::new(),
|
||||
@@ -141,31 +166,25 @@ impl Event {
|
||||
}
|
||||
|
||||
impl SharedEvent {
|
||||
/// `signaledValue`: the higher of the semaphore's value and the host's floor, the semaphore's
|
||||
/// value being one a host wait confirmed: a counter read finds it, and a wait with a timeout
|
||||
/// of 0 confirms it where it is above the value last confirmed. Where the
|
||||
/// semaphore's value rose since the host last saw it, the Shared memory command buffers in
|
||||
/// flight may write is flushed and invalidated first (`crate::coherence`), so the host reads
|
||||
/// what the GPU wrote before its signal.
|
||||
/// `signaledValue`: the higher of the value of the signal the semaphore's count reached and the
|
||||
/// host's floor, that count being one a host wait confirmed: a counter read finds it, and a
|
||||
/// wait with a timeout of 0 confirms it where it is above the count last confirmed. Where the
|
||||
/// value rose since the host last saw it, the Shared memory command buffers in flight may
|
||||
/// write is flushed and invalidated first (`crate::coherence`), so the host reads what the GPU
|
||||
/// wrote before its signal.
|
||||
pub fn signaled_value(&self) -> u64 {
|
||||
let inner = &self.event.inner;
|
||||
let Some(coherence) = &inner.core.coherence else {
|
||||
let (signalled, floor) = {
|
||||
let state = lock(&inner.state);
|
||||
let floor = state.observed.max(state.floor);
|
||||
// A lost device answers with what was seen before the loss.
|
||||
return inner
|
||||
.reached(None)
|
||||
.map_or(floor, |reached| reached.max(floor));
|
||||
let signalled = inner
|
||||
.reached(&state, None)
|
||||
.map_or(state.observed, |reached| reached.max(state.observed));
|
||||
(signalled, state.floor)
|
||||
};
|
||||
let (observed, floor) = {
|
||||
let state = lock(&inner.state);
|
||||
(state.observed, state.floor)
|
||||
};
|
||||
// A lost device answers with what was seen before the loss.
|
||||
let signalled = inner
|
||||
.reached(None)
|
||||
.map_or(observed, |reached| reached.max(observed));
|
||||
inner.seen(coherence, signalled);
|
||||
if let Some(coherence) = &inner.core.coherence {
|
||||
inner.seen(coherence, signalled);
|
||||
}
|
||||
signalled.max(floor)
|
||||
}
|
||||
|
||||
@@ -211,7 +230,7 @@ impl SharedEvent {
|
||||
None => {
|
||||
if state.floor.max(state.observed) >= value
|
||||
|| inner
|
||||
.reached(Some(value))
|
||||
.reached(&state, Some(value))
|
||||
.is_ok_and(|reached| reached >= value)
|
||||
{
|
||||
return Ok(true);
|
||||
@@ -222,7 +241,7 @@ impl SharedEvent {
|
||||
// writes before it are the host's first.
|
||||
let met = match state.floor.max(state.observed) >= value {
|
||||
true => Some(state.observed),
|
||||
false => (inner.reached(Some(value)).ok())
|
||||
false => (inner.reached(&state, Some(value)).ok())
|
||||
.filter(|&reached| reached >= value)
|
||||
.map(|reached| reached.max(state.observed)),
|
||||
};
|
||||
@@ -309,15 +328,26 @@ impl EventInner {
|
||||
}
|
||||
}
|
||||
|
||||
/// The semaphore's value a host wait confirmed, which a value the host sees that a GPU signal
|
||||
/// raised never passes: a counter read finds the value, and a wait on it with a timeout of 0
|
||||
/// (`complete::reached_by_wait`) confirms it (the completion thread's module doc). A value
|
||||
/// read at or below the highest one confirmed asks for no wait. Where the wait does not
|
||||
/// confirm the value read, `lower` is waited for instead where it lies between the two, and
|
||||
/// otherwise the highest value confirmed stands.
|
||||
/// The Metal value of the signal whose count a host wait confirmed ([`confirm`](Self::confirm)),
|
||||
/// which a value the host sees that a GPU signal raised never passes. `state` is the event's,
|
||||
/// which the caller holds. `lower` is a value the caller waits for: where the count read is
|
||||
/// not confirmed, the count of the first signal that reaches `lower` is waited for in its
|
||||
/// place ([`EventState::count_reaching`]).
|
||||
///
|
||||
/// Err: [`Error::Vulkan`] where the read or a wait fails.
|
||||
pub(crate) fn reached(&self, lower: Option<u64>) -> Result<u64, Error> {
|
||||
pub(crate) fn reached(&self, state: &EventState, lower: Option<u64>) -> Result<u64, Error> {
|
||||
let lower = lower.and_then(|value| state.count_reaching(value));
|
||||
Ok(state.value_of(self.confirm(lower)?))
|
||||
}
|
||||
|
||||
/// The semaphore's count a host wait confirmed: a counter read finds the count, and a wait on
|
||||
/// it with a timeout of 0 (`complete::reached_by_wait`) confirms it (the completion thread's
|
||||
/// module doc). A count read at or below the highest one confirmed asks for no wait. Where the
|
||||
/// wait does not confirm the count read, `lower` is waited for instead where it lies between
|
||||
/// the two, and otherwise the highest count confirmed stands.
|
||||
///
|
||||
/// Err: [`Error::Vulkan`] where the read or a wait fails.
|
||||
fn confirm(&self, lower: Option<u64>) -> Result<u64, Error> {
|
||||
let confirmed = self.confirmed.load(Ordering::Acquire);
|
||||
let read = self.counter()?;
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
@@ -328,18 +358,18 @@ impl EventInner {
|
||||
return Ok(confirmed);
|
||||
}
|
||||
let lower = lower.filter(|&lower| confirmed < lower && lower < read);
|
||||
for value in std::iter::once(read).chain(lower) {
|
||||
for count in std::iter::once(read).chain(lower) {
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
self.core
|
||||
.counters
|
||||
.event_read(crate::counters::event_step::WAIT);
|
||||
let by = crate::complete::reached_by_wait(&self.core.device, self.semaphore, value)
|
||||
let by = crate::complete::reached_by_wait(&self.core.device, self.semaphore, count)
|
||||
.map_err(|loss| Error::Vulkan {
|
||||
call: loss.call,
|
||||
result: loss.result,
|
||||
})?;
|
||||
if by {
|
||||
return Ok(self.confirmed.fetch_max(value, Ordering::AcqRel).max(value));
|
||||
return Ok(self.confirmed.fetch_max(count, Ordering::AcqRel).max(count));
|
||||
}
|
||||
}
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
@@ -353,24 +383,39 @@ impl EventInner {
|
||||
Ok(confirmed)
|
||||
}
|
||||
|
||||
/// The semaphore's value now, as a counter read finds it: no host operation is ordered after
|
||||
/// the signal that raised it ([`reached`](Self::reached) is).
|
||||
/// The semaphore's count now, as a counter read finds it: no host operation is ordered after
|
||||
/// the signal that raised it ([`confirm`](Self::confirm) is).
|
||||
fn counter(&self) -> Result<u64, Error> {
|
||||
// SAFETY: the semaphore is a timeline semaphore of the device, live while `self` is.
|
||||
unsafe { self.core.device.get_semaphore_counter_value(self.semaphore) }
|
||||
.map_err(Error::vulkan("vkGetSemaphoreCounterValue"))
|
||||
}
|
||||
|
||||
/// On the completion thread: takes in the semaphore's value (`counter`, where read), wakes the
|
||||
/// host waits it meets, and takes out the listeners the event's value now reaches, with that
|
||||
/// value. Returns whether signals are still pending.
|
||||
pub(crate) fn observe(&self, counter: Option<u64>, fire: &mut Vec<(Listener, u64)>) -> bool {
|
||||
/// On the completion thread: confirms the semaphore's count, waiting for the next pending
|
||||
/// signal's count where the count read is not confirmed ([`confirm`](Self::confirm)), and
|
||||
/// takes it in ([`observe`](Self::observe)): only a count a host wait confirmed is the event's.
|
||||
/// A count read that none confirmed leaves the event watched, and the round's GPU wait blocks
|
||||
/// on its next pending signal. Returns whether signals are still pending.
|
||||
pub(crate) fn take_in(&self, fire: &mut Vec<(Listener, u64)>) -> bool {
|
||||
let next = self.next_pending();
|
||||
self.observe(self.confirm(next).ok(), fire)
|
||||
}
|
||||
|
||||
/// On the completion thread: takes in the semaphore's `count`, where read: the signals it
|
||||
/// reached are seen, and the event's value is the last one's. Wakes the host waits it meets,
|
||||
/// and takes out the listeners the event's value now reaches, with that value. Returns
|
||||
/// whether signals are still pending.
|
||||
pub(crate) fn observe(&self, count: Option<u64>, fire: &mut Vec<(Listener, u64)>) -> bool {
|
||||
let mut state = lock(&self.state);
|
||||
if let Some(counter) = counter.filter(|&counter| counter > state.observed) {
|
||||
state.observed = counter;
|
||||
while state.pending.front().is_some_and(|&value| value <= counter) {
|
||||
if let Some(count) = count.filter(|&count| count > state.observed_count) {
|
||||
while let Some(&(signal, value)) = state.pending.front() {
|
||||
if signal > count {
|
||||
break;
|
||||
}
|
||||
state.observed = value;
|
||||
state.pending.pop_front();
|
||||
}
|
||||
state.observed_count = count;
|
||||
self.changed.notify_all();
|
||||
}
|
||||
let value = state.observed.max(state.floor);
|
||||
@@ -395,9 +440,39 @@ impl EventInner {
|
||||
self.changed.notify_all();
|
||||
}
|
||||
|
||||
/// The value the completion thread waits for next: the lowest pending signal.
|
||||
/// The count the completion thread waits for next: the lowest pending signal's.
|
||||
pub(crate) fn next_pending(&self) -> Option<u64> {
|
||||
lock(&self.state).pending.front().copied()
|
||||
lock(&self.state).pending.front().map(|&(count, _)| count)
|
||||
}
|
||||
}
|
||||
|
||||
impl EventState {
|
||||
/// The Metal value of the signal whose count is `count`: the value of the last signal the
|
||||
/// completion thread saw where `count` is at or below the count it saw (0 before any), else
|
||||
/// the pending signal's of that count. The counts the host confirms never pass the signals
|
||||
/// submitted, so a pending signal has it but after a loss, which forgets them and answers the
|
||||
/// value seen.
|
||||
fn value_of(&self, count: u64) -> u64 {
|
||||
if count <= self.observed_count {
|
||||
return self.observed;
|
||||
}
|
||||
let at = self.pending.partition_point(|&(signal, _)| signal < count);
|
||||
(self.pending.get(at))
|
||||
.filter(|&&(signal, _)| signal == count)
|
||||
.map_or(self.observed, |&(_, value)| value)
|
||||
}
|
||||
|
||||
/// The count of the first signal whose Metal value reaches `value`: the count the completion
|
||||
/// thread saw where its value does, else the first pending signal's that does; `None` where no
|
||||
/// signal submitted reaches it. Both the counts and the values of the pending signals rise.
|
||||
fn count_reaching(&self, value: u64) -> Option<u64> {
|
||||
if self.observed >= value {
|
||||
return Some(self.observed_count);
|
||||
}
|
||||
let at = self
|
||||
.pending
|
||||
.partition_point(|&(_, pending)| pending < value);
|
||||
self.pending.get(at).map(|&(count, _)| count)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
//! buffers export it (`vkGetPhysicalDeviceExternalBufferProperties`), and refused elsewhere.
|
||||
|
||||
use crate::block::Block;
|
||||
use crate::counters::{Metric, Part};
|
||||
use crate::counters::Part;
|
||||
use crate::device::Device;
|
||||
use crate::error::{Error, Limit, Refusal};
|
||||
use crate::floor;
|
||||
use crate::handed::Handed;
|
||||
use crate::memory::{self, Own};
|
||||
use crate::submit::Held;
|
||||
use ash::vk;
|
||||
use std::ffi::CStr;
|
||||
use std::sync::Arc;
|
||||
@@ -208,13 +208,23 @@ impl Device {
|
||||
/// it, which counts in
|
||||
/// [`Metrics::exported_blocks_addressed`](crate::Metrics::exported_blocks_addressed).
|
||||
///
|
||||
/// The call makes no submission and waits for nothing. The block is the runtime's until its
|
||||
/// making, the release of its buffer to the other API's queue family in one barrier, at the
|
||||
/// head of the runtime's submission that carries the next commit, ahead of every command
|
||||
/// buffer committed after the make. The other API's first access waits for that submission
|
||||
/// ([`Block::wait_until_ready`]), which has it go at once where none has. From then the other
|
||||
/// API owns the block between the runtime's submissions: each `vkQueueSubmit2` that uses it
|
||||
/// acquires it at its head and releases it at its end
|
||||
/// ([`Block::external_writes_done`]).
|
||||
///
|
||||
/// Err: [`Limit::NoExport`] where the device does not export the handle;
|
||||
/// [`Limit::ExportType`] for a dma-buf on a device without the foreign queue family, or where
|
||||
/// the buffer's memory requirements do not list the Private type;
|
||||
/// [`Limit::BlockLen`] past the device's longest allocation or
|
||||
/// buffer; [`Limit::MemoryAllocations`];
|
||||
/// [`Limit::BlockIds`]; [`Error::Vulkan`] where the buffer, the
|
||||
/// allocation, its binding or the handle fails; [`Error::Quiesced`].
|
||||
/// allocation, its binding, the handle or the upload's command buffer fails;
|
||||
/// [`Error::Quiesced`].
|
||||
pub fn new_exported_block(
|
||||
&self,
|
||||
handle: ExportHandle,
|
||||
@@ -240,6 +250,10 @@ impl Device {
|
||||
let raw = memory.device_memory();
|
||||
let claiming = crate::host_time();
|
||||
let block = Block::claim(core, info, memory::Block::new(memory, Arc::clone(core)));
|
||||
// Its buffer goes to the other API in the next commit's submission, which the make does
|
||||
// not wait for: the consumer waits for it on its own thread (`Block::wait_until_ready`).
|
||||
let (_, made) = block.held()?;
|
||||
block.set_ready(core.work.create(core, &[Handed::Block(made)])?);
|
||||
let exporting = crate::host_time();
|
||||
(core.counters).timed(Part::ExportClaim, size, exporting - claiming, false);
|
||||
// A failure here gives the block back with its memory as `block` drops.
|
||||
@@ -257,66 +271,65 @@ impl Device {
|
||||
}
|
||||
|
||||
impl Block {
|
||||
/// No Metal counterpart: the other API's accesses of this exported block
|
||||
/// ([`Device::new_exported_block`]) are done, and the runtime's commands may now read and
|
||||
/// write it. The consumer calls it once the other API's work that accessed the block (work
|
||||
/// that wrote it, or that read it after a release) has completed (its own wait on the
|
||||
/// decoder, for one), and before it commits the command buffers that use the block.
|
||||
/// No Metal counterpart: the other API's writes into this exported block
|
||||
/// ([`Device::new_exported_block`]) are done, and the runtime's commands may now read them.
|
||||
/// The consumer calls it once the other API's work that wrote the block has completed (its
|
||||
/// own wait on the decoder, for one), and before it commits the command buffers that read
|
||||
/// what it wrote.
|
||||
///
|
||||
/// The call records the block's acquire from the other API's queue family: the whole
|
||||
/// block, from `VK_QUEUE_FAMILY_EXTERNAL` for an opaque handle, or from
|
||||
/// `VK_QUEUE_FAMILY_FOREIGN_EXT` for a dma-buf, to the runtime's, made visible to every
|
||||
/// later command. It goes in the upload, as [`Device::zero_block_range`]'s fill does:
|
||||
/// submitted ahead of every command buffer committed after this call, holding the block until
|
||||
/// it completes. The call never waits for the GPU. One call is one buffer barrier,
|
||||
/// counted in [`Metrics::external_acquires`](crate::Metrics::external_acquires).
|
||||
///
|
||||
/// The contract has three parts: between this call and the other API's next write, the other
|
||||
/// API does not access the block, unless a release
|
||||
/// ([`release_to_external`](crate::BlitCommandEncoder::release_to_external)) comes between,
|
||||
/// from whose completion it may read the whole block, the runtime's writes and its own
|
||||
/// earlier ones; when it writes again, it reads nothing of the block but what it has itself
|
||||
/// written since and what a release since handed it; and after each acquire, a byte the other
|
||||
/// API has not written since the previous acquire is undefined to the runtime, unless a
|
||||
/// release came between the two: a release and the acquire after it transfer ownership, and
|
||||
/// Vulkan leaves contents undefined only where "no ownership transfer is defined", so the
|
||||
/// bytes the other API did not write keep what the release handed it. The acquire is not
|
||||
/// followed by a release of its own: without one, Vulkan leaves the block's contents undefined
|
||||
/// to the other API's reads ("the contents of that resource are undefined for any read
|
||||
/// accesses performed by the second queue family").
|
||||
/// The call records nothing and waits for nothing: each `vkQueueSubmit2` that uses the block
|
||||
/// acquires it from the other API's queue family at its head and releases it to that family
|
||||
/// at its end ([`Metrics::external_acquires`](crate::Metrics::external_acquires),
|
||||
/// [`Metrics::external_releases`](crate::Metrics::external_releases)), whether the call
|
||||
/// comes before or after the commit. It marks what the other API wrote on the host side
|
||||
/// alone: each texture over a buffer in the block in an image of its own
|
||||
/// ([`Buffer::new_texture`](crate::Buffer::new_texture)) takes the block's bytes again
|
||||
/// before its next use.
|
||||
///
|
||||
/// Err: [`Refusal::NotExported`] for a block that is not exported;
|
||||
/// [`Refusal::InScheduledHandler`] in a scheduled handler; [`Error::Quiesced`]; and
|
||||
/// [`Error::Vulkan`] where the upload's command buffer cannot be made.
|
||||
/// [`Refusal::InScheduledHandler`] in a scheduled handler; [`Error::Quiesced`].
|
||||
pub fn external_writes_done(&self) -> Result<(), Error> {
|
||||
crate::command::not_in_scheduled_handler()?;
|
||||
let (core, block) = self.held()?;
|
||||
let Some(Own::Export { handle, .. }) = block.memory.own else {
|
||||
if !matches!(block.memory.own, Some(Own::Export { .. })) {
|
||||
return Err(Error::Refused(Refusal::NotExported { block: self.id }));
|
||||
};
|
||||
let (buffer, _) = block.memory.range(0);
|
||||
let acquire = [vk::BufferMemoryBarrier2::default()
|
||||
.dst_stage_mask(vk::PipelineStageFlags2::ALL_COMMANDS)
|
||||
.dst_access_mask(vk::AccessFlags2::MEMORY_READ | vk::AccessFlags2::MEMORY_WRITE)
|
||||
.src_queue_family_index(handle.family())
|
||||
.dst_queue_family_index(core.family)
|
||||
.buffer(buffer)
|
||||
.offset(0)
|
||||
.size(vk::WHOLE_SIZE)];
|
||||
let held = [Held::Block(Arc::clone(&block))];
|
||||
core.work.upload(&core, None, held, |device, command| {
|
||||
let dependency = vk::DependencyInfo::default().buffer_memory_barriers(&acquire);
|
||||
// SAFETY: the upload's command buffer is recording, under the work lock; the buffer
|
||||
// spans the block's allocation, which the upload holds, and a dma-buf's foreign
|
||||
// family is enabled (`Device::new_exported_block`).
|
||||
unsafe { device.cmd_pipeline_barrier2(command, &dependency) };
|
||||
})?;
|
||||
}
|
||||
// The other API's writes change the bytes of the textures over the block
|
||||
// (`crate::over::ExportedOvers`).
|
||||
core.work
|
||||
.exported_changed(block.memory.id, (0, block.memory.len));
|
||||
core.counters.count(Metric::UploadBarriers);
|
||||
core.counters.count(Metric::ExternalAcquires);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// No Metal counterpart: waits until this exported block ([`Device::new_exported_block`]) is
|
||||
/// the other API's to access, on the calling thread, the consumer's own. Metal has no such
|
||||
/// wait, as it has no exports. The twin of
|
||||
/// [`Surface::wait_until_ready`](crate::Surface::wait_until_ready).
|
||||
///
|
||||
/// The block is the runtime's until its making: the release of its buffer to the other API's
|
||||
/// queue family, which [`Device::new_exported_block`] records for the runtime's first
|
||||
/// submission after the make and does not wait for. The other API's first access of the
|
||||
/// block comes after that submission. The call returns once it has completed, and has it go
|
||||
/// at once where it is not yet made, so it returns with no command buffer committed. The
|
||||
/// runtime's own commands need no such wait: the making goes ahead of every command buffer
|
||||
/// committed after the make. Each call counts in
|
||||
/// [`Metrics::surface_waits`](crate::Metrics::surface_waits), with its time and the
|
||||
/// submissions it waited for.
|
||||
///
|
||||
/// Err: [`Refusal::NotExported`] for a block that is not exported;
|
||||
/// [`Refusal::InScheduledHandler`] in a scheduled handler; [`Error::Quiesced`];
|
||||
/// [`Error::Vulkan`] where the device is lost first or the progress semaphore cannot be read.
|
||||
pub fn wait_until_ready(&self) -> Result<(), Error> {
|
||||
crate::command::not_in_scheduled_handler()?;
|
||||
let (core, _) = self.held()?;
|
||||
let Some(ready) = self.ready() else {
|
||||
return Err(Error::Refused(Refusal::NotExported { block: self.id }));
|
||||
};
|
||||
if core.closed() {
|
||||
return Err(Error::Quiesced);
|
||||
}
|
||||
let (waited, submissions) = core.work.wait_ready(&core, &ready)?;
|
||||
core.counters.surface_wait(waited, submissions);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ pub const TIME_DOMAINS: [vk::TimeDomainKHR; 2] =
|
||||
/// reports them, the shader stencil export, through which a fragment function's `[[stencil]]`
|
||||
/// output is the fragment's stencil reference (`FragStencilRefEXT`), the portability subset, which
|
||||
/// Vulkan requires enabled where a device lists it, with the portability features the floor asks
|
||||
/// of such a device, the vertex attribute divisor's two extensions, for the step-rate feature
|
||||
/// of such a device and those of the others the translator names that it states, the vertex attribute divisor's two extensions, for the step-rate feature
|
||||
/// of their own: the KHR, and the EXT it was promoted from, whose feature and pipeline structures
|
||||
/// are the same and which a device may list alone, the imports' three: host memory by its
|
||||
/// address ([`Device::import_host_memory`](crate::Device::import_host_memory)), and a dma-buf
|
||||
@@ -61,8 +61,10 @@ pub const TIME_DOMAINS: [vk::TimeDomainKHR; 2] =
|
||||
/// report is read once, at its first loss ([`DeviceLoss::fault`](crate::DeviceLoss::fault)),
|
||||
/// `VK_EXT_pipeline_robustness`, with its `pipelineRobustness` feature where the device reports it,
|
||||
/// through which a kernel's pipeline contains its buffer arguments' storage buffers by robust
|
||||
/// buffer access 2, and `VK_KHR_maintenance8` ([`MAINTENANCE8`]), for the
|
||||
/// optional feature of its own.
|
||||
/// buffer access 2, `VK_KHR_maintenance8` ([`MAINTENANCE8`]), for the
|
||||
/// optional feature of its own, and `VK_EXT_sample_locations`, which has no feature, through which
|
||||
/// a render pass rasterizes at the sample positions its descriptor sets, where its properties
|
||||
/// hold them ([`Device::programmable_sample_positions_supported`](crate::Device::programmable_sample_positions_supported)).
|
||||
pub const OPTIONAL_EXTENSIONS: &[&CStr] = &[
|
||||
ash::ext::mesh_shader::NAME,
|
||||
ash::khr::shader_maximal_reconvergence::NAME,
|
||||
@@ -83,6 +85,7 @@ pub const OPTIONAL_EXTENSIONS: &[&CStr] = &[
|
||||
ash::ext::device_fault::NAME,
|
||||
ash::ext::pipeline_robustness::NAME,
|
||||
MAINTENANCE8,
|
||||
ash::ext::sample_locations::NAME,
|
||||
];
|
||||
|
||||
/// `VK_KHR_maintenance8`, which ash 0.38 does not bind: one of [`OPTIONAL_EXTENSIONS`], for its
|
||||
@@ -184,7 +187,8 @@ pub use crate::dgc::DgcFeatures;
|
||||
/// most commands one execution runs, tokens a command takes, bytes into a command a token reads,
|
||||
/// and bytes of a command (`VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT`'s
|
||||
/// `maxIndirectSequenceCount`, `maxIndirectCommandsTokenCount`,
|
||||
/// `maxIndirectCommandsTokenOffset` and `maxIndirectCommandsIndirectStride`).
|
||||
/// `maxIndirectCommandsTokenOffset` and `maxIndirectCommandsIndirectStride`), and whether its
|
||||
/// executions run the tessellation stages (its `supportedIndirectCommandsShaderStages`).
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub struct IndirectCommandLimits {
|
||||
/// `maxIndirectSequenceCount`.
|
||||
@@ -195,6 +199,11 @@ pub struct IndirectCommandLimits {
|
||||
pub token_offset: u32,
|
||||
/// `maxIndirectCommandsIndirectStride`.
|
||||
pub stride: u32,
|
||||
/// `supportedIndirectCommandsShaderStages` holds the tessellation control and evaluation
|
||||
/// stages, which an execution of patch draws of either kind runs: a buffer of them is refused
|
||||
/// without
|
||||
/// (`IndirectCommandsKind::TessellationStages`).
|
||||
pub tessellation_stages: bool,
|
||||
}
|
||||
|
||||
/// The translator's name for an extension device creation enables, where the translator names it.
|
||||
@@ -236,6 +245,8 @@ pub(crate) fn shader_extension(name: &CStr) -> Option<VkExtension> {
|
||||
Some(VkExtension::ExtExternalMemoryHost)
|
||||
} else if name == ash::ext::pipeline_robustness::NAME {
|
||||
Some(VkExtension::ExtPipelineRobustness)
|
||||
} else if name == ash::ext::sample_locations::NAME {
|
||||
Some(VkExtension::ExtSampleLocations)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
@@ -707,6 +718,24 @@ pub(crate) const PORTABILITY: &[Feature] = &[
|
||||
feature!(portability.image_view2_d_on3_d_image => ImageView2DOn3DImage),
|
||||
];
|
||||
|
||||
/// The other portability features the translator names, enabled where a device that lists
|
||||
/// `VK_KHR_portability_subset` states them. The floor asks for none of them: on a device that
|
||||
/// lists the extension and does not state one, the translator takes its form without it. A device
|
||||
/// that does not list the extension offers each by Vulkan's definition.
|
||||
pub(crate) const PORTABILITY_STATED: &[Feature] = &[
|
||||
feature!(portability.constant_alpha_color_blend_factors => ConstantAlphaColorBlendFactors),
|
||||
feature!(
|
||||
portability.vertex_attribute_access_beyond_stride => VertexAttributeAccessBeyondStride
|
||||
),
|
||||
feature!(portability.sampler_mip_lod_bias => SamplerMipLodBias),
|
||||
feature!(
|
||||
portability.shader_sample_rate_interpolation_functions
|
||||
=> ShaderSampleRateInterpolationFunctions
|
||||
),
|
||||
feature!(portability.separate_stencil_mask_ref => SeparateStencilMaskRef),
|
||||
feature!(portability.point_polygons => PointPolygons),
|
||||
];
|
||||
|
||||
/// The features the runtime uses only where the device reports them. Each answer chooses one of
|
||||
/// two forms; no other feature does.
|
||||
pub(crate) const OPTIONAL: &[Feature] = &[
|
||||
@@ -806,11 +835,14 @@ pub(crate) const MESH_STAGES: &[Feature] = &[
|
||||
|
||||
/// The feature of `VK_NV_linear_color_attachment` (one of [`OPTIONAL_EXTENSIONS`]), which Vulkan
|
||||
/// requires of a device that lists it: enabled where the device lists the extension and reports
|
||||
/// it. It adds no form: an exported surface's plane takes one of the surface's two forms by the
|
||||
/// device's queries, and with it a `LINEAR` image whose format renders through
|
||||
/// `VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV` alone holds the plane in place, rendered
|
||||
/// only as Vulkan's rule for such images allows (`Gap::LinearPlanePass`). The translator does not
|
||||
/// name it.
|
||||
/// it. An exported surface's plane takes one of the surface's two forms by the device's queries,
|
||||
/// and with it a `LINEAR` image whose format renders through
|
||||
/// `VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV` alone holds the plane in place, marked.
|
||||
/// The format query then chooses the second form of a pass over such a plane: Vulkan renders one
|
||||
/// only where every colour attachment of the pass is `LINEAR`, so a pass of such planes alone
|
||||
/// renders it in place, and a pass that mixes it with another attachment renders it through its
|
||||
/// stand-in, an optimal image of the runtime's, with counted copies (`crate::pass::StandIn`). The
|
||||
/// translator does not name it.
|
||||
pub(crate) const LINEAR_ATTACHMENTS: &[Feature] =
|
||||
&[feature!(linear_attachment.linear_color_attachment)];
|
||||
|
||||
@@ -849,6 +881,7 @@ pub(crate) const ENABLED: &[&[Feature]] = &[
|
||||
MESH_STAGES,
|
||||
REQUIRED,
|
||||
PORTABILITY,
|
||||
PORTABILITY_STATED,
|
||||
OPTIONAL,
|
||||
ATTACHMENT_READS,
|
||||
STEP_RATES,
|
||||
@@ -1097,7 +1130,8 @@ pub struct Capabilities {
|
||||
pub attachment_reads: bool,
|
||||
/// The attachment reads hold, and so does the attachment-read feature, with
|
||||
/// [`ATTACHMENT_READ_EXTENSIONS`]: a draw reads an attachment through the attachment feedback
|
||||
/// loop, the feedback layout its image moves to and the flag every render pipeline takes.
|
||||
/// loop, the feedback layout its image moves to and the colour flag the pipelines of a state
|
||||
/// whose functions can read a texture take.
|
||||
pub feedback_loop: bool,
|
||||
/// The features device creation enables: every one the floor requires, each of the optional,
|
||||
/// step-rate, min-LOD, fill-mode, alpha-to-one, quad-control, pixel-interlock, linear-attachment
|
||||
@@ -1451,7 +1485,8 @@ pub(crate) fn decide(device: &Queried) -> Result<Capabilities, BelowFloor> {
|
||||
let Some((queue_family, _)) = family.filter(|_| missing.is_empty()) else {
|
||||
return Err(BelowFloor { missing });
|
||||
};
|
||||
for feature in (OPTIONAL.iter().chain(STEP_RATES))
|
||||
for feature in (OPTIONAL.iter().chain(PORTABILITY_STATED))
|
||||
.chain(STEP_RATES)
|
||||
.chain(MIN_LOD_CLAMPS)
|
||||
.chain(FILL_MODES)
|
||||
.chain(ALPHA_TO_ONE)
|
||||
@@ -1549,7 +1584,7 @@ pub(crate) fn decide(device: &Queried) -> Result<Capabilities, BelowFloor> {
|
||||
/// The indirect commands' limits ([`INDIRECT_COMMANDS`]), their features set in `features`, where
|
||||
/// the device offers them: both extensions and their features, the Vulkan index buffer token's
|
||||
/// input mode, the vertex and fragment stages, and a command of the runtime's largest layout
|
||||
/// (`IndirectDrawLayout`'s stride of 536 bytes, and a token at most that far in).
|
||||
/// (`IndirectDrawLayout`'s stride of 544 bytes, and a token at most that far in).
|
||||
fn indirect_commands(device: &Queried, features: &mut Features) -> Option<IndirectCommandLimits> {
|
||||
let listed = |name: &CStr| (device.extensions.iter()).any(|listed| listed.as_c_str() == name);
|
||||
let reported = &device.features;
|
||||
@@ -1575,6 +1610,7 @@ fn indirect_commands(device: &Queried, features: &mut Features) -> Option<Indire
|
||||
tokens: p.max_indirect_commands_token_count,
|
||||
token_offset: p.max_indirect_commands_token_offset,
|
||||
stride: p.max_indirect_commands_indirect_stride,
|
||||
tessellation_stages: p.supported_shader_stages.contains(crate::dgc::PATCH_STAGES),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1799,7 +1835,7 @@ pub(crate) fn limits(device: &Queried) -> [(&'static str, u32, u32); 17] {
|
||||
limits.timestamp_compute_and_graphics,
|
||||
vk::TRUE,
|
||||
),
|
||||
// Metal's sample positions of 1, 2 and 4 samples are Vulkan's standard locations.
|
||||
// Metal's sample positions of 1, 2, 4 and 8 samples are Vulkan's standard locations.
|
||||
(
|
||||
"standardSampleLocations",
|
||||
limits.standard_sample_locations,
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
//! Memory another API shares with rt, which every `vkQueueSubmit2` part that uses it hands over
|
||||
//! (`crate::submit::parts`): a Direct3D 11 plane's image (`Device::import_d3d11_surface`, on
|
||||
//! Windows), an exported surface's plane in place and its buffer
|
||||
//! ([`Device::new_exported_surface`](crate::Device::new_exported_surface)), and an exported block
|
||||
//! ([`Device::new_exported_block`](crate::Device::new_exported_block)), a copy-form surface's
|
||||
//! among them. Each part acquires every one it uses from the other API's queue family at its head
|
||||
//! and releases it to that family at its end, so the other API owns the memory between rt's
|
||||
//! submissions. Memory rt exported is also released once at its making, after an image's first
|
||||
//! move within the runtime's queue family ([`moves`]), so that each release and acquire of an
|
||||
//! image names the general layout, in a command buffer at the head of the submission that takes
|
||||
//! the make's upload
|
||||
//! ([`Work::create`](crate::submit::Work::create)): every acquire of it has a release before it
|
||||
//! (`VUID-vkQueueSubmit2-commandBuffer-03879`). A Direct3D 11 plane is Direct3D 11's from its
|
||||
//! making, the import's documented case (section 12.10.1, Table 17).
|
||||
//!
|
||||
//! An exported surface in place is one memory that its planes' images and its buffer alias
|
||||
//! ([`Aliases`]): a part that hands one of them over hands over each of them that lives, as
|
||||
//! Vulkan leaves "the contents of any other resource aliasing the transferred memory" undefined
|
||||
//! after a release or an acquire (section 7.7.6).
|
||||
|
||||
use crate::device::lock;
|
||||
use crate::memory::Block;
|
||||
use crate::submit::Held;
|
||||
use crate::texture::Image;
|
||||
use ash::vk;
|
||||
use std::sync::{Arc, Mutex, Weak};
|
||||
|
||||
/// Which of a resource's hand-overs a barrier records.
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) enum Hand {
|
||||
/// Its making: its release to the other API's queue family, after an image's first move out
|
||||
/// of the undefined layout ([`moves`]).
|
||||
Make,
|
||||
/// Its acquire from the other API's queue family at a part's head.
|
||||
Acquire,
|
||||
/// Its release to the other API's queue family at a part's end.
|
||||
Release,
|
||||
}
|
||||
|
||||
/// One resource in memory another API shares, as a part hands it over.
|
||||
#[derive(Clone)]
|
||||
pub(crate) enum Handed {
|
||||
/// A plane's image: a Direct3D 11 texture's, or an exported surface's in place.
|
||||
Image(Arc<Image>),
|
||||
/// An exported block, or an exported surface's buffer, whose one buffer spans it.
|
||||
Block(Arc<Block>),
|
||||
}
|
||||
|
||||
/// A [`Handed`] an upload owes its making's release to, not held: one gone before the upload's
|
||||
/// submission owes nothing.
|
||||
pub(crate) enum Owed {
|
||||
Image(Weak<Image>),
|
||||
Block(Weak<Block>),
|
||||
}
|
||||
|
||||
impl Owed {
|
||||
/// Whether the resource still lives.
|
||||
pub(crate) fn lives(&self) -> bool {
|
||||
match self {
|
||||
Owed::Image(image) => image.strong_count() > 0,
|
||||
Owed::Block(block) => block.strong_count() > 0,
|
||||
}
|
||||
}
|
||||
|
||||
/// The resource, where it still lives.
|
||||
pub(crate) fn upgrade(&self) -> Option<Handed> {
|
||||
match self {
|
||||
Owed::Image(image) => image.upgrade().map(Handed::Image),
|
||||
Owed::Block(block) => block.upgrade().map(Handed::Block),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The resources that alias one exported surface's memory in place: its planes' images, from
|
||||
/// the surface's make, and its buffer, from the buffer's ([`Surface::buffer`](crate::Surface::buffer)).
|
||||
/// Each member holds the set; the set holds no member, so one gone is handed over no more.
|
||||
#[derive(Default)]
|
||||
pub(crate) struct Aliases {
|
||||
members: Mutex<Vec<Owed>>,
|
||||
}
|
||||
|
||||
impl Aliases {
|
||||
/// Adds `member`, which lies in the surface's memory, dropping the members gone.
|
||||
pub(crate) fn join(&self, member: &Handed) {
|
||||
let mut members = lock(&self.members);
|
||||
members.retain(Owed::lives);
|
||||
members.push(member.owed());
|
||||
}
|
||||
|
||||
/// The members that live.
|
||||
fn living(&self) -> Vec<Handed> {
|
||||
(lock(&self.members).iter())
|
||||
.filter_map(Owed::upgrade)
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
impl Handed {
|
||||
/// Whether `self` and `other` are the same resource.
|
||||
fn is(&self, other: &Handed) -> bool {
|
||||
match (self, other) {
|
||||
(Handed::Image(a), Handed::Image(b)) => Arc::ptr_eq(a, b),
|
||||
(Handed::Block(a), Handed::Block(b)) => Arc::ptr_eq(a, b),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds it to `list` where it is not there yet, with each living resource that aliases its
|
||||
/// memory ([`Aliases`]) not there yet.
|
||||
pub(crate) fn keep(&self, list: &mut Vec<Handed>) {
|
||||
self.keep_alone(list);
|
||||
if let Some(aliases) = self.aliases() {
|
||||
for member in aliases.living() {
|
||||
member.keep_alone(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds it alone to `list` where it is not there yet.
|
||||
fn keep_alone(&self, list: &mut Vec<Handed>) {
|
||||
if !list.iter().any(|kept| kept.is(self)) {
|
||||
list.push(self.clone());
|
||||
}
|
||||
}
|
||||
|
||||
/// The resources that alias its memory: an exported surface's in place.
|
||||
fn aliases(&self) -> Option<&Arc<Aliases>> {
|
||||
match self {
|
||||
Handed::Image(image) => image.aliases(),
|
||||
Handed::Block(block) => block.aliases.as_ref(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Not held, for an upload that owes its making's release.
|
||||
pub(crate) fn owed(&self) -> Owed {
|
||||
match self {
|
||||
Handed::Image(image) => Owed::Image(Arc::downgrade(image)),
|
||||
Handed::Block(block) => Owed::Block(Arc::downgrade(block)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether it is a Direct3D 11 plane's image (`Metrics::d3d11_plane_submissions`).
|
||||
pub(crate) fn d3d11(&self) -> bool {
|
||||
matches!(self, Handed::Image(image) if image.d3d11_plane())
|
||||
}
|
||||
|
||||
/// It, as a command buffer of the runtime's holds it until it retires.
|
||||
pub(crate) fn held(&self) -> Held {
|
||||
match self {
|
||||
Handed::Image(image) => Held::Texture(Arc::clone(image)),
|
||||
Handed::Block(block) => Held::Block(Arc::clone(block)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A block's hand-over between the other API's queue family `other` and the runtime's `family`:
|
||||
/// the whole of its buffer, acquired (`acquire`) and made visible to every later command, or
|
||||
/// released after every earlier command's writes.
|
||||
fn block_barrier(
|
||||
block: &Block,
|
||||
other: u32,
|
||||
family: u32,
|
||||
acquire: bool,
|
||||
) -> vk::BufferMemoryBarrier2<'static> {
|
||||
let (buffer, _) = block.memory.range(0);
|
||||
let barrier = vk::BufferMemoryBarrier2::default()
|
||||
.buffer(buffer)
|
||||
.offset(0)
|
||||
.size(vk::WHOLE_SIZE);
|
||||
let all = vk::PipelineStageFlags2::ALL_COMMANDS;
|
||||
match acquire {
|
||||
true => (barrier.src_queue_family_index(other))
|
||||
.dst_queue_family_index(family)
|
||||
.dst_stage_mask(all)
|
||||
.dst_access_mask(vk::AccessFlags2::MEMORY_READ | vk::AccessFlags2::MEMORY_WRITE),
|
||||
false => (barrier.src_queue_family_index(family))
|
||||
.dst_queue_family_index(other)
|
||||
.src_stage_mask(all)
|
||||
.src_access_mask(vk::AccessFlags2::MEMORY_WRITE),
|
||||
}
|
||||
}
|
||||
|
||||
/// The moves of `handed`'s images that their making still owes, out of the undefined layout they
|
||||
/// are made in into the general one ([`Image::making_move`]), recorded ahead of the making's
|
||||
/// releases.
|
||||
pub(crate) fn moves(handed: &[Handed]) -> Vec<vk::ImageMemoryBarrier2<'static>> {
|
||||
(handed.iter())
|
||||
.filter_map(|item| match item {
|
||||
Handed::Image(image) => image.making_move(),
|
||||
Handed::Block(_) => None,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// The barriers of `handed`'s hand-over `hand` to or from the runtime's queue family `family`:
|
||||
/// its images' and its blocks'. A making is a release, after its images' moves ([`moves`]).
|
||||
pub(crate) fn barriers(
|
||||
handed: &[Handed],
|
||||
family: u32,
|
||||
hand: Hand,
|
||||
) -> (
|
||||
Vec<vk::ImageMemoryBarrier2<'static>>,
|
||||
Vec<vk::BufferMemoryBarrier2<'static>>,
|
||||
) {
|
||||
let mut images = Vec::new();
|
||||
let mut buffers = Vec::new();
|
||||
for item in handed {
|
||||
match item {
|
||||
Handed::Image(image) => images.push(image.handed(family, hand == Hand::Acquire)),
|
||||
Handed::Block(block) => {
|
||||
if let Some(other) = block.memory.handed_family() {
|
||||
let acquire = hand == Hand::Acquire;
|
||||
buffers.push(block_barrier(block, other, family, acquire));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
(images, buffers)
|
||||
}
|
||||
@@ -65,6 +65,9 @@ pub(crate) struct Hazards {
|
||||
wrote: bool,
|
||||
/// Since the last barrier: something was read or written.
|
||||
touched: bool,
|
||||
/// Since the last barrier: something was read through an address outside every resource,
|
||||
/// which may have been any resource a later write reaches.
|
||||
read_wild: bool,
|
||||
}
|
||||
|
||||
impl Default for Hazards {
|
||||
@@ -75,6 +78,7 @@ impl Default for Hazards {
|
||||
generation: 1,
|
||||
wrote: false,
|
||||
touched: false,
|
||||
read_wild: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,9 +118,11 @@ impl Hazards {
|
||||
self.touched = true;
|
||||
}
|
||||
|
||||
/// A read through an address outside every resource: nothing to mark, but it was touched.
|
||||
/// A read through an address outside every resource: no resource to mark, but it was touched,
|
||||
/// and any later write may be of what it read.
|
||||
pub(crate) fn mark_wild_read(&mut self) {
|
||||
self.touched = true;
|
||||
self.read_wild = true;
|
||||
}
|
||||
|
||||
/// Whether anything was written since the last barrier.
|
||||
@@ -129,6 +135,18 @@ impl Hazards {
|
||||
self.touched
|
||||
}
|
||||
|
||||
/// Whether anything was read through an address outside every resource since the last
|
||||
/// barrier.
|
||||
pub(crate) fn read_wild(&self) -> bool {
|
||||
self.read_wild
|
||||
}
|
||||
|
||||
/// For the device tests: whether the sets hold a table of marks.
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn holds_table(&self) -> bool {
|
||||
self.marks.capacity() + self.own.capacity() > 0
|
||||
}
|
||||
|
||||
/// Starts both sets again, at a barrier.
|
||||
pub(crate) fn clear(&mut self) {
|
||||
if self.generation == u32::MAX {
|
||||
@@ -139,6 +157,7 @@ impl Hazards {
|
||||
self.generation += 1;
|
||||
self.wrote = false;
|
||||
self.touched = false;
|
||||
self.read_wild = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,6 +267,16 @@ impl HeapId {
|
||||
false => linked.fetch_sub(1, Relaxed),
|
||||
};
|
||||
}
|
||||
|
||||
/// A texture of the heap was placed unmoved (`gained`), or moved or was released unmoved
|
||||
/// (`crate::alias`).
|
||||
pub(crate) fn unmoved(&self, gained: bool) {
|
||||
let unmoved = &self.core.heap_ids.unmoved;
|
||||
match gained {
|
||||
true => unmoved.fetch_add(1, Relaxed),
|
||||
false => unmoved.fetch_sub(1, Relaxed),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for HeapId {
|
||||
@@ -266,6 +295,9 @@ pub(crate) struct HeapIds {
|
||||
/// The device's heap placements that take part (`crate::alias`): while none does, a command's
|
||||
/// uses look at no placement.
|
||||
linked: AtomicUsize,
|
||||
/// The device's unmoved heap textures (`crate::alias`): while none is, a `useHeap:` looks at no
|
||||
/// heap.
|
||||
unmoved: AtomicUsize,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
@@ -283,6 +315,20 @@ impl HeapIds {
|
||||
self.linked.load(Relaxed) != 0
|
||||
}
|
||||
|
||||
/// Whether a heap texture of the device is unmoved.
|
||||
pub(crate) fn any_unmoved(&self) -> bool {
|
||||
self.unmoved.load(Relaxed) != 0
|
||||
}
|
||||
|
||||
/// The live heaps in `block`.
|
||||
pub(crate) fn heaps_in(&self, block: BlockId) -> Vec<Arc<HeapId>> {
|
||||
let state = crate::device::lock(&self.state);
|
||||
(state.heaps.iter())
|
||||
.filter(|((of, _), _)| *of == block)
|
||||
.filter_map(|(_, id)| id.upgrade())
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// The id of the heap at `offset` in `block`, a new one where no resource of it lives.
|
||||
pub(crate) fn of(&self, core: &Arc<Core>, block: BlockId, offset: u64) -> Arc<HeapId> {
|
||||
let mut state = crate::device::lock(&self.state);
|
||||
|
||||
@@ -6,10 +6,15 @@
|
||||
//! handle's query, and each a block the consumer places buffers in as it places them in a block
|
||||
//! it took.
|
||||
//!
|
||||
//! The two rules differ. A dma-buf is imported only into the first type its fd's query offers,
|
||||
//! and only where that type is host-visible and host-coherent: on NVIDIA's Linux driver
|
||||
//! (620.70.06) one failed dma-buf import into a later type broke every later allocation of that
|
||||
//! type, the Shared type among them, so the rule attempts nothing it is not sure of. And it is
|
||||
//! The two rules differ. A dma-buf's rule reads the first type its fd's query offers as the
|
||||
//! driver's word for where such an import lives: a mappable, coherent view of the memory, which it
|
||||
//! takes where the buffer lists it and it is host-visible and host-coherent; or the device's own
|
||||
//! memory, where it is device-local, and then the rule takes the first type offered that the
|
||||
//! buffer lists and that is device-local, host-visible and host-coherent, in that first type's own
|
||||
//! heap. Anything else is refused. It makes one choice from the query and one import, and never
|
||||
//! tries a type after another: on NVIDIA's Linux driver (620.70.06) one failed dma-buf import into
|
||||
//! a later type broke every later allocation of that type, the Shared type among them, so the rule
|
||||
//! attempts nothing it is not sure of. And it is
|
||||
//! imported only on a device whose Shared type is host-coherent (one that holds no
|
||||
//! `crate::coherence::Coherence`), and refused elsewhere ([`Limit::ImportCoherence`]). The
|
||||
//! consumer writes the pages through its own cached mapping, which no Vulkan flush reaches; a
|
||||
@@ -81,6 +86,47 @@ pub(crate) struct Imports {
|
||||
pub(crate) sparse: Option<Sparse>,
|
||||
/// The host-visible and host-coherent memory types, one bit each.
|
||||
pub(crate) coherent: u32,
|
||||
/// What the dma-buf rule reads of the device's memory types ([`dma_buf_type`]).
|
||||
#[cfg(unix)]
|
||||
pub(crate) dma_buf_types: DmaBufTypes,
|
||||
}
|
||||
|
||||
/// What the dma-buf rule reads of the device's memory types ([`dma_buf_type`]).
|
||||
#[cfg(unix)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub(crate) struct DmaBufTypes {
|
||||
/// The host-visible and host-coherent types, one bit each.
|
||||
pub(crate) coherent: u32,
|
||||
/// The device-local types, one bit each.
|
||||
pub(crate) device_local: u32,
|
||||
/// For each type, the types of its heap, one bit each; 0 past the device's types.
|
||||
pub(crate) heaps: [u32; vk::MAX_MEMORY_TYPES],
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
impl DmaBufTypes {
|
||||
/// Of the device's memory `types`.
|
||||
pub(crate) fn of(types: &[vk::MemoryType]) -> DmaBufTypes {
|
||||
let with = |flags: vk::MemoryPropertyFlags| {
|
||||
(0u32..)
|
||||
.zip(types)
|
||||
.filter(|(_, kind)| kind.property_flags.contains(flags))
|
||||
.fold(0, |bits, (index, _)| bits | 1 << index)
|
||||
};
|
||||
let heaps = std::array::from_fn(|index| {
|
||||
types.get(index).map_or(0, |kind| {
|
||||
(0u32..)
|
||||
.zip(types)
|
||||
.filter(|(_, other)| other.heap_index == kind.heap_index)
|
||||
.fold(0, |bits, (other, _)| bits | 1 << other)
|
||||
})
|
||||
});
|
||||
DmaBufTypes {
|
||||
coherent: with(COHERENT),
|
||||
device_local: with(vk::MemoryPropertyFlags::DEVICE_LOCAL),
|
||||
heaps,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Imports {
|
||||
@@ -136,6 +182,8 @@ impl Imports {
|
||||
.zip(memory.memory_types_as_slice())
|
||||
.filter(|(_, kind)| kind.property_flags.contains(COHERENT))
|
||||
.fold(0, |bits, (index, _)| bits | 1 << index);
|
||||
#[cfg(unix)]
|
||||
let dma_buf_types = DmaBufTypes::of(memory.memory_types_as_slice());
|
||||
Imports {
|
||||
host,
|
||||
#[cfg(unix)]
|
||||
@@ -143,6 +191,8 @@ impl Imports {
|
||||
#[cfg(unix)]
|
||||
sparse: None,
|
||||
coherent,
|
||||
#[cfg(unix)]
|
||||
dma_buf_types,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +406,13 @@ impl Sparse {
|
||||
/// Waits on the host until the bind that signals `value` completed: before its buffer is
|
||||
/// destroyed (`VUID-vkDestroyBuffer-buffer-00922`). At once where a submission waited for it
|
||||
/// and retired, as each that used the buffer did; a lost device ends the wait.
|
||||
pub(crate) fn wait(&self, device: &ash::Device, value: u64) {
|
||||
///
|
||||
/// `vkWaitSemaphores` fails with `VK_ERROR_DEVICE_LOST`, after which nothing is pending, or for
|
||||
/// want of memory or with `VK_ERROR_UNKNOWN`, which say nothing of the bind: the wait is then
|
||||
/// made again (`complete::wait_through`) until it succeeds or the device is lost. A lasting
|
||||
/// out-of-memory result on a live device so waits, and no buffer whose bind may still be
|
||||
/// pending is destroyed.
|
||||
pub(crate) fn wait(&self, core: &Core, value: u64) {
|
||||
let Some(&timeline) = self.timeline.get() else {
|
||||
return;
|
||||
};
|
||||
@@ -365,9 +421,10 @@ impl Sparse {
|
||||
let info = vk::SemaphoreWaitInfo::default()
|
||||
.semaphores(&semaphores)
|
||||
.values(&values);
|
||||
// SAFETY: the timeline is live, and the bind that signals `value` was submitted. A lost
|
||||
// device fails the wait, and then nothing is pending.
|
||||
let _ = unsafe { device.wait_semaphores(&info, u64::MAX) };
|
||||
// SAFETY: the timeline is live, and the bind that signals `value` was submitted.
|
||||
crate::complete::wait_through(core, || unsafe {
|
||||
core.device.wait_semaphores(&info, u64::MAX)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -422,30 +479,46 @@ const COHERENT: vk::MemoryPropertyFlags = vk::MemoryPropertyFlags::from_raw(
|
||||
| vk::MemoryPropertyFlags::HOST_COHERENT.as_raw(),
|
||||
);
|
||||
|
||||
/// The dma-buf rule, for an import of `handle`: on a device whose Shared type is host-coherent
|
||||
/// (`shared_coherent`: the device holds no `crate::coherence::Coherence`), the first type the
|
||||
/// fd's query `offered`, where the buffer's requirements `listed` it and it is one of the
|
||||
/// `coherent` types. Err: [`Limit::ImportCoherence`] on a device whose Shared type is not, whatever
|
||||
/// is offered; [`Limit::ImportType`] where the first type offered is not taken, whatever else is.
|
||||
/// The dma-buf rule, for an import of `handle`, on a device whose Shared type is host-coherent
|
||||
/// (`shared_coherent`: the device holds no `crate::coherence::Coherence`), over the types the
|
||||
/// fd's query `offered` and the buffer's requirements `listed`. The first type offered is either
|
||||
/// a mappable, coherent view of the memory or the device's own memory: where it is listed,
|
||||
/// host-visible and host-coherent, the rule takes it; where it is device-local, the rule takes the
|
||||
/// first type offered that is listed, device-local, host-visible and host-coherent, in that first
|
||||
/// type's own heap. Anything else is refused. One choice from the query, then one import: no type
|
||||
/// is tried after another, as on NVIDIA's Linux driver (620.70.06) one failed dma-buf import into
|
||||
/// a later type broke every later allocation of that type. Err: [`Limit::ImportCoherence`] on a
|
||||
/// device whose Shared type is not host-coherent, whatever is offered; [`Limit::ImportType`] where
|
||||
/// the rule takes no type.
|
||||
#[cfg(unix)]
|
||||
pub(crate) fn dma_buf_type(
|
||||
handle: ImportHandle,
|
||||
shared_coherent: bool,
|
||||
offered: u32,
|
||||
listed: u32,
|
||||
coherent: u32,
|
||||
types: &DmaBufTypes,
|
||||
) -> Result<u32, Limit> {
|
||||
if !shared_coherent {
|
||||
return Err(Limit::ImportCoherence { handle });
|
||||
}
|
||||
let refused = Limit::ImportType {
|
||||
handle,
|
||||
offered,
|
||||
listed,
|
||||
};
|
||||
let first = offered.trailing_zeros();
|
||||
(first < u32::BITS && (listed & coherent) & (1 << first) != 0)
|
||||
.then_some(first)
|
||||
.ok_or(Limit::ImportType {
|
||||
handle,
|
||||
offered,
|
||||
listed,
|
||||
})
|
||||
let Some(&heap) = types.heaps.get(first as usize) else {
|
||||
return Err(refused);
|
||||
};
|
||||
let lead = 1 << first;
|
||||
if listed & types.coherent & lead != 0 {
|
||||
return Ok(first);
|
||||
}
|
||||
if types.device_local & lead == 0 {
|
||||
return Err(refused);
|
||||
}
|
||||
let taken = offered & listed & types.coherent & types.device_local & heap;
|
||||
(taken != 0).then(|| taken.trailing_zeros()).ok_or(refused)
|
||||
}
|
||||
|
||||
/// The host-memory rule: the first type the pointer's query `offered` that the buffer's
|
||||
@@ -462,11 +535,13 @@ impl Device {
|
||||
/// the host reaches the bytes through the consumer's own mappings of the pages, so the
|
||||
/// block's `contents` is `None`, and its zero mark is 0.
|
||||
///
|
||||
/// It imports only on a device whose Shared memory type is host-coherent, only into the first
|
||||
/// memory type the fd's query (`vkGetMemoryFdPropertiesKHR`) offers, and only where that type
|
||||
/// is host-visible and host-coherent and the buffer's memory requirements list it, and returns
|
||||
/// the block with the index of that type. Every refusal comes before any allocation is
|
||||
/// attempted, with nothing imported.
|
||||
/// It imports only on a device whose Shared memory type is host-coherent, into the type the
|
||||
/// dma-buf rule takes from the fd's query (`vkGetMemoryFdPropertiesKHR`) and the buffer's
|
||||
/// memory requirements: the first type offered, where the requirements list it and it is
|
||||
/// host-visible and host-coherent; else, where that first type is device-local, the first
|
||||
/// type offered that the requirements list and that is device-local, host-visible and
|
||||
/// host-coherent, in the first type's heap. It returns the block with the index of that type.
|
||||
/// Every refusal comes before any allocation is attempted, with nothing imported.
|
||||
///
|
||||
/// The call takes `fd`, the consumer's own fd of the dma-buf (a dup of it, where the consumer
|
||||
/// keeps one). After `Ok` the driver owns it. After a refusal (`Limit`, [`Error::Quiesced`])
|
||||
@@ -532,7 +607,7 @@ impl Device {
|
||||
shared_coherent,
|
||||
offered,
|
||||
listed,
|
||||
core.imports.coherent,
|
||||
&core.imports.dma_buf_types,
|
||||
)
|
||||
.map_err(Error::Limit)?;
|
||||
check_size(handle, len, &needs)?;
|
||||
@@ -698,7 +773,7 @@ impl Device {
|
||||
shared_coherent,
|
||||
offered,
|
||||
listed,
|
||||
core.imports.coherent,
|
||||
&core.imports.dma_buf_types,
|
||||
) {
|
||||
Ok(taken) => index = Some(taken),
|
||||
Err(refusal) => {
|
||||
@@ -962,7 +1037,10 @@ pub(crate) fn surface_import(
|
||||
.memory_type_index(index)
|
||||
.push_next(&mut import)
|
||||
.push_next(&mut flags);
|
||||
let own = Own::Surface { import: true };
|
||||
let own = Own::Surface {
|
||||
import: true,
|
||||
family: vk::QUEUE_FAMILY_FOREIGN_EXT,
|
||||
};
|
||||
// SAFETY: an import of the dma-buf into a type its query offered, its buffers list and its
|
||||
// planes' imports took, of at least the buffer's size.
|
||||
match unsafe { memory::import(core, &info, handle.vk(), None, own) } {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
//! Metal's indirect command buffers of indexed draws (`MTLIndirectCommandBuffer`), on
|
||||
//! `VK_EXT_device_generated_commands` ([`crate::dgc`]).
|
||||
//! Metal's indirect command buffers of plain, indexed, patch or indexed patch draws
|
||||
//! (`MTLIndirectCommandBuffer`), on `VK_EXT_device_generated_commands` ([`crate::dgc`]).
|
||||
//!
|
||||
//! A buffer is its records, in a Private block the runtime takes, laid out as `metal2vulkan`'s
|
||||
//! [`IndirectDrawLayout`] names: a header, then one command a stride. A kernel's encoding writes
|
||||
//! them through the buffer's `gpuResourceID`, the header's device address, which the consumer's
|
||||
//! argument encoder writes into the `command_buffer` member; an execution
|
||||
//! ([`RenderCommandEncoder::execute_commands_in_buffer`](crate::RenderCommandEncoder::execute_commands_in_buffer))
|
||||
//! reads them, one `VkIndirectCommandsLayoutEXT` sequence a command.
|
||||
//! reads them, one `VkIndirectCommandsLayoutEXT` sequence a command, through a layout of the
|
||||
//! buffer's kind of draw ([`CommandDraw`]). Every kind takes the same records.
|
||||
//!
|
||||
//! A new buffer's commands, and the commands a reset names
|
||||
//! ([`BlitCommandEncoder::reset_commands_in_buffer`](crate::BlitCommandEncoder::reset_commands_in_buffer)),
|
||||
@@ -32,7 +33,7 @@ use crate::kernel_map::Lru;
|
||||
use crate::memory::{self, Block};
|
||||
use crate::pipeline::{address_word, FieldValue, PUSH_STAGES};
|
||||
use crate::record::{self, Reach};
|
||||
use crate::render::{DrawPlace, Draws, Raster, RenderCompiled, VERTEX};
|
||||
use crate::render::{DrawPlace, Draws, RenderCompiled, VERTEX};
|
||||
use crate::submit::Held;
|
||||
use crate::{Device, MemoryClass};
|
||||
|
||||
@@ -43,7 +44,7 @@ pub(crate) const TEMPLATE_BYTES: u32 = 65536;
|
||||
/// The most command layouts (`VkIndirectCommandsLayoutEXT`) a device keeps, one per shape of
|
||||
/// tokens ([`Tokens`]).
|
||||
pub(crate) const LAYOUTS: usize = 64;
|
||||
/// The most execution shapes (a content, a raster state, a record layout and a command count)
|
||||
/// The most execution shapes (a content's pipeline, a record layout and a command count)
|
||||
/// whose layout and preprocess requirements a device keeps ([`Shape`]).
|
||||
pub(crate) const SHAPES: usize = 256;
|
||||
/// The most preprocess bytes one `vkCmdExecuteGeneratedCommandsEXT` takes, as
|
||||
@@ -84,13 +85,13 @@ pub(crate) const UNCHECKED_BOUNDS: [u8; 8] = {
|
||||
pub struct IndirectCommandType(u64);
|
||||
|
||||
impl IndirectCommandType {
|
||||
/// `MTLIndirectCommandTypeDraw`.
|
||||
/// `MTLIndirectCommandTypeDraw`: built alone.
|
||||
pub const DRAW: IndirectCommandType = IndirectCommandType(1 << 0);
|
||||
/// `MTLIndirectCommandTypeDrawIndexed`: the one kind the runtime builds.
|
||||
/// `MTLIndirectCommandTypeDrawIndexed`: built alone.
|
||||
pub const DRAW_INDEXED: IndirectCommandType = IndirectCommandType(1 << 1);
|
||||
/// `MTLIndirectCommandTypeDrawPatches`.
|
||||
/// `MTLIndirectCommandTypeDrawPatches`: built alone.
|
||||
pub const DRAW_PATCHES: IndirectCommandType = IndirectCommandType(1 << 2);
|
||||
/// `MTLIndirectCommandTypeDrawIndexedPatches`.
|
||||
/// `MTLIndirectCommandTypeDrawIndexedPatches`: built alone.
|
||||
pub const DRAW_INDEXED_PATCHES: IndirectCommandType = IndirectCommandType(1 << 3);
|
||||
/// `MTLIndirectCommandTypeConcurrentDispatch`.
|
||||
pub const CONCURRENT_DISPATCH: IndirectCommandType = IndirectCommandType(1 << 5);
|
||||
@@ -121,11 +122,12 @@ impl std::ops::BitOr for IndirectCommandType {
|
||||
}
|
||||
|
||||
/// `MTLIndirectCommandBufferDescriptor`, of the properties the runtime reads. Built: commands of
|
||||
/// [`IndirectCommandType::DRAW_INDEXED`] alone that inherit the executing encoder's pipeline
|
||||
/// state and bind their own buffers; every other answer is [`Gap::IndirectCommandBuffers`] at
|
||||
/// [`Device::new_indirect_command_buffer`]. The render states the commands draw with are the
|
||||
/// executing encoder's, whatever Metal's `inherit*` properties say, as an M4's commands draw
|
||||
/// with them.
|
||||
/// [`IndirectCommandType::DRAW`] alone, of [`IndirectCommandType::DRAW_INDEXED`] alone, of
|
||||
/// [`IndirectCommandType::DRAW_PATCHES`] alone or of [`IndirectCommandType::DRAW_INDEXED_PATCHES`]
|
||||
/// alone that inherit the executing encoder's pipeline state and bind their own buffers; every other answer is [`Gap::IndirectCommandBuffers`] at
|
||||
/// [`Device::new_indirect_command_buffer`], two draw kinds together included. The render states
|
||||
/// the commands draw with are the executing encoder's,
|
||||
/// whatever Metal's `inherit*` properties say, as an M4's commands draw with them.
|
||||
#[non_exhaustive]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||
pub struct IndirectCommandBufferDescriptor {
|
||||
@@ -153,9 +155,9 @@ impl IndirectCommandBufferDescriptor {
|
||||
}
|
||||
}
|
||||
|
||||
/// `MTLIndirectCommandBuffer`: a buffer of indexed draw commands, the handle of its records.
|
||||
/// Clones are the same buffer. Its records live while a handle, or a command buffer that uses it,
|
||||
/// holds them.
|
||||
/// `MTLIndirectCommandBuffer`: a buffer of plain, indexed, patch or indexed patch draw commands,
|
||||
/// the handle of its records. Clones are the same buffer. Its records live while a handle, or a command buffer that
|
||||
/// uses it, holds them.
|
||||
#[derive(Clone)]
|
||||
pub struct IndirectCommandBuffer {
|
||||
inner: Arc<IcbInner>,
|
||||
@@ -165,9 +167,42 @@ struct IcbInner {
|
||||
core: Arc<Core>,
|
||||
records: Arc<Block>,
|
||||
layout: IndirectDrawLayout,
|
||||
draw: CommandDraw,
|
||||
capacity: u32,
|
||||
}
|
||||
|
||||
/// The kind of draw a buffer's commands make, which picks its command layout's draw token.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub(crate) enum CommandDraw {
|
||||
/// `MTLIndirectCommandTypeDraw`: `VkDrawIndirectCommand`, with no index buffer token.
|
||||
Plain,
|
||||
/// `MTLIndirectCommandTypeDrawIndexed`: the index buffer token, then
|
||||
/// `VkDrawIndexedIndirectCommand`.
|
||||
Indexed,
|
||||
/// `MTLIndirectCommandTypeDrawPatches`: the factors' and the patch indices' addresses pushed,
|
||||
/// then `VkDrawIndirectCommand` of patches, with no index buffer token.
|
||||
Patches,
|
||||
/// `MTLIndirectCommandTypeDrawIndexedPatches`: as [`CommandDraw::Patches`], the control-point
|
||||
/// indices' address pushed too.
|
||||
IndexedPatches,
|
||||
}
|
||||
|
||||
impl CommandDraw {
|
||||
/// The stages an execution of the kind runs, its command layout's
|
||||
/// ([`dgc::STAGES`] or, for patches, [`dgc::PATCH_STAGES`]).
|
||||
pub(crate) fn stages(self) -> vk::ShaderStageFlags {
|
||||
match self.patches() {
|
||||
false => dgc::STAGES,
|
||||
true => dgc::PATCH_STAGES,
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether the kind draws patches: a post-tessellation state's alone.
|
||||
pub(crate) fn patches(self) -> bool {
|
||||
matches!(self, CommandDraw::Patches | CommandDraw::IndexedPatches)
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for IcbInner {
|
||||
fn drop(&mut self) {
|
||||
self.core.counters.fall(Gauge::IndirectCommandBuffers);
|
||||
@@ -201,8 +236,19 @@ impl IndirectCommandBuffer {
|
||||
pub(crate) fn layout(&self) -> IndirectDrawLayout {
|
||||
self.inner.layout
|
||||
}
|
||||
|
||||
/// The kind of draw its commands make.
|
||||
pub(crate) fn draw(&self) -> CommandDraw {
|
||||
self.inner.draw
|
||||
}
|
||||
}
|
||||
|
||||
/// What tells execution shapes apart: the content's id, the pipeline the execution binds (one
|
||||
/// per class and raster state, and the words twin's apart from the plain one's), the record
|
||||
/// layout, the draw the layout's tokens make and the command count. A content's pipelines live as
|
||||
/// long as it does, and its id is never another's.
|
||||
type ShapeKey = (u64, vk::Pipeline, IndirectDrawLayout, CommandDraw, u32);
|
||||
|
||||
/// The device's state for indirect command buffers, where it enabled
|
||||
/// `VK_EXT_device_generated_commands` (`floor::INDIRECT_COMMANDS`).
|
||||
pub(crate) struct Indirect {
|
||||
@@ -210,7 +256,7 @@ pub(crate) struct Indirect {
|
||||
pub(crate) limits: IndirectCommandLimits,
|
||||
templates: Mutex<Lru<IndirectDrawLayout, Arc<Template>>>,
|
||||
layouts: Mutex<Lru<Tokens, Arc<CommandsLayout>>>,
|
||||
shapes: Mutex<Lru<(u64, Raster, IndirectDrawLayout, u32), Shape>>,
|
||||
shapes: Mutex<Lru<ShapeKey, Shape>>,
|
||||
/// The idle regions, the oldest first.
|
||||
regions: Mutex<Vec<Region>>,
|
||||
/// When the last region freed past [`IDLE_BYTES`] went, in nanoseconds of
|
||||
@@ -218,11 +264,12 @@ pub(crate) struct Indirect {
|
||||
evicted_at: AtomicU64,
|
||||
}
|
||||
|
||||
/// The tokens of an execution of a content's commands of one record layout: each slot word the
|
||||
/// content pushes, a token of its own (its offset in a command and its push offset), then the
|
||||
/// index buffer, the sequence index at its push offset, and the indexed draw at the layout's
|
||||
/// offsets; and the push offset of the part's first command, which an execution pushes before
|
||||
/// each part.
|
||||
/// The tokens of an execution of a content's commands of one record layout and kind of draw: each
|
||||
/// slot word the content pushes, and for patch draws the factors' and patch indices' addresses
|
||||
/// (and an indexed patch draw's control-point indices'), a token of its own (its offset in a command and its push
|
||||
/// offset), then, for indexed draws, the index buffer, then the sequence index at its push offset,
|
||||
/// and the draw at the layout's offsets; and the push offset of the part's first command, which an
|
||||
/// execution pushes before each part.
|
||||
///
|
||||
/// A token of one 8-byte word each, never one token for a run of words: on NVIDIA's driver
|
||||
/// (620.70.06, an RTX 2080) a 24-byte push constant token of an execution of more than 64
|
||||
@@ -231,6 +278,7 @@ pub(crate) struct Indirect {
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct Tokens {
|
||||
pub(crate) layout: IndirectDrawLayout,
|
||||
pub(crate) draw: CommandDraw,
|
||||
pub(crate) pushes: Vec<(u32, u32)>,
|
||||
pub(crate) sequence: u32,
|
||||
pub(crate) base: u32,
|
||||
@@ -239,7 +287,11 @@ pub(crate) struct Tokens {
|
||||
impl Tokens {
|
||||
/// The tokens a command takes.
|
||||
pub(crate) fn count(&self) -> u32 {
|
||||
self.pushes.len() as u32 + 3
|
||||
let index = match self.draw {
|
||||
CommandDraw::Plain | CommandDraw::Patches | CommandDraw::IndexedPatches => 0,
|
||||
CommandDraw::Indexed => 1,
|
||||
};
|
||||
self.pushes.len() as u32 + index + 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,11 +425,12 @@ impl Indirect {
|
||||
}
|
||||
}
|
||||
|
||||
/// The shape of an execution of at most `capacity` commands of `layout` with `compiled`'s
|
||||
/// `pipeline`, made under `raster`: the device's, or one made now, its layout the device's for
|
||||
/// its tokens ([`tokens`]) or one made now, and its part and a part's preprocess requirements
|
||||
/// The shape of an execution of at most `capacity` commands of `layout` drawing `draw` with
|
||||
/// `compiled`'s `pipeline`: the device's, or one made now, its layout the device's for its
|
||||
/// tokens ([`tokens`]) or one made now, and its part and a part's preprocess requirements
|
||||
/// queried with the pipeline ([`part`](Self::part)), which an execution with another of the
|
||||
/// content's pipelines does not reuse.
|
||||
/// content's pipelines (another raster state's, or the words twin's) does not reuse
|
||||
/// (`VUID-VkGeneratedCommandsInfoEXT-preprocessSize-11071`).
|
||||
///
|
||||
/// Err: [`Gap::IndirectCommandBuffers`] where [`tokens`] answers a kind, and of
|
||||
/// [`IndirectCommandsKind::Tokens`] for more tokens than the device takes; [`Error::Vulkan`]
|
||||
@@ -385,16 +438,16 @@ impl Indirect {
|
||||
pub(crate) fn shape(
|
||||
&self,
|
||||
core: &Core,
|
||||
(compiled, raster, pipeline): (&RenderCompiled, Raster, vk::Pipeline),
|
||||
layout: IndirectDrawLayout,
|
||||
(compiled, pipeline): (&RenderCompiled, vk::Pipeline),
|
||||
(layout, draw): (IndirectDrawLayout, CommandDraw),
|
||||
capacity: u32,
|
||||
) -> Result<Shape, Error> {
|
||||
let key = (compiled.id, raster, layout, capacity);
|
||||
let key = (compiled.id, pipeline, layout, draw, capacity);
|
||||
if let Some(shape) = lock(&self.shapes).get(&key) {
|
||||
return Ok(shape);
|
||||
}
|
||||
let refuse = |kind| Error::Unsupported(Gap::IndirectCommandBuffers { kind });
|
||||
let tokens = tokens(&compiled.draws, layout).map_err(refuse)?;
|
||||
let tokens = tokens(&compiled.draws, layout, draw).map_err(refuse)?;
|
||||
if tokens.count() > self.limits.tokens {
|
||||
return Err(refuse(IndirectCommandsKind::Tokens));
|
||||
}
|
||||
@@ -466,8 +519,8 @@ impl Indirect {
|
||||
}
|
||||
|
||||
/// The command layout of `tokens`: the device's, or one made now, through the device's
|
||||
/// pipeline layout, for vertex and fragment stages, its push tokens' ranges of
|
||||
/// [`PUSH_STAGES`], the layout's one push range's stages.
|
||||
/// pipeline layout, for the stages its kind of draw runs ([`CommandDraw::stages`]), its push
|
||||
/// tokens' ranges of [`PUSH_STAGES`], the layout's one push range's stages.
|
||||
pub(crate) fn layout(
|
||||
&self,
|
||||
core: &Core,
|
||||
@@ -500,22 +553,33 @@ impl Indirect {
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
list.push(dgc::LayoutToken::new(
|
||||
dgc::TOKEN_INDEX_BUFFER,
|
||||
std::ptr::from_ref(&index).cast(),
|
||||
records.index(),
|
||||
));
|
||||
// A layout whose draw is not indexed holds no index buffer token
|
||||
// (`VUID-VkIndirectCommandsLayoutCreateInfoEXT-pTokens-11095`).
|
||||
let draw = match tokens.draw {
|
||||
CommandDraw::Plain | CommandDraw::Patches | CommandDraw::IndexedPatches => {
|
||||
dgc::TOKEN_DRAW
|
||||
}
|
||||
CommandDraw::Indexed => {
|
||||
list.push(dgc::LayoutToken::new(
|
||||
dgc::TOKEN_INDEX_BUFFER,
|
||||
std::ptr::from_ref(&index).cast(),
|
||||
records.index(),
|
||||
));
|
||||
dgc::TOKEN_DRAW_INDEXED
|
||||
}
|
||||
};
|
||||
list.push(dgc::LayoutToken::new(
|
||||
dgc::TOKEN_SEQUENCE_INDEX,
|
||||
std::ptr::from_ref(&sequence).cast(),
|
||||
records.sequence(),
|
||||
));
|
||||
list.push(dgc::LayoutToken::new(
|
||||
dgc::TOKEN_DRAW_INDEXED,
|
||||
draw,
|
||||
std::ptr::null(),
|
||||
records.draw(),
|
||||
));
|
||||
let info = dgc::LayoutCreateInfo::new(records.stride(), core.layout, &list);
|
||||
let stages = tokens.draw.stages();
|
||||
let info = dgc::LayoutCreateInfo::new(records.stride(), core.layout, &list, stages);
|
||||
let mut handle = 0;
|
||||
let device = core.device.handle();
|
||||
// SAFETY: the structures, and every token's data, live for the call; the pipeline layout
|
||||
@@ -714,18 +778,21 @@ impl Indirect {
|
||||
}
|
||||
}
|
||||
|
||||
/// The tokens of an execution of `draws`' content's commands of `layout` ([`Tokens`]): a push
|
||||
/// constant token for each slot word the content pushes of a slot the command holds, then the
|
||||
/// index buffer, the sequence index at the content's `IndirectSequence` field and the indexed
|
||||
/// draw; the part's first command goes at its `IndirectBase` field.
|
||||
/// The tokens of an execution of `draws`' content's commands of `layout` drawing `draw`
|
||||
/// ([`Tokens`]): a push constant token for each slot word the content pushes of a slot the
|
||||
/// command holds, and for each of a patch draw's addresses the content pushes (its factors', its
|
||||
/// patch indices' and an indexed patch draw's control-point indices'), then, for indexed draws, the index buffer, then the sequence index at the
|
||||
/// content's `IndirectSequence` field and the draw; the part's first command goes at its
|
||||
/// `IndirectBase` field.
|
||||
///
|
||||
/// Err: [`IndirectCommandsKind::UnflaggedState`] for a content whose vertex function reads no
|
||||
/// execution range; [`IndirectCommandsKind::DrawInput`] for one that reads a slot the command
|
||||
/// binds outside its push constants, its command outside them, a fixed-function vertex binding,
|
||||
/// or that must draw at base instance 0.
|
||||
/// binds, a patch draw's address or its command outside its push constants, a fixed-function
|
||||
/// vertex binding, or that must draw at base instance 0.
|
||||
pub(crate) fn tokens(
|
||||
draws: &Draws,
|
||||
layout: IndirectDrawLayout,
|
||||
draw: CommandDraw,
|
||||
) -> Result<Tokens, IndirectCommandsKind> {
|
||||
let mut words = Vec::new();
|
||||
let (mut sequence, mut base, mut range) = (None, None, false);
|
||||
@@ -744,6 +811,20 @@ pub(crate) fn tokens(
|
||||
DrawPlace::Block(..) => return Err(IndirectCommandsKind::DrawInput),
|
||||
}
|
||||
}
|
||||
// A patch draw's addresses, which only a patch draw's content reads.
|
||||
FieldValue::TessellationFactors
|
||||
| FieldValue::PatchIndices
|
||||
| FieldValue::ControlPointIndices => {
|
||||
let at = match value {
|
||||
FieldValue::TessellationFactors => layout.factors(),
|
||||
FieldValue::PatchIndices => layout.patch_indices(),
|
||||
_ => layout.control_point_indices(),
|
||||
};
|
||||
match place {
|
||||
DrawPlace::Push(push) => words.push((at, push)),
|
||||
DrawPlace::Block(..) => return Err(IndirectCommandsKind::DrawInput),
|
||||
}
|
||||
}
|
||||
FieldValue::IndirectSequence => match place {
|
||||
DrawPlace::Push(push) => sequence = Some(push),
|
||||
DrawPlace::Block(..) => return Err(IndirectCommandsKind::DrawInput),
|
||||
@@ -765,6 +846,7 @@ pub(crate) fn tokens(
|
||||
words.sort_unstable();
|
||||
Ok(Tokens {
|
||||
layout,
|
||||
draw,
|
||||
pushes: words,
|
||||
sequence,
|
||||
base,
|
||||
@@ -880,15 +962,21 @@ unsafe fn make_region(core: &Core, size: u64, bits: u32) -> Result<Region, Error
|
||||
|
||||
impl Device {
|
||||
/// `newIndirectCommandBufferWithDescriptor:maxCommandCount:options:`: a buffer of
|
||||
/// `max_command_count` indexed draw commands, its records in a Private block the runtime
|
||||
/// takes (the options' storage mode is not read: the CPU encodes no command). Its commands are
|
||||
/// `max_command_count` plain, indexed, patch or indexed patch draw commands, as the
|
||||
/// descriptor's one type says, its
|
||||
/// records in a Private block the runtime takes (the options' storage mode is not read: the
|
||||
/// CPU encodes no command). Its commands are
|
||||
/// reset, each drawing nothing, by copies from the device's template of its layout in the
|
||||
/// upload of the next commit, ahead of every command buffer committed after the call; its
|
||||
/// header is written there too.
|
||||
///
|
||||
/// Err: [`Gap::IndirectCommandBuffers`] of [`IndirectCommandsKind::Extension`] on a device
|
||||
/// without the extension, [`IndirectCommandsKind::CommandTypes`] for types other than indexed
|
||||
/// draws alone, [`IndirectCommandsKind::CommandPipelines`] for commands that set their own
|
||||
/// without the extension, [`IndirectCommandsKind::CommandTypes`] for types other than plain
|
||||
/// draws alone, indexed draws alone, patch draws alone or indexed patch draws alone,
|
||||
/// [`IndirectCommandsKind::TessellationStages`] for patch draws of either kind on a device
|
||||
/// whose executions
|
||||
/// do not run the tessellation stages, [`IndirectCommandsKind::CommandPipelines`] for commands
|
||||
/// that set their own
|
||||
/// pipeline state, [`IndirectCommandsKind::InheritedBuffers`] for commands that draw with the
|
||||
/// encoder's buffers, [`IndirectCommandsKind::BindCount`] for more than 31 vertex or fragment
|
||||
/// buffers, [`IndirectCommandsKind::Capacity`] for a count of 0 or past the device's
|
||||
@@ -909,8 +997,15 @@ impl Device {
|
||||
let Some(indirect) = &core.indirect else {
|
||||
return refuse(IndirectCommandsKind::Extension);
|
||||
};
|
||||
if descriptor.command_types != IndirectCommandType::DRAW_INDEXED {
|
||||
return refuse(IndirectCommandsKind::CommandTypes);
|
||||
let draw = match descriptor.command_types {
|
||||
IndirectCommandType::DRAW => CommandDraw::Plain,
|
||||
IndirectCommandType::DRAW_INDEXED => CommandDraw::Indexed,
|
||||
IndirectCommandType::DRAW_PATCHES => CommandDraw::Patches,
|
||||
IndirectCommandType::DRAW_INDEXED_PATCHES => CommandDraw::IndexedPatches,
|
||||
_ => return refuse(IndirectCommandsKind::CommandTypes),
|
||||
};
|
||||
if draw.patches() && !indirect.limits.tessellation_stages {
|
||||
return refuse(IndirectCommandsKind::TessellationStages);
|
||||
}
|
||||
if !descriptor.inherit_pipeline_state {
|
||||
return refuse(IndirectCommandsKind::CommandPipelines);
|
||||
@@ -959,6 +1054,7 @@ impl Device {
|
||||
core: Arc::clone(core),
|
||||
records,
|
||||
layout,
|
||||
draw,
|
||||
capacity: max_command_count,
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//! What a command buffer keeps of the objects its encoders use: each buffer, texture, sampler
|
||||
//! state and pipeline state once, as Metal's command buffer retains each object once, and each
|
||||
//! kernel variant past its kernel's cells that it dispatches (`crate::pipeline::Listed`), until
|
||||
//! the command buffer retires. The first use of an object in a recording takes its one
|
||||
//! state and pipeline state once, as Metal's command buffer retains each object once, each
|
||||
//! kernel variant past its kernel's cells that it dispatches (`crate::pipeline::Listed`), and each
|
||||
//! attachment view its passes render through (`crate::texture::AttachmentView`), until the
|
||||
//! command buffer retires. The first use of an object in a recording takes its one
|
||||
//! reference, of the object alone ([`Handle::Kept`]): nothing a command buffer keeps counts as a
|
||||
//! handle of the device, so the consumer's last handle is the device's last whatever work is in
|
||||
//! flight.
|
||||
@@ -16,7 +17,7 @@ use crate::buffer::Buffer;
|
||||
use crate::pipeline::{Compiled, ComputePipelineState, Listed};
|
||||
use crate::render::RenderPipelineState;
|
||||
use crate::sampler::SamplerState;
|
||||
use crate::texture::Texture;
|
||||
use crate::texture::{AttachmentView, Texture};
|
||||
use std::collections::HashSet;
|
||||
use std::hash::{BuildHasherDefault, Hasher};
|
||||
use std::mem::ManuallyDrop;
|
||||
@@ -139,9 +140,9 @@ impl<T> Deref for Uncounted<T> {
|
||||
/// game streams (at most 128, of textures), and a cap on memory, not a fit to them: a smaller
|
||||
/// bound for one kind would make every recording that used one more object of it allocate again.
|
||||
///
|
||||
/// At most, then, a queue keeps for each command buffer it holds at once ([`Objects`]) six lists
|
||||
/// at the bound, each 128 handles (1 KiB) and an address set of 256 buckets (2.3 KiB): 19.6 KiB,
|
||||
/// so 1.2 MiB for a queue of 64 command buffers.
|
||||
/// At most, then, a queue keeps for each command buffer it holds at once ([`Objects`]) eight lists
|
||||
/// at the bound, each 128 handles (1 KiB) and an address set of 256 buckets (2.3 KiB): 26.1 KiB,
|
||||
/// so 1.6 MiB for a queue of 64 command buffers.
|
||||
pub(crate) const KEPT_BOUND: usize = 128;
|
||||
|
||||
/// The objects of one kind a recording keeps, each once, in the order first used.
|
||||
@@ -186,6 +187,18 @@ impl<T: Handle> Kept<T> {
|
||||
unsafe { Lent::of(object) }
|
||||
}
|
||||
|
||||
/// [`keep`](Self::keep), and whether the list did not keep `object` before.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// As [`keep`](Self::keep).
|
||||
pub(crate) unsafe fn keep_first(&mut self, object: &T) -> (Lent<T>, bool) {
|
||||
let first = self.hold(object);
|
||||
// SAFETY: the list keeps the object now, until it is cleared, past which the caller uses
|
||||
// no borrow.
|
||||
(unsafe { Lent::of(object.object()) }, first)
|
||||
}
|
||||
|
||||
/// Keeps `object` where it is not kept yet: whether it was not.
|
||||
pub(crate) fn hold(&mut self, object: &T) -> bool {
|
||||
let first = self.addresses.insert(object.address());
|
||||
@@ -250,12 +263,23 @@ pub(crate) struct ByKind {
|
||||
pub(crate) variants: Kept<Arc<Listed>>,
|
||||
/// The sRGB variants of kernels the recording dispatched, which no state holds.
|
||||
pub(crate) contents: Kept<Arc<Compiled>>,
|
||||
/// The attachment views the recording's passes rendered through: a texture evicts only a
|
||||
/// view no list holds.
|
||||
pub(crate) attachment_views: Kept<Arc<AttachmentView>>,
|
||||
/// The address of each Managed buffer with a device copy the recording's encoders named, as
|
||||
/// [`Handle::address_of`] gives it: one entry at the first keep of each buffer of `buffers`
|
||||
/// that is one, and of each texture of `textures` over one (`crate::command`), so at most
|
||||
/// the buffers and textures kept. What its commit looks up among the ranges named
|
||||
/// (`crate::capture::Names`): only such a buffer can have a range named.
|
||||
pub(crate) managed: Vec<usize>,
|
||||
}
|
||||
|
||||
impl ByKind {
|
||||
/// Releases every object, keeping each list's capacity, within [`KEPT_BOUND`], for the next
|
||||
/// recording.
|
||||
pub(crate) fn clear(&mut self) {
|
||||
// Before the textures: a texture whose last hold is that list's frees its views as it drops.
|
||||
self.attachment_views.clear();
|
||||
self.buffers.clear();
|
||||
self.textures.clear();
|
||||
self.samplers.clear();
|
||||
@@ -263,6 +287,11 @@ impl ByKind {
|
||||
self.render_pipelines.clear();
|
||||
self.variants.clear();
|
||||
self.contents.clear();
|
||||
if self.managed.capacity() > KEPT_BOUND {
|
||||
self.managed = Vec::new();
|
||||
} else {
|
||||
self.managed.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ use crate::counters::{Counters, Gauge, Metric};
|
||||
use crate::device::lock;
|
||||
use crate::pipeline::Compiled;
|
||||
use crate::render::RenderCompiled;
|
||||
use crate::render::RENDER_STAGES;
|
||||
use metal2vulkan::cache::PipelineKey;
|
||||
use std::collections::HashMap;
|
||||
use std::hash::Hash;
|
||||
@@ -25,18 +26,26 @@ pub(crate) const KERNEL_ENTRIES: usize = 1024;
|
||||
/// `Device::queried_render_descriptor_key`, every field of a render pipeline descriptor with its
|
||||
/// functions keyed as a kernel is; neither key decodes a function), and a compute descriptor's
|
||||
/// `requiredThreadsPerThreadgroup`, which the state answers as its `maxTotalThreadsPerThreadgroup`
|
||||
/// and the translator's key leaves out (`None` for a render pipeline); and for a compute state's
|
||||
/// variant, its texture slots that hold an 8-bit sRGB texture's UNORM twin and its buffer slots
|
||||
/// bound at a multiple of 4 below their argument's alignment, bit `i` slot `i` in each
|
||||
/// (`PipelineInner::variant`), 0 for every other content.
|
||||
/// and the translator's key leaves out (`None` for a render pipeline); for a compute state's
|
||||
/// variant, its texture slots that hold an 8-bit sRGB texture's UNORM twin (`srgb`'s first) and
|
||||
/// its buffer slots bound at a multiple of 4 below their argument's alignment, bit `i` slot `i`
|
||||
/// in each (`PipelineInner::variant`); for a render state's content for a pass, the colours its
|
||||
/// fragment function fetches through an element holding a 2D array view, bit `i` colour `i`
|
||||
/// (`RenderPipelineState::for_pass`); and for a render state's content for its draws' bindings,
|
||||
/// the buffer slots bound at a multiple of 4 below their argument's alignment, bit `i` the vertex
|
||||
/// function's slot `i` and bit `32 + i` the fragment function's, and the texture slots that hold
|
||||
/// an 8-bit sRGB texture's UNORM twin, bit `i` of `srgb`'s first the vertex function's slot `i`
|
||||
/// and of its second the fragment function's (`RenderPipelineState::for_draws`). Each is 0 for
|
||||
/// every other content.
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct KernelKey {
|
||||
pub(crate) pipeline: PipelineKey,
|
||||
/// Object-stage and mesh-only descriptor fields plus both local sizes.
|
||||
pub(crate) mesh: Option<[u8; 32]>,
|
||||
pub(crate) required: Option<[u32; 3]>,
|
||||
pub(crate) srgb: u128,
|
||||
pub(crate) words: u32,
|
||||
pub(crate) srgb: [u128; RENDER_STAGES],
|
||||
pub(crate) words: u128,
|
||||
pub(crate) arrays: u8,
|
||||
}
|
||||
|
||||
/// What one content compiles to.
|
||||
|
||||
@@ -37,6 +37,7 @@ mod fence;
|
||||
mod fill;
|
||||
pub mod floor;
|
||||
mod function_table;
|
||||
mod handed;
|
||||
mod hazard;
|
||||
mod host_bytes;
|
||||
mod import;
|
||||
@@ -51,6 +52,7 @@ mod pass;
|
||||
mod pipeline;
|
||||
mod pixel_format_info;
|
||||
mod places;
|
||||
mod positions;
|
||||
mod queue;
|
||||
mod readback;
|
||||
mod reaper;
|
||||
@@ -86,9 +88,10 @@ pub use depth_stencil::DepthStencilState;
|
||||
pub use device::{Device, DeviceOptions, RawDevice};
|
||||
pub use encoder::{ComputeCommandEncoder, Dispatch, DispatchType, Resource, ResourceUsage};
|
||||
pub use error::{
|
||||
DrawKind, Error, Gap, IndirectCommandsKind, KernelInputKind, Limit, LinearPlanePassKind,
|
||||
PartialThreadgroupsSite, Refusal, RefusalBasis, RenderPassKind, RenderPipelineKind, StageGap,
|
||||
StageInKind, StorageElementCase, TextureBacking, TextureViewKind,
|
||||
DrawInputCause, DrawKind, Error, Gap, IndirectCommandsKind, KernelInputKind, Limit,
|
||||
PartialThreadgroupsSite, Refusal, RefusalBasis, RenderPassKind, RenderPipelineKind,
|
||||
SamplePositionsKind, StageGap, StageInKind, StorageElementCase, TextureBacking,
|
||||
TextureViewKind,
|
||||
};
|
||||
pub use event::{Event, SharedEvent};
|
||||
pub use export::{Export, ExportHandle};
|
||||
@@ -153,10 +156,12 @@ pub use pass::{
|
||||
};
|
||||
pub use pipeline::{ComputePipelineState, DispatchVariant};
|
||||
pub use pixel_format_info::{PixelFormatInfo, TextureLevelInfo, TextureLevelQuery};
|
||||
pub use positions::SamplePosition;
|
||||
pub use queue::CommandQueue;
|
||||
pub use render::RenderPipelineState;
|
||||
pub use render_encoder::{
|
||||
IndexBuffer, RenderCommandEncoder, ScissorRect, Viewport, VisibilityResultMode,
|
||||
IndexBuffer, PatchIndexBuffers, RenderCommandEncoder, ScissorRect, Viewport,
|
||||
VisibilityResultMode,
|
||||
};
|
||||
pub use sampler::SamplerState;
|
||||
pub use stage::{serve_stage, StageBreach, StageFill, StageRequest, StageSpans};
|
||||
@@ -164,6 +169,7 @@ pub use surface::{
|
||||
PlaneLayout, PlaneSpec, Surface, SurfaceCopy, SurfaceExport, SurfaceForm, SurfaceSpec,
|
||||
};
|
||||
pub use texture::{
|
||||
BytesPlace, HeapRange, Region, SizeAndAlign, StorageMode, Texture, TextureDescriptor,
|
||||
BytesPlace, HeapRange, Region, RestoreFence, SizeAndAlign, StorageMode, Texture,
|
||||
TextureDescriptor,
|
||||
};
|
||||
pub use times::{host_time, HOST_DOMAIN};
|
||||
@@ -17,6 +17,7 @@ use crate::submit_calls::SubmitCalls;
|
||||
use ash::vk;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::{HashSet, VecDeque};
|
||||
use std::panic::{self, AssertUnwindSafe};
|
||||
use std::ptr::NonNull;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use std::sync::{Arc, Condvar, Mutex, MutexGuard, PoisonError};
|
||||
@@ -45,6 +46,11 @@ const ALLOCATION_LEN: u64 = 16 << 20;
|
||||
/// granularity with another, so a block of buffers lies beside a block of optimal images.
|
||||
pub(crate) const GRANULE: u64 = 64 << 10;
|
||||
|
||||
/// The least alignment of an allocation's device address, which its blocks' buffers take as their
|
||||
/// base: Metal's offset rule for a device buffer aligns the offset to the data type's size, at
|
||||
/// most 16 bytes, from a base at a multiple of 16 ([`Limit::AllocationAddress`]).
|
||||
pub(crate) const BASE_ADDRESS: u64 = 16;
|
||||
|
||||
/// A block's first byte lies at a multiple of its length rounded up to a power of two, up to this
|
||||
/// much, in its allocation: an image placed in a block at an offset its alignment allows from the
|
||||
/// block's first byte is placed at one from the allocation's.
|
||||
@@ -120,6 +126,24 @@ impl Wait {
|
||||
}
|
||||
}
|
||||
|
||||
/// A release's mark: what it waits for, and the commits made when it was noted, by which the
|
||||
/// releases waiting are ordered ([`Pool::release_marked`]).
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub(crate) struct Mark {
|
||||
wait: Wait,
|
||||
commits: u64,
|
||||
}
|
||||
|
||||
impl Mark {
|
||||
/// The later of two marks: the one noted at more commits, `self` where they are level.
|
||||
pub(crate) fn later(self, other: Mark) -> Mark {
|
||||
match other.commits > self.commits {
|
||||
true => other,
|
||||
false => self,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The idle clock, the one clock for everything the runtime gives back: what became idle at
|
||||
/// `since` and stayed idle is due at `now` ([`host_time`](crate::host_time)) once
|
||||
/// [`IDLE_AGE_NANOS`] has passed (`None`); before then, the host time it becomes due.
|
||||
@@ -330,6 +354,12 @@ pub trait BlockMappings: Send + Sync {
|
||||
/// hooks between its makes, or the device's last drop), so such a wait never ends.
|
||||
/// `allocation` states when the make began and how long it took
|
||||
/// ([`AllocationInfo::make_start`], [`AllocationInfo::make_nanos`]).
|
||||
///
|
||||
/// Where it panics, the runtime frees the allocation and the panic goes on: out of the
|
||||
/// consumer's call on a take's thread, or to the end of the block-maker thread, which then
|
||||
/// makes and frees nothing more. That end stops the pool as
|
||||
/// [`Device::quiesce`](crate::Device::quiesce) does: a take of the pool's memory is
|
||||
/// [`Error::Quiesced`] from then on, and no call waits for the ended thread.
|
||||
fn map(&self, allocation: &AllocationInfo) -> bool;
|
||||
|
||||
/// Returns only once every mapping of `allocation` the consumer made is gone and none of its
|
||||
@@ -342,6 +372,10 @@ pub trait BlockMappings: Send + Sync {
|
||||
/// runtime's other threads are joined. Never under the pool's or the arena's lock. It makes no
|
||||
/// call into the runtime and drops no runtime handle, and, as [`map`](Self::map), it never
|
||||
/// waits for a lock that a thread inside a runtime call holds.
|
||||
///
|
||||
/// Where it panics on the block-maker thread, the runtime keeps the allocation, whose
|
||||
/// mappings may stand, and frees it at teardown with no second unmap; the panic ends the
|
||||
/// thread, which stops the pool as a panic of [`map`](Self::map) there does.
|
||||
fn unmap(&self, allocation: AllocationId);
|
||||
}
|
||||
|
||||
@@ -390,6 +424,8 @@ pub(crate) enum Own {
|
||||
Surface {
|
||||
/// Its memory is an import of its own, freed with it.
|
||||
import: bool,
|
||||
/// The other API's queue family, which its hand-overs name (`crate::handed`).
|
||||
family: u32,
|
||||
},
|
||||
/// An import over several dma-bufs ([`crate::Device::import_dma_bufs`]): its sparse buffer,
|
||||
/// bound to its chunks' imports by the bind that signals `bind` on the binds' timeline
|
||||
@@ -448,6 +484,18 @@ impl Memory {
|
||||
matches!(self.own, Some(Own::Export { .. }))
|
||||
}
|
||||
|
||||
/// The other API's queue family, where another API shares the memory and each submission
|
||||
/// part that uses it hands it over (`crate::handed`): an exported block's, an exported
|
||||
/// surface's buffer's (a dma-buf's on its own import of the surface's dma-buf). `None` for
|
||||
/// every other block, an import of another API's memory among them.
|
||||
pub(crate) fn handed_family(&self) -> Option<u32> {
|
||||
match self.own {
|
||||
Some(Own::Export { handle, .. }) => Some(handle.family()),
|
||||
Some(Own::Surface { family, .. }) => Some(family),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn info(&self) -> BlockInfo {
|
||||
BlockInfo {
|
||||
id: self.id,
|
||||
@@ -518,6 +566,10 @@ pub(crate) struct Block {
|
||||
/// ([`address_out`](Self::address_out)), which the textures over it read at each submission
|
||||
/// (`crate::over::ExportedOvers`).
|
||||
pub(crate) addressed: Option<Arc<AtomicBool>>,
|
||||
/// Of an exported surface's buffer in place ([`crate::Surface::buffer`]): the surface's
|
||||
/// memory, which its planes alias and which a part hands over whole
|
||||
/// (`crate::handed::Aliases`). `None` for every other block.
|
||||
pub(crate) aliases: Option<Arc<crate::handed::Aliases>>,
|
||||
}
|
||||
|
||||
impl Block {
|
||||
@@ -530,6 +582,7 @@ impl Block {
|
||||
release: Mutex::new(None),
|
||||
_under: None,
|
||||
_chunks: Vec::new(),
|
||||
aliases: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,6 +607,7 @@ impl Block {
|
||||
_under: None,
|
||||
_chunks: Vec::new(),
|
||||
addressed: None,
|
||||
aliases: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,6 +621,7 @@ impl Block {
|
||||
_under: Some(under),
|
||||
_chunks: Vec::new(),
|
||||
addressed: None,
|
||||
aliases: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -796,6 +851,11 @@ pub(crate) enum Loose {
|
||||
memory: vk::DeviceMemory,
|
||||
bytes: u64,
|
||||
},
|
||||
/// An idle parameter ring block, its buffer and memory (`crate::ring::Ring::due`).
|
||||
RingBlock {
|
||||
buffer: vk::Buffer,
|
||||
memory: vk::DeviceMemory,
|
||||
},
|
||||
}
|
||||
|
||||
struct State {
|
||||
@@ -807,9 +867,10 @@ struct State {
|
||||
/// Memory of its own other threads' objects held, given back for the block-maker thread to
|
||||
/// free.
|
||||
loose: VecDeque<Loose>,
|
||||
/// Objects and indices released while work was in flight, each with its [`Wait`], for the
|
||||
/// Objects and indices released while work was in flight, each with its [`Wait`] and the
|
||||
/// commits made when its mark was noted ([`Mark`]), in the order of those, for the
|
||||
/// block-maker thread to hand to the reaper ([`Pool::release`]).
|
||||
held: VecDeque<(Free, Wait)>,
|
||||
held: VecDeque<((Free, u64), Wait)>,
|
||||
/// Per class, the block-maker thread could not make the last allocation it tried. It tries
|
||||
/// again after the class's next take or give-back.
|
||||
failed: [bool; 2],
|
||||
@@ -1006,13 +1067,34 @@ impl Pool {
|
||||
}
|
||||
}
|
||||
|
||||
/// What a release noted now waits for, with the commits made by now ([`Mark`]).
|
||||
pub(crate) fn mark(&self) -> Mark {
|
||||
let wait = self.noted();
|
||||
let commits = match wait {
|
||||
Wait::Commits(commits) => commits,
|
||||
Wait::Progress(_) => self.commits.load(Ordering::SeqCst),
|
||||
};
|
||||
Mark { wait, commits }
|
||||
}
|
||||
|
||||
/// The program let go of `object` (a texture's or a sampler state's index, views, image or
|
||||
/// sampler), which work committed before now may reach with no handle of it, through set 1:
|
||||
/// it goes once that work retired ([`Wait`]): an index on the block-maker thread, an object
|
||||
/// on the reaper thread. Where none is in flight, it goes at once, an index on this thread,
|
||||
/// so it is vacated before the program's release returns. Releases keep their order.
|
||||
pub(crate) fn release(&self, core: &Core, object: Free) {
|
||||
let now = matches!(self.noted(), Wait::Progress(0));
|
||||
self.release_marked(core, object, None);
|
||||
}
|
||||
|
||||
/// As [`release`](Self::release), for `object` the program let go of at `marked` where that
|
||||
/// is Some, noted then ([`mark`](Self::mark)): an image whose last holder, which kept it for
|
||||
/// its own work (an upload, a command buffer), let it go once that work retired. It waits for
|
||||
/// the work committed before the program let go, not for later commits, which cannot reach
|
||||
/// it, and goes among the releases waiting in the order of their marks' commits, after those
|
||||
/// noted at as many.
|
||||
pub(crate) fn release_marked(&self, core: &Core, object: Free, marked: Option<Mark>) {
|
||||
let wait = marked.map_or_else(|| self.noted(), |mark| mark.wait);
|
||||
let now = matches!(wait, Wait::Progress(0));
|
||||
if now
|
||||
&& matches!(
|
||||
object,
|
||||
@@ -1029,11 +1111,12 @@ impl Pool {
|
||||
drop(state);
|
||||
return core.reaper.give(Job::Free(object));
|
||||
}
|
||||
// Noted under the lock, the marks rise along the queue, and a later mark waits for no
|
||||
// less: the entries whose waits are over are its first, which the block-maker thread
|
||||
// hands on in one round.
|
||||
let wait = self.noted();
|
||||
state.held.push_back((object, wait));
|
||||
// Noted under the lock, or placed by the commits it was noted at, the marks rise along
|
||||
// the queue, and a later mark waits for no less: the entries whose waits are over are its
|
||||
// first, which the block-maker thread hands on in one round.
|
||||
let mark = marked.unwrap_or_else(|| self.mark());
|
||||
let at = (state.held).partition_point(|&((_, commits), _)| commits <= mark.commits);
|
||||
state.held.insert(at, ((object, mark.commits), mark.wait));
|
||||
self.counters.rise(Gauge::ReleasesWaiting);
|
||||
self.changed.notify_all();
|
||||
}
|
||||
@@ -1141,9 +1224,9 @@ impl Pool {
|
||||
/// [`BlockMappings::map`] maps first, counted at `site`. A block's bytes are undefined.
|
||||
///
|
||||
/// Err: [`Limit::BlockLen`] past the device's longest allocation or buffer;
|
||||
/// [`Limit::BlockIds`]; what [`make_allocation`] returns; [`Limit::AllocationNotMapped`]
|
||||
/// where the consumer did not map the allocation the take made; [`Error::Quiesced`] once the
|
||||
/// pool is stopped.
|
||||
/// [`Limit::BlockIds`]; what [`make_allocation`] returns, [`Limit::AllocationAddress`] among
|
||||
/// it; [`Limit::AllocationNotMapped`] where the consumer did not map the allocation the take
|
||||
/// made; [`Error::Quiesced`] once the pool is stopped.
|
||||
pub(crate) fn take(
|
||||
&self,
|
||||
core: &Core,
|
||||
@@ -1215,7 +1298,7 @@ impl Pool {
|
||||
allocation.made = (started, made.saturating_sub(started));
|
||||
let bytes = allocation.len;
|
||||
(self.counters).timed(Part::TakeMake, bytes, made.saturating_sub(started), true);
|
||||
let mapped = self.map(&allocation, class, true);
|
||||
let (mut allocation, mapped) = self.map_made(core, allocation, class, true);
|
||||
if self.mappings.is_some() {
|
||||
(self.counters).timed(Part::TakeMap, bytes, crate::host_time() - made, false);
|
||||
}
|
||||
@@ -1232,6 +1315,26 @@ impl Pool {
|
||||
Ok(memory)
|
||||
}
|
||||
|
||||
/// [`Pool::map`] of `allocation`, just made: the allocation, and whether the consumer mapped
|
||||
/// it. Where the hook panics, the allocation is freed and the panic goes on: the thread that
|
||||
/// ran the hook ends with it (the block-maker thread as [`Ends`] says), and no allocation is
|
||||
/// left that no block or free range holds.
|
||||
fn map_made(
|
||||
&self,
|
||||
core: &Core,
|
||||
allocation: Allocation,
|
||||
class: MemoryClass,
|
||||
on_take: bool,
|
||||
) -> (Allocation, bool) {
|
||||
match panic::catch_unwind(AssertUnwindSafe(|| self.map(&allocation, class, on_take))) {
|
||||
Ok(mapped) => (allocation, mapped),
|
||||
Err(panicked) => {
|
||||
free_allocation(core, allocation);
|
||||
panic::resume_unwind(panicked)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The consumer's [`BlockMappings::map`] of `allocation`, made on a take's thread where
|
||||
/// `on_take`, off the pool's lock: true where it mapped the allocation or has no hook. An
|
||||
/// allocation mapped while a quiesce ran the unmaps has its own unmap at once.
|
||||
@@ -1396,30 +1499,34 @@ impl Pool {
|
||||
}
|
||||
|
||||
/// Takes back an imported or exported block, for the block-maker thread to free, and then to
|
||||
/// run an import's release.
|
||||
/// run an import's release. It counts as a release waiting until it is freed.
|
||||
pub(crate) fn give_back_own(&self, memory: Memory, release: Option<Release>) {
|
||||
// Noted under the lock, as a release's ([`release`](Self::release)).
|
||||
let mut state = self.lock();
|
||||
let wait = self.noted();
|
||||
// Counted under the lock, before the block-maker thread can take it.
|
||||
self.counters.rise(Gauge::ReleasesWaiting);
|
||||
state.owned.push_back(((memory, release), wait));
|
||||
drop(state);
|
||||
self.changed.notify_all();
|
||||
}
|
||||
|
||||
/// Takes back memory of its own that another thread's object held, for the block-maker
|
||||
/// thread to free ([`Loose`]).
|
||||
/// thread to free ([`Loose`]). It counts as a release waiting until it is freed.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// Nothing uses the memory or the buffer, and nothing will: no GPU work that used them is
|
||||
/// pending, and what was bound to the memory but the buffer is destroyed.
|
||||
pub(crate) unsafe fn give_back_loose(&self, loose: Loose) {
|
||||
// Counted before the block-maker thread can take it, so the gauge never falls first.
|
||||
self.counters.rise(Gauge::ReleasesWaiting);
|
||||
self.lock().loose.push_back(loose);
|
||||
self.changed.notify_all();
|
||||
}
|
||||
|
||||
/// Wakes the block-maker thread to weigh what another part of the device made idle: a
|
||||
/// preprocess region ([`crate::indirect`]).
|
||||
/// preprocess region ([`crate::indirect`]), or a parameter ring block ([`crate::ring`]).
|
||||
pub(crate) fn nudge(&self) {
|
||||
drop(self.lock());
|
||||
self.changed.notify_all();
|
||||
@@ -1683,7 +1790,8 @@ fn ahead(core: &Core, class: MemoryClass) -> Option<Allocation> {
|
||||
let mut allocation = make_allocation(core, class, ALLOCATION_LEN, None).ok()?;
|
||||
allocation.made = (started, crate::host_time() - started);
|
||||
(core.counters).timed(Part::MakerMake, allocation.len, allocation.made.1, true);
|
||||
if !core.pool.map(&allocation, class, false) {
|
||||
let (allocation, mapped) = core.pool.map_made(core, allocation, class, false);
|
||||
if !mapped {
|
||||
free_allocation(core, allocation);
|
||||
return None;
|
||||
}
|
||||
@@ -1716,12 +1824,16 @@ pub(crate) fn stock(core: &Core) {
|
||||
/// frees each imported or exported block given back, then runs an import's release; it makes an
|
||||
/// allocation of a class that holds no wholly free unit ([`State::whole`]), having the consumer
|
||||
/// map it before it joins the pool; and it frees each allocation idle for [`IDLE_AGE_NANOS`],
|
||||
/// after the consumer's unmap of it, one at a time. Each of its allocations and frees starts once
|
||||
/// after the consumer's unmap of it, one at a time, and each parameter ring block the ring's idle
|
||||
/// rule gives it ([`crate::ring::Ring::due`]). Each of its allocations and frees starts once
|
||||
/// the submit calls inside the driver as its previous one returned have returned
|
||||
/// ([`maker_call`]), and what it made is handed on as its call returns. It sleeps until
|
||||
/// the next change, or until the oldest idle allocation reaches the idle age. Stopped, it makes
|
||||
/// nothing more: what is asked of it and not made, the calls that need it make.
|
||||
/// nothing more: what is asked of it and not made, the calls that need it make. It ends as a stop
|
||||
/// however it ends, a panic of what it runs (one of the consumer's [`BlockMappings`] hooks) too
|
||||
/// ([`Ends`]).
|
||||
pub(crate) fn run(core: Arc<Core>) {
|
||||
let _ends = Ends(&core);
|
||||
make_ahead_here(Some(Arc::clone(&core.submit_calls)));
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
if let MakerTest::Park(park) = &core.maker_test {
|
||||
@@ -1735,13 +1847,6 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
let round = pool.rounds.load(Ordering::SeqCst);
|
||||
let mut held = false;
|
||||
if state.stop {
|
||||
let ring = state.asked[Internal::RingBlock.index()];
|
||||
state.asked = [false; INTERNALS];
|
||||
pool.changed.notify_all();
|
||||
drop(state);
|
||||
if ring {
|
||||
core.ring.unasked();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if let Some(internal) = (Internal::ALL.into_iter()).find(|i| state.asked[i.index()]) {
|
||||
@@ -1761,6 +1866,7 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
if let Some((memory, release)) = own {
|
||||
drop(state);
|
||||
free_own(&core, &memory, release);
|
||||
core.counters.fall(Gauge::ReleasesWaiting);
|
||||
state = pool.lock();
|
||||
continue;
|
||||
}
|
||||
@@ -1768,12 +1874,13 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
drop(state);
|
||||
// SAFETY: as given back.
|
||||
unsafe { free_loose(&core, loose) };
|
||||
core.counters.fall(Gauge::ReleasesWaiting);
|
||||
state = pool.lock();
|
||||
continue;
|
||||
}
|
||||
let object;
|
||||
(state, object) = ripe(&core, state, |state| &mut state.held, &mut held);
|
||||
if let Some(object) = object {
|
||||
if let Some((object, _)) = object {
|
||||
drop(state);
|
||||
// An index goes here, before the gauge falls, so every released index is vacated once
|
||||
// nothing waits; an object goes to the reaper.
|
||||
@@ -1807,7 +1914,7 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
continue;
|
||||
}
|
||||
// The idle rule, both classes: the next allocation to free; first, a preprocess region
|
||||
// idle for the idle age.
|
||||
// idle for the idle age, and a ring block.
|
||||
let now = crate::host_time();
|
||||
let mut wake: Option<Duration> = None;
|
||||
match (core.indirect.as_ref()).and_then(|indirect| indirect.due(now)) {
|
||||
@@ -1821,6 +1928,21 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
Some(Err(at)) => wake = Some(Duration::from_nanos(at.saturating_sub(now))),
|
||||
None => {}
|
||||
}
|
||||
// Then a parameter ring block past the first, idle for the idle age.
|
||||
match core.ring.due(now) {
|
||||
Some(Ok(block)) => {
|
||||
drop(state);
|
||||
// SAFETY: every chunk of the block is free, so no pending work reads it.
|
||||
unsafe { free_loose(&core, block) };
|
||||
state = pool.lock();
|
||||
continue;
|
||||
}
|
||||
Some(Err(at)) => {
|
||||
let due = Duration::from_nanos(at.saturating_sub(now));
|
||||
wake = Some(wake.map_or(due, |wake| wake.min(due)));
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
let mut gone = None;
|
||||
for class in MemoryClass::ALL {
|
||||
let due = match pool.rule(&state, class, now) {
|
||||
@@ -1871,10 +1993,31 @@ pub(crate) fn run(core: Arc<Core>) {
|
||||
}
|
||||
}
|
||||
|
||||
/// The block-maker thread's end, however it comes: a stop, or a panic of what it runs, such as one
|
||||
/// of the consumer's [`BlockMappings`] hooks. The pool is stopped, as a quiesce stops it, so a take
|
||||
/// is [`Error::Quiesced`]; and nothing asked of the thread waits for it: an internal asked or being
|
||||
/// made is the asking call's to make ([`Pool::ask`], [`Pool::await_made`]), and the ring's next
|
||||
/// block the next take's ([`crate::ring::Ring::unasked`]).
|
||||
struct Ends<'a>(&'a Core);
|
||||
|
||||
impl Drop for Ends<'_> {
|
||||
fn drop(&mut self) {
|
||||
let pool = &self.0.pool;
|
||||
let mut state = pool.lock();
|
||||
state.stop = true;
|
||||
state.asked = [false; INTERNALS];
|
||||
state.making = None;
|
||||
pool.changed.notify_all();
|
||||
drop(state);
|
||||
self.0.ring.unasked();
|
||||
}
|
||||
}
|
||||
|
||||
/// The oldest entry of a queue of memory given back, taken out where its [`Wait`] is over; where
|
||||
/// it is not, it stays first, and `held` is set. The pool's lock is dropped for the check. The
|
||||
/// waits are noted in order, and a later one waits for no less, so no entry behind one that holds
|
||||
/// is over: the thread, taking one after another, hands on each that is in one round.
|
||||
/// waits are in the order they were noted in, by their marks' commits for the releases
|
||||
/// ([`Mark`]), and a later one waits for no less, so no entry behind one that holds is over: the
|
||||
/// thread, taking one after another, hands on each that is in one round.
|
||||
fn ripe<'a, T>(
|
||||
core: &'a Core,
|
||||
mut state: MutexGuard<'a, State>,
|
||||
@@ -2017,6 +2160,9 @@ pub(crate) unsafe fn allocate(
|
||||
/// Shared, its free ranges all of it. Nothing of the runtime writes its bytes, and a Shared
|
||||
/// allocation's pages become resident as they are first written. Its bytes are undefined. Counted
|
||||
/// at `site`, where it names one.
|
||||
///
|
||||
/// Err: what the allocation, the bind or the map returns; [`Limit::AllocationAddress`] where the
|
||||
/// device placed the buffer's address off a multiple of [`BASE_ADDRESS`], the allocation freed.
|
||||
fn make_allocation(
|
||||
core: &Core,
|
||||
class: MemoryClass,
|
||||
@@ -2101,12 +2247,21 @@ fn make_allocation(
|
||||
let of = vk::BufferDeviceAddressInfo::default().buffer(buffer);
|
||||
// SAFETY: the buffer has device-address usage and is bound.
|
||||
allocation.address = unsafe { device.get_buffer_device_address(&of) };
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
{
|
||||
allocation.address += core.placed_past;
|
||||
}
|
||||
(core.spans).made(
|
||||
buffer,
|
||||
allocation.address,
|
||||
len,
|
||||
RangeKind::Allocation(id, class),
|
||||
);
|
||||
if !allocation.address.is_multiple_of(BASE_ADDRESS) {
|
||||
let address = allocation.address;
|
||||
free_allocation(core, allocation);
|
||||
return Err(Error::Limit(Limit::AllocationAddress { class, address }));
|
||||
}
|
||||
if class == MemoryClass::Shared {
|
||||
// SAFETY: the memory type is host-visible, and the memory is not mapped.
|
||||
let mapped = unsafe {
|
||||
@@ -2410,6 +2565,7 @@ pub(crate) fn sparse_block(
|
||||
_under: None,
|
||||
_chunks: chunks,
|
||||
addressed: None,
|
||||
aliases: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2675,7 +2831,10 @@ pub(crate) unsafe fn surface_view(
|
||||
mapping: None,
|
||||
device_local: under.memory.device_local,
|
||||
spilled: false,
|
||||
own: Some(Own::Surface { import: false }),
|
||||
own: Some(Own::Surface {
|
||||
import: false,
|
||||
family: handle.family(),
|
||||
}),
|
||||
};
|
||||
Ok(Block::over(memory, Arc::clone(core), Arc::clone(under)))
|
||||
}
|
||||
@@ -2695,7 +2854,7 @@ fn free_own(core: &Core, memory: &Memory, release: Option<Release>) {
|
||||
Some(Own::Sparse { bind, space }) => {
|
||||
let sparse = core.imports.sparse.as_ref();
|
||||
if let Some(sparse) = sparse {
|
||||
sparse.wait(&core.device, bind);
|
||||
sparse.wait(core, bind);
|
||||
}
|
||||
// SAFETY: as below, and the bind completed.
|
||||
unsafe { core.device.destroy_buffer(memory.buffer, None) };
|
||||
@@ -2713,7 +2872,7 @@ fn free_own(core: &Core, memory: &Memory, release: Option<Release>) {
|
||||
}
|
||||
// A surface's buffer on the opaque handle's allocation frees no memory: the block under it,
|
||||
// given back after it, does.
|
||||
if memory.own == Some(Own::Surface { import: false }) {
|
||||
if matches!(memory.own, Some(Own::Surface { import: false, .. })) {
|
||||
core.counters.fall(Gauge::SurfaceBuffers);
|
||||
return;
|
||||
}
|
||||
@@ -2783,14 +2942,35 @@ unsafe fn free_loose(core: &Core, loose: Loose) {
|
||||
counters.fall(Gauge::Blocks);
|
||||
counters.fall_by(Gauge::PreprocessIdleBytes, bytes);
|
||||
}
|
||||
Loose::RingBlock { buffer, memory } => {
|
||||
(core.spans).freed(buffer, core.pool.in_flight(), None);
|
||||
// SAFETY: the caller's; freeing the memory unmaps it.
|
||||
unsafe {
|
||||
core.device.destroy_buffer(buffer, None);
|
||||
free(&core.device, memory);
|
||||
}
|
||||
counters.fall(Gauge::Blocks);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// On the block-maker thread: frees an allocation the idle rule took out, after the consumer's
|
||||
/// unmap of it, and counts its idle time. The submissions made during its `vkFreeMemory` are
|
||||
/// counted ([`free`]).
|
||||
/// counted ([`free`]). Where the unmap panics, the consumer's mappings of the allocation may
|
||||
/// stand, so it is not freed here: it goes back to the pool, stopped at once under the same lock
|
||||
/// so that no take lands in it, and teardown frees it with no second unmap (it is no longer
|
||||
/// mapped); then the panic goes on, and the thread ends as [`Ends`] says.
|
||||
fn free_idle(core: &Core, allocation: Allocation) {
|
||||
core.pool.unmap(allocation.id);
|
||||
let id = allocation.id;
|
||||
if let Err(panicked) = panic::catch_unwind(AssertUnwindSafe(|| core.pool.unmap(id))) {
|
||||
let class = allocation.class;
|
||||
let mut state = core.pool.lock();
|
||||
state.stop = true;
|
||||
state.allocations[class.index()].push(allocation);
|
||||
core.pool.settle(&mut state, class);
|
||||
drop(state);
|
||||
panic::resume_unwind(panicked);
|
||||
}
|
||||
let since = allocation.idle_since;
|
||||
let began = crate::host_time();
|
||||
core.counters.freed_idle(began.saturating_sub(since));
|
||||
@@ -2829,7 +3009,11 @@ pub(crate) fn free_all(core: &mut Core) {
|
||||
// memory and places come back here.
|
||||
let held: Vec<Free> = {
|
||||
let state = (core.pool.state.get_mut()).unwrap_or_else(PoisonError::into_inner);
|
||||
state.held.drain(..).map(|(object, _)| object).collect()
|
||||
state
|
||||
.held
|
||||
.drain(..)
|
||||
.map(|((object, _), _)| object)
|
||||
.collect()
|
||||
};
|
||||
for object in held {
|
||||
core.counters.fall(Gauge::ReleasesWaiting);
|
||||
@@ -2844,10 +3028,12 @@ pub(crate) fn free_all(core: &mut Core) {
|
||||
};
|
||||
for (memory, release) in owned {
|
||||
free_own(core, &memory, release);
|
||||
core.counters.fall(Gauge::ReleasesWaiting);
|
||||
}
|
||||
for loose in loose {
|
||||
// SAFETY: as given back.
|
||||
unsafe { free_loose(core, loose) };
|
||||
core.counters.fall(Gauge::ReleasesWaiting);
|
||||
}
|
||||
{
|
||||
let state = (core.pool.state.get_mut()).unwrap_or_else(PoisonError::into_inner);
|
||||
|
||||
@@ -581,18 +581,18 @@ impl Entry {
|
||||
/// A Managed buffer's textures over its device copy in an image of their own (`Entry`), each owing
|
||||
/// copies only at Metal's own Managed events, with no tracking of commands:
|
||||
///
|
||||
/// - **In** after a didModifyRange over its range: the capture of the range at the next commit
|
||||
/// (`crate::capture`) makes it, after its copies into the device copy, in the same command
|
||||
/// buffer. And at its making, or where device work wrote the buffer (a binding whose compiled
|
||||
/// interface writes it, a blit or fill into it) or another texture over a range that meets its,
|
||||
/// from the submission after that work's: the upload that leads the first submission that uses
|
||||
/// the texture makes it, taken as that submission goes, as the device's one `VkQueue` runs
|
||||
/// submissions in the order they go, so a command buffer of another queue that passes a group
|
||||
/// held takes it ahead of the group. A capture over its range settles that copy only for the
|
||||
/// command buffers committed at or after the capture, which run behind its copy in; one
|
||||
/// committed before it may run first, and takes its own. Both copy from the device copy, never
|
||||
/// from the consumer's bytes a second time. Apple GPUs may alias Managed memory; the documented
|
||||
/// contract, not one GPU's answer, is the rule here.
|
||||
/// - **In** after a didModifyRange over its range: the capture of the range at the first commit
|
||||
/// that names the buffer (`crate::capture`) makes it, after its copies into the device copy, in
|
||||
/// the same command buffer. And at its making, or where device work wrote the buffer (a binding
|
||||
/// whose compiled interface writes it, a blit or fill into it) or another texture over a range
|
||||
/// that meets its, from the submission after that work's: the upload that leads the first
|
||||
/// submission that uses the texture makes it, taken as that submission goes, as the device's one
|
||||
/// `VkQueue` runs submissions in the order they go, so a command buffer of another queue that
|
||||
/// passes a group held takes it ahead of the group. A capture over its range settles that copy
|
||||
/// only for the command buffers committed at or after the capture, which run behind its copy in;
|
||||
/// one committed before it may run first, and takes its own. Both copy from the device copy,
|
||||
/// never from the consumer's bytes a second time. Apple GPUs may alias Managed memory; the
|
||||
/// documented contract, not one GPU's answer, is the rule here.
|
||||
/// - **Back** where device work wrote the texture since the last copy back: before the next
|
||||
/// reader of the device copy (a binding whose interface reads the buffer, a blit from it, a copy
|
||||
/// into another texture over a range that meets its, a synchronize, a capture of a range over
|
||||
@@ -635,14 +635,17 @@ struct Exported {
|
||||
/// commands and the other API, whose writes [`crate::Block::external_writes_done`] announces,
|
||||
/// change its bytes. So such a texture is copied in once after each event that changes its bytes,
|
||||
/// by the upload that leads the next submission that leans on the leading copy for it, and a
|
||||
/// submission that only reads it copies nothing. The events: the texture's making; an acquire or a
|
||||
/// zero fill of the block, which go ahead of every command buffer committed after them; and a
|
||||
/// submitted command's write of memory its texels lie in, a write through an address once an
|
||||
/// address of the block went out (every such texture), or another texture's copy back over those
|
||||
/// bytes. An address goes out by a public call alone: [`crate::Buffer::gpu_address`] of a buffer
|
||||
/// whose bytes shaders reach in the block, and a texture buffer's storage element at an index over such bytes. A surface's block in the copy form is
|
||||
/// the surface's own, so its address goes out only through its buffer
|
||||
/// ([`crate::Surface::buffer`]). Within a segment the Shared rules stand.
|
||||
/// submission that only reads it copies nothing. The events: the texture's making; the other
|
||||
/// API's writes, which `external_writes_done` marks on the host side for every command buffer
|
||||
/// committed after the call; a zero fill of the block, which goes ahead of every command buffer
|
||||
/// committed after it; and a submitted command's write of memory its texels lie in, a write
|
||||
/// through an address once an address of the block went out (every such texture), or another
|
||||
/// texture's copy back over those bytes. The acquire and release that hand the block over in each
|
||||
/// submission part that uses it (`crate::handed`) change no byte and are no event. An address
|
||||
/// goes out by a public call alone: [`crate::Buffer::gpu_address`] of a buffer whose bytes
|
||||
/// shaders reach in the block, and a texture buffer's storage element at an index over such
|
||||
/// bytes. A surface's block in the copy form is the surface's own, so its address goes out only
|
||||
/// through its buffer ([`crate::Surface::buffer`]). Within a segment the Shared rules stand.
|
||||
#[derive(Default)]
|
||||
pub(crate) struct ExportedOvers {
|
||||
entries: Vec<Exported>,
|
||||
@@ -669,8 +672,9 @@ impl ExportedOvers {
|
||||
});
|
||||
}
|
||||
|
||||
/// Work ahead of every command buffer numbered `number` or later changed the bytes `range`
|
||||
/// of block `block`: each texture over them owes its copy in.
|
||||
/// An event ahead of every command buffer numbered `number` or later changed the bytes
|
||||
/// `range` of block `block` (a zero fill the upload records, or the other API's writes that
|
||||
/// [`crate::Block::external_writes_done`] marks): each texture over them owes its copy in.
|
||||
pub(crate) fn owe(&mut self, block: BlockId, range: (u64, u64), number: u64) {
|
||||
let span = Span {
|
||||
block,
|
||||
|
||||
@@ -40,14 +40,21 @@
|
||||
//! encoder's end copies Vulkan's render area of it into the buffer's bytes at the texture's pitch.
|
||||
//!
|
||||
//! A surface plane that renders as a linear colour attachment alone ([`Attachment::linear`]:
|
||||
//! `VK_NV_linear_color_attachment`'s `LINEAR` image, `crate::surface`) renders only in a pass whose
|
||||
//! colour attachments are all such planes, with no depth or stencil attachment and no resolve
|
||||
//! into one; any other pass over one is refused as it begins ([`Gap::LinearPlanePass`], decided
|
||||
//! by [`linear_shape`] from one mark an attachment).
|
||||
//! `VK_NV_linear_color_attachment`'s `LINEAR` image, `crate::surface`) renders in place only in a
|
||||
//! pass whose colour attachments are all such planes, with no depth or stencil attachment and no
|
||||
//! resolve into one: Vulkan renders such a format "as long as all the color attachments in the
|
||||
//! render pass instance have VK_IMAGE_TILING_LINEAR tiling", and an RTX 3090 lost the device
|
||||
//! rendering one beside a depth attachment. A pass that mixes one with another attachment
|
||||
//! ([`mixes_linear`], decided by the mark alone) renders or resolves into the plane's stand-in
|
||||
//! instead ([`StandIn`], an optimal image of the runtime's of the plane's format and size): its
|
||||
//! begin copies the plane's render area into the stand-in where the plane's load action is
|
||||
//! `Load`, and its end copies the stand-in's render area into the plane where its store action
|
||||
//! stores (all but `DontCare`) and where the pass resolves into it, each copy counted, a copy
|
||||
//! Metal does not make.
|
||||
|
||||
use crate::buffer::{Buffer, BufferObject};
|
||||
use crate::device::Core;
|
||||
use crate::error::{Error, Gap, LinearPlanePassKind, Refusal, RenderPassKind};
|
||||
use crate::error::{Error, Gap, Refusal, RenderPassKind};
|
||||
use crate::texture::{barrier_layers, Attachment, ResolveCopy, Texture, TextureObject};
|
||||
use ash::vk;
|
||||
use metal2vulkan::metal::format::{self as formats, FormatEmulation};
|
||||
@@ -81,10 +88,12 @@ pub enum VisibilityResultType {
|
||||
/// 27.0.1).
|
||||
#[default]
|
||||
Reset,
|
||||
/// `MTLVisibilityResultTypeAccumulate`: each result is added to its word. Not built: a
|
||||
/// `Boolean` or `Counting` mode in such a pass is
|
||||
/// [`DrawKind::AccumulatedVisibilityResults`](crate::DrawKind::AccumulatedVisibilityResults);
|
||||
/// a pass whose encoder sets none leaves the buffer as it was, as Metal's does.
|
||||
/// `MTLVisibilityResultTypeAccumulate`, which Metal documents as accumulating the results
|
||||
/// across render passes: written as `Reset` is, on every device, each offset a mode takes its
|
||||
/// result in place of its word (docs/API.md, accepted differences). Metal on a Radeon Pro 5300M
|
||||
/// and a UHD Graphics 630 (macOS 26.7.1) writes it so; on an Apple M3 Max (macOS 27.0.1) it adds
|
||||
/// a `Counting` result to the word's low 32 bits and ORs a `Boolean` one into it, which no form
|
||||
/// here builds.
|
||||
Accumulate,
|
||||
}
|
||||
|
||||
@@ -425,6 +434,22 @@ pub struct RenderPassDescriptor {
|
||||
pub visibility_result_buffer: Option<Buffer>,
|
||||
/// `visibilityResultType`: [`VisibilityResultType::Reset`] by default.
|
||||
pub visibility_result_type: VisibilityResultType,
|
||||
/// `setSamplePositions:count:` and `getSamplePositions:count:`: where the pass's samples lie
|
||||
/// in each pixel, sample `i` at position `i`, or empty, Metal's default, for the device's own
|
||||
/// positions. The pass rasterizes at them, each coordinate taken to the nearest sixteenth of
|
||||
/// a pixel (a tie up, at most 15/16) and each sample past them at the pixel's corner, as an
|
||||
/// Apple M4 took them, through `VK_EXT_sample_locations`
|
||||
/// ([`Device::programmable_sample_positions_supported`](crate::Device::programmable_sample_positions_supported)).
|
||||
/// A set that comes to Metal's default positions at 1, 2, 4 or 8 samples (Vulkan's standard
|
||||
/// locations) rasterizes as an empty one, on every device.
|
||||
///
|
||||
/// Refused ([`Refusal::SamplePositions`]), as Metal's validation stops the descriptor: more
|
||||
/// positions than the pass's samples, a coordinate outside `[0, 1)`, other positions in a pass
|
||||
/// of one sample, or on a device that answers no. Not built
|
||||
/// ([`RenderPassKind::SamplePositions`]): other positions at a sample count whose locations the
|
||||
/// device does not offer, or in a pass with a depth attachment. A draw whose fragment function interpolates at a sample in such a
|
||||
/// pass is not built either ([`DrawKind::SamplePositions`](crate::DrawKind::SamplePositions)).
|
||||
pub sample_positions: Vec<crate::SamplePosition>,
|
||||
}
|
||||
|
||||
impl RenderPassDescriptor {
|
||||
@@ -473,6 +498,9 @@ pub(crate) struct Resolve {
|
||||
/// no attachment usage: the copy of the image into the buffer's bytes, which the pass's end
|
||||
/// records, cut to its render area (`Texture::resolve_attachment`).
|
||||
pub(crate) copy: Option<ResolveCopy>,
|
||||
/// Where it resolves into a marked plane in a pass that mixes it ([`mixes_linear`]): the
|
||||
/// stand-in it resolves into in the plane's place, which the pass's end copies into the plane.
|
||||
pub(crate) stand_in: Option<StandIn>,
|
||||
}
|
||||
|
||||
impl Resolve {
|
||||
@@ -516,6 +544,103 @@ fn range(a: &Attachment) -> vk::ImageSubresourceRange {
|
||||
}
|
||||
}
|
||||
|
||||
/// A marked surface plane's stand-in in a pass that mixes the plane with another attachment
|
||||
/// ([`mixes_linear`]): the optimal image the pass renders or resolves into in the plane's place
|
||||
/// (`TextureObject::stand_in`), in the attachment layout through the rendering, and the copies of
|
||||
/// the pass's render area that its begin and its end make between it and the plane, which stays
|
||||
/// in its home layout, general (`crate::render_encoder`).
|
||||
pub(crate) struct StandIn {
|
||||
/// The stand-in's attachment view and its image.
|
||||
pub(crate) view: vk::ImageView,
|
||||
pub(crate) image: vk::Image,
|
||||
/// The plane's image, and its level and layer the pass renders.
|
||||
pub(crate) plane: vk::Image,
|
||||
pub(crate) level: u32,
|
||||
pub(crate) layer: u32,
|
||||
/// A texel's bytes, which the copies' counts take.
|
||||
pub(crate) texel: u64,
|
||||
/// The pass loads the plane (`LoadAction::Load`): its begin copies the plane into the
|
||||
/// stand-in, which the pass then loads.
|
||||
pub(crate) copy_in: bool,
|
||||
/// The pass stores into the plane (a store action but `DontCare`, or a resolve): its end
|
||||
/// copies the stand-in into the plane.
|
||||
pub(crate) copy_out: bool,
|
||||
}
|
||||
|
||||
impl StandIn {
|
||||
/// The stand-in of `texture`'s marked plane for its attachment `a`, its copies as `copy_in`
|
||||
/// and `copy_out` say.
|
||||
///
|
||||
/// Err: as `TextureObject::stand_in`.
|
||||
fn of(
|
||||
texture: &Texture,
|
||||
a: &Attachment,
|
||||
copy_in: bool,
|
||||
copy_out: bool,
|
||||
) -> Result<StandIn, Error> {
|
||||
let (view, image) = texture.stand_in(a)?;
|
||||
Ok(StandIn {
|
||||
view,
|
||||
image,
|
||||
plane: a.image,
|
||||
level: a.level,
|
||||
layer: a.layer,
|
||||
texel: texture.unit().map_or(0, |unit| u64::from(unit.bytes)),
|
||||
copy_in,
|
||||
copy_out,
|
||||
})
|
||||
}
|
||||
|
||||
/// The barrier that moves the stand-in from `old` to `new`, after every earlier command and
|
||||
/// before every later one.
|
||||
pub(crate) fn barrier(
|
||||
&self,
|
||||
old: vk::ImageLayout,
|
||||
new: vk::ImageLayout,
|
||||
) -> vk::ImageMemoryBarrier2<'static> {
|
||||
let range = vk::ImageSubresourceRange {
|
||||
aspect_mask: vk::ImageAspectFlags::COLOR,
|
||||
base_mip_level: 0,
|
||||
level_count: 1,
|
||||
base_array_layer: 0,
|
||||
layer_count: 1,
|
||||
};
|
||||
layout_barrier(self.image, range, old, new)
|
||||
}
|
||||
|
||||
/// The copy of the render area `reach` between the plane and the stand-in: into the stand-in
|
||||
/// (`into`), or out of it into the plane.
|
||||
pub(crate) fn region(&self, reach: [u32; 2], into: bool) -> vk::ImageCopy {
|
||||
let layers = |mip_level, base_array_layer| vk::ImageSubresourceLayers {
|
||||
aspect_mask: vk::ImageAspectFlags::COLOR,
|
||||
mip_level,
|
||||
base_array_layer,
|
||||
layer_count: 1,
|
||||
};
|
||||
let (plane, stand_in) = (layers(self.level, self.layer), layers(0, 0));
|
||||
let (src_subresource, dst_subresource) = match into {
|
||||
true => (plane, stand_in),
|
||||
false => (stand_in, plane),
|
||||
};
|
||||
vk::ImageCopy {
|
||||
src_subresource,
|
||||
src_offset: vk::Offset3D::default(),
|
||||
dst_subresource,
|
||||
dst_offset: vk::Offset3D::default(),
|
||||
extent: vk::Extent3D {
|
||||
width: reach[0],
|
||||
height: reach[1],
|
||||
depth: 1,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// The bytes of one copy of the render area `reach`.
|
||||
pub(crate) fn bytes(&self, reach: [u32; 2]) -> u64 {
|
||||
u64::from(reach[0]) * u64::from(reach[1]) * self.texel
|
||||
}
|
||||
}
|
||||
|
||||
/// One attachment of a checked pass.
|
||||
pub(crate) struct Target {
|
||||
pub(crate) texture: Texture,
|
||||
@@ -530,6 +655,9 @@ pub(crate) struct Target {
|
||||
/// Where its store action resolves, its resolve, boxed: a pass that resolves nothing moves
|
||||
/// no resolve's room.
|
||||
pub(crate) resolve: Option<Box<Resolve>>,
|
||||
/// Where it is a marked plane in a pass that mixes it ([`mixes_linear`]): the stand-in the pass
|
||||
/// renders into in its place. Its own layout stays its home, general.
|
||||
pub(crate) stand_in: Option<StandIn>,
|
||||
}
|
||||
|
||||
impl Target {
|
||||
@@ -553,9 +681,13 @@ impl Target {
|
||||
/// loads what the pass stored.
|
||||
/// Where it resolves, the rendering resolves it as it ends, each time it begins.
|
||||
pub(crate) fn info(&self, resumed: bool) -> vk::RenderingAttachmentInfo<'static> {
|
||||
let (view, layout) = match &self.stand_in {
|
||||
Some(s) => (s.view, vk::ImageLayout::ATTACHMENT_OPTIMAL),
|
||||
None => (self.attachment.view, self.layout),
|
||||
};
|
||||
let info = vk::RenderingAttachmentInfo::default()
|
||||
.image_view(self.attachment.view)
|
||||
.image_layout(self.layout)
|
||||
.image_view(view)
|
||||
.image_layout(layout)
|
||||
.load_op(match resumed {
|
||||
true => vk::AttachmentLoadOp::LOAD,
|
||||
false => self.load,
|
||||
@@ -563,10 +695,15 @@ impl Target {
|
||||
.store_op(self.store)
|
||||
.clear_value(self.clear);
|
||||
match &self.resolve {
|
||||
Some(r) => info
|
||||
.resolve_mode(r.mode)
|
||||
.resolve_image_view(r.attachment.view)
|
||||
.resolve_image_layout(r.layout),
|
||||
Some(r) => {
|
||||
let (view, layout) = match &r.stand_in {
|
||||
Some(s) => (s.view, vk::ImageLayout::ATTACHMENT_OPTIMAL),
|
||||
None => (r.attachment.view, r.layout),
|
||||
};
|
||||
info.resolve_mode(r.mode)
|
||||
.resolve_image_view(view)
|
||||
.resolve_image_layout(layout)
|
||||
}
|
||||
None => info,
|
||||
}
|
||||
}
|
||||
@@ -639,6 +776,10 @@ pub(crate) struct Pass {
|
||||
/// Whether any attachment resolves: a pass that resolves nothing walks no resolve as its
|
||||
/// encoder begins and ends ([`Pass::resolves`]).
|
||||
pub(crate) resolving: bool,
|
||||
/// The sample locations the pass rasterizes at, where its descriptor sets positions other
|
||||
/// than the defaults (`crate::positions::check`): its draws take pipelines made for them, and
|
||||
/// the encoder records them before its first draw.
|
||||
pub(crate) positions: Option<crate::positions::PassPositions>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -676,6 +817,15 @@ impl Pass {
|
||||
.chain(stencil)
|
||||
}
|
||||
|
||||
/// Every stand-in of the pass ([`mixes_linear`]): its colour attachments', then their
|
||||
/// resolves'. A pass that marks nothing has none.
|
||||
pub(crate) fn stand_ins(&self) -> impl Iterator<Item = &StandIn> {
|
||||
let colors = self.colors.iter().flatten();
|
||||
let resolves = colors.clone().filter_map(|t| t.resolve.as_deref());
|
||||
(colors.filter_map(|t| t.stand_in.as_ref()))
|
||||
.chain(resolves.filter_map(|r| r.stand_in.as_ref()))
|
||||
}
|
||||
|
||||
/// The texture of every attachment and resolve the pass holds out of its home layout: the
|
||||
/// attachment layout of a shader-read one, or the feedback layout once a draw of the pass read
|
||||
/// it through a slot. A pass that resolves nothing walks no resolve.
|
||||
@@ -735,9 +885,9 @@ impl Pass {
|
||||
/// Err: [`Refusal::OtherDevice`] for another device's texture or visibility result buffer;
|
||||
/// [`Refusal::AttachmentUsage`]; [`Refusal::AttachmentPlace`]; [`Refusal::AttachmentFormat`];
|
||||
/// [`Refusal::ResolveTexture`]; [`Refusal::ResolveFormat`]; [`Refusal::NoAttachmentPass`];
|
||||
/// [`Gap::RenderPass`];
|
||||
/// [`Gap::LinearPlanePass`] for a shape [`linear_shape`] names; [`Error::Vulkan`] where an
|
||||
/// attachment's view cannot be made.
|
||||
/// [`Refusal::SamplePositions`]; [`Gap::RenderPass`]; what a marked plane's stand-in refuses
|
||||
/// (`TextureObject::stand_in`);
|
||||
/// [`Error::Vulkan`] where an attachment's view or a stand-in cannot be made.
|
||||
pub(crate) fn check(core: &Arc<Core>, d: &RenderPassDescriptor) -> Result<Pass, Error> {
|
||||
let gap = |kind| Error::Unsupported(Gap::RenderPass { kind });
|
||||
// Metal's 0 and 1 both render the attachment's slice alone.
|
||||
@@ -965,17 +1115,31 @@ impl Pass {
|
||||
samples: vk::SampleCountFlags::empty(),
|
||||
layers,
|
||||
resolving: any_resolve,
|
||||
positions: None,
|
||||
};
|
||||
let colors = pass.colors.iter().flatten();
|
||||
let resolves = (any_resolve.then(|| colors.clone()).into_iter().flatten())
|
||||
.filter_map(|t| t.resolve.as_ref().map(|r| r.attachment.linear));
|
||||
let shape = linear_shape(
|
||||
let mixed = mixes_linear(
|
||||
colors.map(|t| t.attachment.linear),
|
||||
resolves,
|
||||
pass.depth.is_some() || pass.stencil.is_some(),
|
||||
);
|
||||
if let Some(kind) = shape {
|
||||
return Err(Error::Unsupported(Gap::LinearPlanePass { kind }));
|
||||
if mixed {
|
||||
let colors = d.color_attachments.iter();
|
||||
for (t, c) in pass.colors.iter_mut().zip(colors) {
|
||||
let Some(t) = t else {
|
||||
continue;
|
||||
};
|
||||
if t.attachment.linear {
|
||||
let load = c.load_action == LoadAction::Load;
|
||||
let store = c.store_action != StoreAction::DontCare;
|
||||
t.stand_in = Some(StandIn::of(&t.texture, &t.attachment, load, store)?);
|
||||
}
|
||||
if let Some(r) = t.resolve.as_deref_mut().filter(|r| r.attachment.linear) {
|
||||
r.stand_in = Some(StandIn::of(&r.texture, &r.attachment, false, true)?);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Vulkan renders one sample count into every attachment of a pass
|
||||
// (VUID-VkRenderingInfo-multisampledRenderToSingleSampled-06857).
|
||||
@@ -1023,37 +1187,40 @@ impl Pass {
|
||||
pass.area[axis] = area;
|
||||
pass.reach[axis] = area.next_multiple_of(REACH).min(level[axis]);
|
||||
}
|
||||
pass.positions = crate::positions::check(
|
||||
core.sample_locations.as_ref(),
|
||||
&d.sample_positions,
|
||||
pass.samples,
|
||||
pass.depth.is_some(),
|
||||
)?;
|
||||
Ok(pass)
|
||||
}
|
||||
}
|
||||
|
||||
/// What a pass sets that Vulkan's rule for images that render as linear colour attachments alone
|
||||
/// does not render ([`Attachment::linear`], a surface plane's: `VK_NV_linear_color_attachment`
|
||||
/// renders such a format "as long as all the color attachments in the render pass instance have
|
||||
/// `VK_IMAGE_TILING_LINEAR` tiling"), from each colour attachment's mark (`colors`), each colour
|
||||
/// resolve's (`resolves`) and whether the pass has a depth or a stencil attachment: a resolve
|
||||
/// into a marked image, a marked colour attachment beside a depth or stencil attachment (the
|
||||
/// driver lost the device on that shape), or beside an unmarked colour attachment. `None` where
|
||||
/// nothing is marked, and where every colour attachment is marked with nothing else set.
|
||||
pub(crate) fn linear_shape(
|
||||
/// Whether a pass mixes an image that renders as a linear colour attachment alone
|
||||
/// ([`Attachment::linear`], a surface plane's: `VK_NV_linear_color_attachment` renders such a format
|
||||
/// "as long as all the color attachments in the render pass instance have
|
||||
/// `VK_IMAGE_TILING_LINEAR` tiling") with another attachment, from each colour attachment's mark
|
||||
/// (`colors`), each colour resolve's (`resolves`) and whether the pass has a depth or a stencil
|
||||
/// attachment: a resolve into a marked image, a marked colour attachment beside a depth or stencil
|
||||
/// attachment (an RTX 3090 lost the device on that shape), or beside an unmarked colour
|
||||
/// attachment. Such a pass renders each marked image through its stand-in ([`StandIn`]); one
|
||||
/// where nothing is marked, or where every colour attachment is marked with nothing else set,
|
||||
/// renders each in place.
|
||||
pub(crate) fn mixes_linear(
|
||||
colors: impl IntoIterator<Item = bool>,
|
||||
resolves: impl IntoIterator<Item = bool>,
|
||||
depth_or_stencil: bool,
|
||||
) -> Option<LinearPlanePassKind> {
|
||||
) -> bool {
|
||||
if resolves.into_iter().any(|linear| linear) {
|
||||
return Some(LinearPlanePassKind::Resolve);
|
||||
return true;
|
||||
}
|
||||
let (marked, unmarked) = colors
|
||||
.into_iter()
|
||||
.fold((false, false), |(marked, unmarked), linear| {
|
||||
(marked || linear, unmarked || !linear)
|
||||
});
|
||||
match (marked, depth_or_stencil, unmarked) {
|
||||
(false, _, _) => None,
|
||||
(true, true, _) => Some(LinearPlanePassKind::DepthStencil),
|
||||
(true, false, true) => Some(LinearPlanePassKind::OtherColor),
|
||||
(true, false, false) => None,
|
||||
}
|
||||
marked && (depth_or_stencil || unmarked)
|
||||
}
|
||||
|
||||
/// The Vulkan load and store operations of Metal's `load` and `store` actions: the load one to
|
||||
@@ -1155,6 +1322,7 @@ fn resolve(
|
||||
layout,
|
||||
mode,
|
||||
copy,
|
||||
stand_in: None,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1183,6 +1351,7 @@ fn target(
|
||||
store,
|
||||
clear,
|
||||
resolve,
|
||||
stand_in: None,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 453 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user