Files
reims-vgpu/Cargo.toml
T
Anees Iqbal 2168898a00 ⬆️ Build on metal2vulkan b10227d09f's runtime
Pin move 15: stacks 31 to 34 on top of 52969c03d7, in place of pin 14.
RUNTIME_VERSION 1773, SEMANTICS_VERSION 1970.

A queue's context is marked done with a transition before the command buffer's
waiters return (2b85b05ff9), which closes a completion-order race: a handler
thread let go of a command buffer's hold, so its waiters returned, before it
marked the queue's line done, and a command buffer of another queue that waited
for it through an event could then complete ahead of it, its completion seen
first (the runtime's completion_order test, 1 round in 50 on the RTX 5080
Laptop GPU beside other work). The guest now sees such a command buffer
complete after the one it waited for, as on Metal.

Textures over IOSurface planes that Metal makes are made where the runtime
refused them (715d2c3332 to 122d2f53e6): BC1 to BC7 over a plane's rows (on
MoltenVK a shadow image whose copies move the plane's rows of blocks), a texture
buffer, a 1D texture whose row fits the plane's, and a 2D array of one slice,
each over the bytes the runtime measured on an AMD Radeon Pro 5300M, an Intel
UHD 630 and the M3 Max. Each was refused as a texture Metal refuses over a
buffer (a compressed format, a type but 2D), which died at its creator here
(gpu/device.rs texture_over_plane). Every other shape Metal makes over a
planar surface's plane (rows wider than its bytesPerRow, more levels, other
types) has no one layout across those GPUs and is refused as the runtime's gap,
RuntimeGap::SurfacePlaneShape, which the creator answers nil and relays as a
refused creation, dying only in strict mode. A texture past the surface's end
is still refused.

A draw's resident uses are settled by the keys that changed since the last
draw, not by the whole resident set, and a draw's check against its pass's
geometry writes walks the uses of what its encoder made resident once an
identity (icb-stall-fix): on the RTX 5080 Laptop GPU the renderBundles page's
host step, 5001 indirect draws over 5006 resident uses, took about 242 ms a
frame at pin 14 and 22 ms after it (the runtime's measurement). A host step
records the chunks it keeps apart at an inline step's cost, hands back the
reads of chunks it keeps nothing of, and keeps draws that read textures through
the heap (resident-x7): on the M3 Max under MoltenVK the replayed_textured
page's first kept step took 3.6 ms where every step inline took 25.7 ms (the
runtime's measurement).

A render pipeline whose blended BGR10_XR, BGRA10_XR or two-plane XR attachment
(or an _sRGB twin) no first output writes, and a BGRA10_XR attachment under a
write mask of some channels, are made where the runtime refused them
NotImplemented(Format) (3356ec3db9, 6a29575e5a; SEMANTICS_VERSION 1970 at
74781c850d): the unwritten attachment takes no blend and an empty mask, as
Metal leaves it unmodified, and the masked one its fields' mask. The guest's
creator answered nil with the refusal as its NSError, relayed as a refused
creation; it now gets the pipeline, as from Metal. A padded or bfloat
attachment's unwritten blend and a mask of some of BGR10_XR's codes stay
refused.

An encoder looks up no host alias for a command whose every use of bytes names
a key found quiet, until the aliases' version moves (aliases-quiet). A shadow
over a tracked Private buffer of the runtime's own, an IOSurface plane's device
cache among them, stands across command buffers: a command buffer's first copy
in moves nothing where the image still holds every texel and nothing submitted
since wrote it, and such a plane copies back with no merge (shadow-sync). On the
RTX 5080 Laptop GPU a padded 3840x2400 plane's shadow syncing took 343 us an
idle frame before and 52 us after, 383 and 71 us a write frame (the runtime's
bench). A buffer whose VkBuffer was handed out never stands: here that is the
video decode's output into a surface's device cache
(graphics/vulkan/video.rs), which the decode's own copy writes. Writes in place
into logged host pages are reported to their logs at the commit and once after
they ran, not also at each batch and at the completion, so nothing is reported
ahead of the completed handlers. A command buffer's kernelStartTime reads 0
until its kernelEndTime is shown, waiting for an event or not, as Metal shows
neither before both (small-fixes-2); here only the host's timing lines read
the kernel times, in completed handlers, and the GPU times the guest reads are
unchanged.

The API grows by RuntimeGap::SurfacePlaneShape and WorkCounts' new counters
(replayed_heap_draws_unshared, _writing, _noted, _over_sampler_tables and
_table_textures, host_alias_lookups, resident_keys_settled,
shadow_copies_in_against_standing, shadow_copies_in_skipped_by_standing,
shadow_texels_skipped_by_standing and
shadow_texels_first_copied_in_private_surfaces), which the work log's lines
take with no change here. It loses nothing, and no degradation kind,
RuntimeDriverDefect, DriverFact, DeviceProperties or DevicePolicy field is
added, removed or renamed, so answer.rs and answer/native.rs place nothing
new and the accuracy ledger is unchanged.

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

No run ends where it did not: no kind joins DIES or DIES_BY_DEFAULT, and the
surface shapes above go from a death at the creator to a texture or a relayed
nil. The last good boot, car 13's gate on the RTX 5080 Laptop GPU (b4aff9c7f),
logged no fatal line, relayed inexact-half-output-blend and
inexact-unique-identifier, and relayed no refused creation, so none of the XR
pipelines above.
2026-11-05 21:59:36 -08:00

156 lines
6.8 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 = "b10227d09f6a8655a4a945f1e65a921d5a677c67" }
# Its translator, for the Metal enums and descriptor values the runtime's calls take.
metal2vulkan = { git = "https://github.com/steelbrain/metal2vulkan", rev = "b10227d09f6a8655a4a945f1e65a921d5a677c67" }
# 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)"] }
# The workspace's docs are its developers', built with its private items (`cargo doc
# --document-private-items`), where a public item's links to the private items its docs name
# resolve, and are checked as every other link is.
[workspace.lints.rustdoc]
private_intra_doc_links = "allow"
[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