Files
metal2vulkan/crates/metal2vulkan-runtime/Cargo.toml
T
Anees Iqbal c56e3efec0 Example: private_bandwidth, and the memory log names a kept dedicated block a placement takes
private_bandwidth (not a consumer's example) makes two 256 MiB buffers of the
runtime's own memory as a program makes them (new_buffer, or
new_buffer_with_descriptor at a picked or a pinned address), each pair after
earlier pairs of each storage mode went in the same device, fills them once by
a blit, and times a kernel reading one and writing the other, one dispatch a
committed and waited command buffer: GB/s by wall time and by GPU time, with
the memory counts the making moved. It reproduces a Private buffer's slow
kernel on a discrete GPU.

The memory log said nothing where a placement took a kept empty dedicated
block, which makes no block: it now names the block and its memory type.

Not yet run.
2026-11-11 13:20:44 -08:00

122 lines
4.6 KiB
TOML

[package]
name = "metal2vulkan-runtime"
version = "0.2.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
description = "The Metal API on Vulkan: Metal's objects and calls run on a Vulkan device through ash"
readme = "README.md"
repository.workspace = true
documentation = "https://docs.rs/metal2vulkan-runtime"
keywords = ["metal", "vulkan", "gpu", "graphics"]
categories = ["graphics", "api-bindings"]
# No crate root can appear unannounced, so validation's product fingerprint follows exactly the
# runtime's module tree (build_support.rs). Each example is listed below.
autobins = false
autoexamples = false
# The runtime's tests read the repository's profiles, fixtures and guide beside this directory.
exclude = ["/target/", "**/*.air", "**/*.metallib", "**/*.spv"]
[lib]
name = "metal2vulkan_runtime"
path = "src/lib.rs"
# Runnable examples for consumers (README.md, "Examples"): each runs the owned fixture
# validation/fixtures/public/examples/runtime_examples.metal on the system default device, from the
# workspace checkout (its committed LLVM text, assembled by `llvm-as`), or a metallib passed as the
# first argument.
[[example]]
name = "compute_dispatch"
path = "examples/compute_dispatch.rs"
[[example]]
name = "render_to_texture"
path = "examples/render_to_texture.rs"
[[example]]
name = "indirect_command_buffer"
path = "examples/indirect_command_buffer.rs"
[[example]]
name = "heap_placement"
path = "examples/heap_placement.rs"
[[example]]
name = "adopted_buffer"
path = "examples/adopted_buffer.rs"
# Not a consumer's example: the host A/B benchmark, the same Metal workloads natively on Metal
# and through the runtime, with a table of the two (examples/host_ab/main.rs).
[[example]]
name = "host_ab"
path = "examples/host_ab/main.rs"
# Not a consumer's example: a command buffer's fixed cost on the submit and completion path, from
# commit to its handler, and the CPU of the runtime's threads per command buffer
# (examples/submit_path.rs).
[[example]]
name = "submit_path"
path = "examples/submit_path.rs"
# Not a consumer's example: the CPU cost of an indirect command buffer's command setters, a
# render and a compute command encoded field by field (examples/icb_setters.rs).
[[example]]
name = "icb_setters"
path = "examples/icb_setters.rs"
# Not a consumer's example: command queues sharing `VkQueue`s, each workload under the policy its
# arguments name (examples/queue_share.rs).
[[example]]
name = "queue_share"
path = "examples/queue_share.rs"
# Not a consumer's example: what a draw costs the thread that encodes it, in three shapes of a
# guest's render work: a compositor's binds, many short command buffers, and long ones
# (examples/draw_costs.rs).
[[example]]
name = "draw_costs"
path = "examples/draw_costs.rs"
# Not a consumer's example: the GPU's bandwidth through 256 MiB buffers of each storage mode, over
# the caller's pages and the runtime's own (examples/managed_bandwidth.rs).
[[example]]
name = "managed_bandwidth"
path = "examples/managed_bandwidth.rs"
# Not a consumer's example: the GPU's bandwidth through 256 MiB buffers of the runtime's own memory,
# made after other buffers went (examples/private_bandwidth.rs).
[[example]]
name = "private_bandwidth"
path = "examples/private_bandwidth.rs"
[dependencies]
# The translator, through its public API only: the compiler checks that the runtime
# reaches nothing else. `ash` gives `ash_interop`'s conversions and `DeviceDescription::query`.
metal2vulkan = { version = "0.2.0", path = "../metal2vulkan", features = ["ash"] }
# `ash/loaded` opens the Vulkan loader with `dlopen` when a device is created; nothing is linked at
# build time.
ash = { workspace = true, features = ["std", "loaded"] }
# No-copy buffers take the host's page size on unix; elsewhere they are
# refused typed. It also registers the exit guard's exit handler on unix.
libc.workspace = true
# The shader cache's entry names and the binary archive's keys.
sha2.workspace = true
[dev-dependencies]
serde_json.workspace = true
# `llvm-as` for the device tests' owned fixture (`tests/pipeline_wait_order.rs`).
metal2vulkan-devtools = { path = "../metal2vulkan-devtools" }
# The host A/B benchmark's native side (examples/host_ab): Metal itself, on macOS.
[target.'cfg(target_os = "macos")'.dev-dependencies]
block2 = "0.6"
objc2 = "0.6"
objc2-foundation = "0.3"
objc2-metal = "0.3"
# The device tests compile only under the validation crate's GPU safety cfgs (`tests/mod.rs`).
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(m2v_gpu)", "cfg(m2v_cpu_icd)", "cfg(m2v_gpu_hazards)", "cfg(m2v_no_recycle)"] }