Files
reims-vgpu/Cargo.toml
T
Anees Iqbal d225c9528f ⬆️ Build on metal2vulkan 52969c03d7's runtime
Pin move 14: stacks 28 to 30 on top of c7d79b43ef, in place of pin 13.
RUNTIME_VERSION 1769.

A host-replayed indirect command buffer keeps a step's chunks where two steps
read its records alike, draws whose plans list the same resident uses share
them, and a host step compares and decodes its records in place: on the RTX
5080 Laptop GPU the renderBundles page's host step took about 8.9 s a frame
at pin 13, 35-40 ms after stack 29, and about 33 ms after stack 30's cuts
(the runtime's measurements, the last before its own last two steps). A
device-local allocation that fails lies in system memory instead, announced
(device-memory-overflow, a performance kind). A pass that reads the clear
alone before any draw reads a copy cleared to it instead of splitting the
pass. A new Private texture starts as the Mac the device presents keeps it
(DeviceProperties::lossless_compression). On MoltenVK, whose blits through two
imports of the same pages are not ordered, a no-copy object over a guest RAM
chunk binds in the chunk's import. A batch waits for a staging submission only
where no earlier batch on its VkQueue did. A half read through an argument
buffer keeps the texel's half bits. A mesh the device draws takes its mesh
type's primitive, so a mesh of filled triangles draws no line.
max_buffer_length is three quarters of the largest device-local heap, rounded
down to 16 KiB: the RTX 5080's answer falls from 2^40, and the M3 Max's under
MoltenVK stays Metal's own 41,747,087,360, below its 48 GiB bound. The
graphics lane already answered at most three quarters of the device-local
heaps' sum.

New notices: device-line-ties at each draw of width-1 lines on a driver not
measured to break a diamond-vertex tie as Metal does, device-subpixel-snap at
each draw the band draws on a driver not measured to snap a half 1/256-pixel
step up, and device-nan-encoding for every half colour output to a half-float
channel on NVIDIA. MoltenVK on the M3 Max announces none of these anew: it
takes both facts, and it already noted every such half output.

The API grows by Degradation::DeviceMemoryOverflow, DeviceLineTies and
DeviceSubpixelSnap; RuntimeDriverDefect::AliasedImportBlitsUnordered;
DriverFact::LineTiesAreMetals, SubpixelSnapIsMetals and
ColorClearTakesEitherCode; DeviceProperties::lossless_compression and
MacClass; GraphicsState::mesh_corners; DriverDeviation and VkProperty
MetalUnaryDenormals; WorkCounts' new counters (device_memory_overflows,
attachment_read_clears, resident_uses_again_checked among them);
RecordView::record_into; and Device's Drop and hand-written Clone. It loses
VkProperty and DriverDeviation::MetalHalfColorNans, which nothing here used.

Cargo.lock is unchanged: the runtime's manifests are the same at both commits,
and the lock keeps its metal2vulkan source lines stripped.

The new kinds are placed by answer.rs's rules:
- device-memory-overflow is relayed, by its Exact statement.
- device-line-ties dies where its tie is not measured on MoltenVK, and a
  native device relays it, on the rule for native devices: the pixel a width-1
  line covers at a vertex two pixels' diamonds share is the driver's, which
  Vulkan's open diamond leaves to it with no control over it, and its only
  exact form is Metal's line rule run in the fragment function, an
  interpreter's. Every width-1 line draw on NVIDIA, lavapipe, RADV and ANV
  announces it.
- device-subpixel-snap dies on every device, as wide-edge-depth-bias does: the
  band is the runtime's own, and its endpoints snapped to Metal's grid before
  it offsets them would leave the rasterizer nothing to round, so the hardware
  allows the exact form. Only a band draw announces it, which on a native
  device under the default is a line below 1/16 pixel or past lineWidthRange.
- device-nan-encoding moves from what stays a death on a native device to what
  it relays, in the class of a native device's own maths and sampling: it
  differs in a NaN's bits alone, and there the runtime gives the device's NaN,
  its native form, and builds no path to Metal's bits where the device has one
  (its rule since 79166a74b1), as native-nan-encoding and
  device-texel-conversion's NaNs are relayed already. It still dies on
  MoltenVK. The placement test's list of the kinds that stay deaths on a
  native device loses it and gains device-subpixel-snap.
