Files
metal2vulkan/docs
Anees Iqbal db3a88526b Validation: the stencil rule's Counting clause has nothing to read in the case schema
The runtime's BitDraws rule refuses a draw through a [[stencil]] output drawn by bits in two
places: a face whose compare is other than Always and Never (DrawDepthStencil::
stencil_reference_face reads it), and, where the state replaces a stencil bit, a draw inside a
Counting visibility result's segment. The second needs a visibility result mode, and the case
schema has no way to state one:

- crates/metal2vulkan-validation/src/case.rs:19-21, AuthoredCase: #[serde(deny_unknown_fields)],
  and none of its fields is a visibility result mode, offset or buffer;
- src/case.rs:1819-1821, Draw (primitive, vertex_start, vertex_count, instance_count,
  index_buffer, base_vertex, base_instance): deny_unknown_fields, no visibility field;
- src/case.rs:1388-1390, DepthStencilResource, and src/case.rs:1406-1408,
  DepthStencilStateLiteral: deny_unknown_fields, no visibility field;
- neither executor sets a mode or gives its pass a visibility result buffer: no "visibility" in
  src/metal/ or src/candidate/ (grep -rni visibility), and runtime_render.rs's Targets::pass
  (line 661) builds the pass from its attachments, array length and default size alone.

A manifest naming such a field is refused at parse, so no case's draw is in a segment and the
classifier carries no clause for it. When the schema grows a visibility result mode, the clause
belongs beside the compare rule, with its own classification test. The doc comment of
stencil_reference_face and docs/VALIDATION.md now say this instead of "a case sets no mode".

Verified at this commit: cargo fmt; doc comment and docs only, no code changed.
2026-11-25 13:24:41 -08:00
..