1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Structural and semantic IR validation.
//!
//! Catches errors at construction time rather than at GPU compile time.
//! A program that passes validation is guaranteed to be well-formed: every
//! buffer reference is declared, every type is consistent, and every
//! recursive depth is bounded. Validation is the mandatory gate between
//! frontend emission and backend lowering.
/// Buffer name and binding validation.
///
/// Ensures that buffer names are unique, binding slots do not collide,
/// and workgroup buffers have positive element counts.
/// Default depth limits and limit tracking for recursive validation.
///
/// Defines the maximum call depth, nesting depth, and node count that
/// the validator will accept. These limits prevent pathological programs
/// from causing stack overflow or adapter limit violations.
/// Validation error construction helpers.
///
/// Internal utilities for building consistent `ValidationError` values
/// with actionable `Fix:` messages.
/// Adapter limit validation.
///
/// Checks that buffer sizes, workgroup dimensions, and program scale
/// stay within the limits of the target GPU adapter.
/// The main validate entry point.
///
/// `validate` is the top-level function that runs every validation pass
/// and returns a vector of errors (empty on success).
/// Detailed validation failure report.
///
/// `ValidationError` describes exactly which invariant was violated,
/// where in the program it occurred, and how to fix it.
pub use Binding;
/// Re-export of default depth limits and limit tracking.
///
/// These constants and types are used by the validator and by tests
/// that need to construct limit configurations.
pub use ;
pub use err;
/// Re-export of the top-level validation function.
///
/// This is the stable entry point called by frontends before handing a
/// `Program` to a backend.
pub use validate;
/// Re-export of the detailed validation error type.
///
/// Consumers inspect `ValidationError` to produce human-readable
/// diagnostics or to decide whether a program can be retried.
pub use ValidationError;