The accuracy ledger lists the device's width-1 lines among the device's own
answers and the band's snap under the wide_lines form.

Outside strict mode no new kind ends a run: a kind of DIES is relayed and
counted, and none of these is of DIES_BY_DEFAULT. The last good boots on the
RTX 5080 already relayed device-nan-encoding, at a draw that binds an
RG16Float texture, and relayed no kind of line.

Two tests pinned the runtime's old answers, and take its new ones:
- refused_icb_records_die_naming_the_execution: the runtime holds a commit's
  refusal of the records of a buffer the command buffer made resident for
  writing for the command buffer's host step, as a command buffer of another
  queue that this one waits for through an event, encoded after the commit,
  may still write the records before the work runs, and Metal runs what it
  wrote. Such records die as the command buffer ends, at the execution's
  selector, as at pin 11; records only the CPU wrote die at the commit, as
  before.
- the_default_filter_samples_within_its_bound_of_metals: the runtime gathers
  a two-plane 4:2:0 texture's planes in place too, so on MoltenVK a function
  that samples and gathers a YCBCR8_420_2P texture reads them in place: its
  floats and halves are Metal's bit for bit, and nothing that dies is
  announced (measured on the M3 Max). Its _sRGB twin keeps the default
  filter, within its bound, and dies of ycbcr-filter-not-exact in strict
  mode as before. The test gathers every observation before it asserts.
2026-11-05 21:59:33 -08:00

150 lines
6.5 KiB
TOML

