Files
reims-vgpu/Cargo.toml
T
Anees Iqbal c3ed478a70 ⬆️ Build on metal2vulkan 20f7e82bbe's runtime
Pin 89 moves metal2vulkan from bc12f6d95a (RUNTIME_VERSION 2266,
SEMANTICS_VERSION 2107, ARTIFACT_FORMAT_VERSION 522) to 20f7e82bbe (2290,
2109, 522). Pins 87 and 88 were never cut: 87's lavapipe suite hung in the
read twins (fixed by RUNTIME 2278), and 88 (afba68e6e4) kept a buffer's
unobserved padding in an exportable image that starts UNDEFINED, a shadow
where in place passed (fixed by RUNTIME 2288). It carries:
- consecutive compute encoders of a command buffer recorded into one
  Vulkan command buffer (RUNTIME 2268), an encoder's open looking only at
  the encoders ended since the open before (2270), and a failure inside a
  group of folded encoders failing only the encoders it names (2272,
  2273);
- copies from a no-copy buffer made with Metal's read-only option, and
  slots that only read such a buffer, reading its pages in place through
  a read twin (2269, 2276; fixed forward by 2274 and 2278);
- the unshared-isolation hold's budget at 2 ms only while an unshared
  queue on that VkQueue committed within the last 50 ms, else 16 ms
  (2275): a guest's single-batch command buffers are no longer held for
  2 ms each while the window's queue is idle;
- a render pass's store-out into memory whose GPU writes are dropped
  (Metal's private bit 24) faulting its command buffer with PageFault off
  macOS too, as Metal's does (2280);
- a kernel's unaliased, never-written buffer arguments NonWritable
  (SEMANTICS 2108, RUNTIME 2283), and an 8-byte leaf at a proven 8-aligned
  offset moving as one uvec2 (SEMANTICS 2109, RUNTIME 2287): on the 780M
  Geekbench's convolution loops now load as the native driver's do;
- cheaper bookkeeping per dispatch and per command buffer: a part's first
  command ordered lazily (2281), recycled encoder state (2282), live-buffer
  tables rebuilt only where a chunk changed and compared in place (2284,
  2286), a compute encoder's memory barrier recording the least barrier
  (2285), a one-dispatch encoder keeping its instantiated commands (2289),
  bind memos (2277), a used heap's buffers listed once (2271) and an
  encoder carrying every kept draw (2267);
- buffers whose padding is unobserved laid in blocks of their own,
  exportable as dma-bufs, with the padding of a block never exported held
  in place (2279, 2288);
- pieces of one shared dma-buf file bound in one import of the file
  (2290).

Here:
- gpu/command.rs gains the test
  protection_options_fail_compute_encoders_from_the_one_made_under_them:
  two compute encoders that the runtime records together, the second made
  under protection options, where the first one's work runs and the second
  one's runs nothing. It failed at metal2vulkan 09068993d6, before RUNTIME
  2272. failure()'s doc says the encoders it fails are From the first that
  runs nothing, and that this encoder can directly follow compute
  encoders the runtime records with it, the ones before it running all
  the same.
- RUNTIME 2290 changes the runtime's DmaBufChunk to { file:
  Arc<OwnedFd>, offset, length }. os/linux/dma_buf.rs and host_ram.rs hand
  each chunk a file of its own at offset 0, which is the runtime's
  behaviour before 2290, and their tests read through chunk.file.

No Degradation kind or RuntimeGap changes (247 and 80, the same names).
WorkCounts drops kept_draws_carry_capped, which nothing here reads, and
adds counters for the changes above. SEMANTICS moves, so every host's
shader caches and records go cold once, at the first run of each
pipeline; ARTIFACT_FORMAT stays.

What the guest sees changes in timing, and in one case of the contract:
on Linux and macOS hosts alike a render pass that stores an attachment
into memory the process maps read-only now faults its command buffer in
the runtime as Metal's does, where this platform already failed it so.
Under protection options the encoders before a failed one still run, as
they did at pin 86, which had no fold; the test above holds that.

The checks it reaches are the library's on the Mac and on each Linux
GPU class, rustdoc, and, since the runtime's GPU results change for
guest frameworks, a cold boot of the x86 guest on each GPU class and the
arm64 gate. The video crate, the window crate's register, the guest
sets, the option ROM and QEMU link nothing of the runtime's changes and
cannot move.

20f7e82bbe is metal2vulkan's GREEN.

Cargo.lock keeps its lines.
2026-11-14 05:40:58 -08:00

134 lines
5.9 KiB
TOML

# ReimsVGPU: the framework and its tooling (architecture.md).
[workspace]
resolver = "3"
members = [
"crates/reims-vgpu-window",
"crates/reims-vgpu",
"crates/reims-vgpu-c",
"crates/reims-vgpu-vulkan",
"crates/reims-vgpu-video",
"crates/reims-vgpu-video/conformance",
"crates/reims-vgpu-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]
# 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-vgpu-graphics = { path = "crates/reims-vgpu-graphics" }
# The reims-graphics device's video on the host: its runtime and memory (`crate::video` of
# `reims-vgpu`), and, on Linux, VA-API through libva and NVDEC through CUDA, their libraries
# loaded at run time (`graphics::vaapi` and `graphics::nvidia` of `reims-vgpu`).
reims-vgpu-video = { path = "crates/reims-vgpu-video" }
# The Vulkan platform's runtime (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 = "20f7e82bbe3b53ad9d68b1c9735709cc807c420d" }
# Its translator, for the Metal enums and descriptor values the runtime's calls take.
metal2vulkan = { git = "https://github.com/steelbrain/metal2vulkan", rev = "20f7e82bbe3b53ad9d68b1c9735709cc807c420d" }
# 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",
] }
# Metal's recorded answers too long for text, in xz files (core::testkit::metal_answers).
lzma-rs = "0.3.0"
# core (architecture 2.2)
parking_lot = "0.12.5"
zerocopy = { version = "0.8.27", features = ["derive"] }
# every crate's lines, and the default stderr logger (core::logging); `kv` for a line's `kind`,
# which tells the logger's kinds apart at one call site
log = { version = "0.4.34", features = ["kv"] }
# The macOS sides of the crates. 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"
# 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's codec::h264::nal), at the version the
# lock already holds for the regex crates.
memchr = "2.8.3"
# 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"
# Architecture 17.4. reims-vgpu-vulkan's core module adds its stricter set in core.rs.
[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "deny"
missing_docs = "warn"
# 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