Files
reims-vgpu/Cargo.toml
T
Anees Iqbal 19ad41a9be ⬆️ Build on metal2vulkan f4fdd6012e's runtime
Pin move 27: metal2vulkan ae87c11e14..f4fdd6012e (its steelbrain/pin27b,
development's 67f9922c3c and the in-place check's queue fix),
RUNTIME_VERSION 1929 -> 1950, SEMANTICS_VERSION 1995 -> 1997.
What changes for the guest and the host:
- The runtime's in-place check makes its render queue as the runtime's own:
  no texture pool and no device sampler. It used to run Metal's first-queue
  rule for it, so on the Iris, where it made that queue before the device's
  reservation of the guest's texture IDs, the reservation kept the pool's
  first range and handed IDs 1-15 out twice: host textures shared guest IDs
  (graphics::tests::on_vulkan_guest_texture_ids_are_kept_from_the_host_s,
  5 of 5 at 67f9922c3c alone). The race was there at ae87c11e14 too.
- A draw that differs from its kept draw only in its own arguments (counts,
  starts, index offset, base vertex or instance) is rebound: its draw command
  is recorded with the new arguments and every other step is skipped. An
  indexed draw's base vertex or index offset never stops it. A pass's first
  draw is kept, so the draw after it can be rebound. In the Iris's glass
  composite, about 78 of its ~261 draws took every step only for their index
  offset. New counts: draws_rebound_arguments, and the stopped rebinds by
  reason.
- Depth stays in [0, 1] on every device without
  VK_EXT_depth_range_unrestricted, MoltenVK included: its uploads clamp and
  announce restricted-depth-upload, as ANV's do, whatever depths they write
  (a blit from a buffer, a heap texture's copy in as it is made). The
  runtime's driver fact DepthImageKeepsValuesOutsideUnitRange is gone, so the
  combined-depth copy test keys on the extension alone, and so do the 14 Mac
  tests that upload a Depth32Float depth (gpu::device's uploading_depth):
  where the device clamps, each upload dies in strict mode, and by default
  each answer is Metal's (depths in [0, 1]) or Metal's with each depth
  clamped (a negative denormal stored as 0, the fills' 0xee prefill as 0).
  A snapshot refusal names its clause.
  The pipeline cache and translation fingerprints change, so pipelines are
  made cold once.
- A dma-buf export's texture lies in place through its own dma-buf where no
  image binds in the memory, as NVIDIA's do: 49 of 49 in place on the 5080.
- On the Iris Xe, ANV may store either code nearest a clear's exact value,
  which Vulkan allows, and the device announces its colour conversion there.
- A host copy's block made ahead joins its pool alone, and a hurried call
  waits for no page reads. A host RAM copy's chunk ranges are made once.
- A resource's staged work goes with it, so a released device is torn down.
The runtime's cross-queue hold under grouped completion (since 10-19) cannot
form here: every device of ours takes CompletionPolicy::Exact.
2026-11-08 23:45:57 -08:00

133 lines
5.8 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 = "f4fdd6012ee12f7516dbada1c36f0655b837395a" }
# Its translator, for the Metal enums and descriptor values the runtime's calls take.
metal2vulkan = { git = "https://github.com/steelbrain/metal2vulkan", rev = "f4fdd6012ee12f7516dbada1c36f0655b837395a" }
# 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)
log = "0.4.34"
# 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