# ReimsVGPU: the framework and its tooling (architecture.md).
[workspace]
resolver = "3"
members = [
"crates/reims-vgpu-core",
"crates/reims-vgpu-metal",
"crates/reims-vgpu-window",
"crates/reims-vgpu",
"crates/reims-vgpu-c",
"crates/reims-vgpu-vulkan",
"crates/reims-vgpu-video-core",
"crates/reims-vgpu-video-codec",
"crates/reims-vgpu-video-vaapi",
"crates/reims-vgpu-video-nvidia",
"crates/reims-vgpu-video-videotoolbox",
"crates/reims-vgpu-video-vulkan",
"crates/reims-vgpu-video-conformance",
"crates/reims-graphics",
"xtask",
]
[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.98.1"
publish = false
license = "GPL-2.0-or-later OR LGPL-3.0-or-later"
[workspace.dependencies]
reims-vgpu-core = { path = "crates/reims-vgpu-core" }
reims-vgpu-metal = { path = "crates/reims-vgpu-metal" }
# Without their default features: each member that wants SDL3's macOS window asks for it
# (`macos-sdl`), so `reims-vgpu-c`'s default decides whether the library has it.
reims-vgpu-window = { path = "crates/reims-vgpu-window", default-features = false }
reims-vgpu = { path = "crates/reims-vgpu", default-features = false }
reims-vgpu-vulkan = { path = "crates/reims-vgpu-vulkan" }
# The reims-graphics device: its wire format and host side.
reims-graphics = { path = "crates/reims-graphics" }
# The VideoToolbox device's host side (`crate::video` of `reims-vgpu`).
reims-vgpu-video-core = { path = "crates/reims-vgpu-video-core" }
# Its decoders on the host's GPU through libva, on Linux.
reims-vgpu-video-vaapi = { path = "crates/reims-vgpu-video-vaapi" }
# Its decoders and encoders on an NVIDIA GPU through NVDEC and NVENC, on Linux, loaded at run time.
reims-vgpu-video-nvidia = { path = "crates/reims-vgpu-video-nvidia" }
# Its decoders, encoders and scaler on VideoToolbox, on macOS.
reims-vgpu-video-videotoolbox = { path = "crates/reims-vgpu-video-videotoolbox" }
# The reims-graphics device's hardware video on the Vulkan platform: Vulkan Video on the runtime's
# device.
reims-vgpu-video-vulkan = { path = "crates/reims-vgpu-video-vulkan" }
# The Vulkan platform's proof of concept (architecture D1): a Metal-shaped API on Vulkan, from
# metal2vulkan's public repository at the commit both name.
metal2vulkan-runtime = { git = "https://github.com/steelbrain/metal2vulkan", rev = "52969c03d74c6048281a050c527ee906633b60cf" }
# Its translator, for the Metal enums and descriptor values the runtime's calls take.
metal2vulkan = { git = "https://github.com/steelbrain/metal2vulkan", rev = "52969c03d74c6048281a050c527ee906633b60cf" }
# The hashes of the Vulkan platform's metallib sources (reims-vgpu-vulkan/build.rs).
sha2 = "0.10.9"
# A display window's swapchain on Linux (reims-vgpu-vulkan/src/swapchain.rs), at the runtime's
# version: `loaded` opens the Vulkan loader at run time, as the runtime does.
ash = { version = "0.38", default-features = false, features = ["std", "loaded"] }
# A display's window on Linux, and on macOS with REIMS_VGPU_WINDOW_IMPL=sdl
# (reims-vgpu-window/src/sdl): SDL3, built from its pinned source release (sdl3-src 3.4.18) and
# linked statically, with its video subsystem alone; its Vulkan types are ash's.
sdl3-sys = { version = "=0.7.2", default-features = false, features = [
"build-from-source-static",
"no-default-subsystems",
"sdl-video",
"use-ash-v0-38",
] }
# core (architecture 2.2)
parking_lot = "0.12.5"
zerocopy = { version = "0.8.27", features = ["derive"] }
bitflags = "2.9"
# every crate's lines, and the default stderr logger (core::logging)
log = "0.4.34"
# metal and the public crate. objc2 `exception` is always on; `catch-all` is never enabled
# (architecture 2.3). objc2's checks (a message to nil, a missing method, the encodings) are
# debug assertions: on in dev, off in `checked` (the objc2 profile override below).
objc2 = { version = "0.6.4", features = ["exception"] }
objc2-foundation = "0.3.2"
objc2-metal = "0.3.2"
objc2-io-surface = "0.3.2"
block2 = "0.6.2"
dispatch2 = "0.3.1"
# the window crate (AppKit, Core Animation, CoreGraphics). Default features off: their defaults
# pull in every framework the crates cover (objc2-open-gl among them).
objc2-core-foundation = { version = "0.3.2", default-features = false, features = ["std"] }
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std"] }
objc2-quartz-core = { version = "0.3.2", default-features = false, features = ["std"] }
objc2-core-graphics = { version = "0.3.2", default-features = false, features = ["std"] }
mach2 = "0.7"
libc = "0.2.180"
# The codecs' Annex B start-code scan (reims-vgpu-video-codec's h264::nal), at the version the
# lock already holds for the regex crates.
memchr = "2.8.3"
# The Vulkan driver manifests the video devices' GPUs are read through
# (reims-vgpu-vulkan/src/host_gpus.rs), at the version the runtime's translator takes.
serde_json = "1.0.151"
# The library's allocator on the targets that ship (reims-vgpu-c's global allocator): jemalloc,
# built from the crate's bundled source, with its symbols prefixed.
tikv-jemallocator = "0.7.0"
# dev and tooling
proptest = "1.7"
loom = "0.7"
# Architecture 17.4. reims-vgpu-core adds its stricter set in lib.rs.
[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "deny"
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(loom)"] }
[workspace.lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
# Architecture 2.3.
[profile.release]
panic = "unwind" # D9: objc2 exception::catch unwinds through its closure frame
overflow-checks = false # wrapping is explicit (D19); release is the product
debug = "line-tables-only"
lto = "thin"
[profile.dev]
panic = "unwind"
overflow-checks = true # an unannotated arithmetic slip dies in tests
debug = "line-tables-only" # backtraces keep file and line; full DWARF is `debugging`'s
[profile.dev.package."*"] # dependencies: no debuginfo
debug = false
[profile.debugging] # a debugger's build: dev with full debuginfo everywhere
inherits = "dev"
debug = true
[profile.debugging.package."*"]
debug = true
[profile.checked] # the suite's second pass (13.6)
inherits = "release"
overflow-checks = true
debug-assertions = true
# objc2's debug_assertions checks panic on a message to nil, on a missing
# method and on an encoding the runtime disagrees with. Dev builds keep them,
# so the tests that send to real Metal check every send they make; the
# suite's `checked` pass leaves them off, and release has none at all (D36).
[profile.checked.package.objc2]
debug-assertions = false