[package] name = "dr-gpu" version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true [dependencies] dr-types.workspace = true dr-decode.workspace = true dr-pipeline.workspace = true # The watershed's pixel passes are here because they are shaders; everything # that reasons about regions rather than pixels lives there, where it is # testable with no adapter present. No features: this half needs neither the # inference runtime nor the weights, and the workspace declaration defaults # them off so that stays true. dr-segment.workspace = true wgpu.workspace = true thiserror.workspace = true log.workspace = true bytemuck.workspace = true # Needed outside tests: shader compilation errors are collected through an # async error scope, which must be resolved before the pipeline is returned. pollster.workspace = true [dev-dependencies] env_logger.workspace = true # The local-adjustment example needs the model, which the library half of this # crate deliberately does not: `dr-gpu` holds the shaders, and the inference # runtime belongs to whoever is asking a question about the picture. dr-segment = { workspace = true, features = ["semantic", "embedded-model"] } [[example]] name = "bench" required-features = ["readback"] [[example]] name = "develop" # No `readback` needed since S1: this writes a file, so it goes through # `export_pixels`, which is ungated precisely because an export is not the # round-trip AC-8 forbids. [features] default = [] # Exposes read_pixels outside tests. Production must not enable this. readback = [] # Exposes `Segmentation::read_field`, which builds the region adjacency graph # on the CPU. Separate from `readback` on purpose — see `segment.rs`. Once per # image on a worker, not the per-frame display round-trip AC-8 forbids; still a # full-resolution transfer, and still F3's open gap. segment-readback = [] [[example]] name = "segment" required-features = ["segment-readback"] [[example]] name = "local" # No `segment-readback`: this reads the *rendered* proxy back through # `export_pixels` to feed the model, which is the ungated export path. The # watershed, and the region-graph transfer that needs the gate, is not involved. [[test]] name = "masked_outputs" # Needs the distance transform, which lives with the model half of dr-segment. required-features = []