Files
metal2vulkan/docs
Anees Iqbal 04f1587445 Snapshot refusals: say which clause leaves an own-pixel slot out, and count unreadable splits by it
WorkCounts::reading_draws_split_unreadable_own_pixel counted draws whose
own-pixel slot no snapshot serves without saying why: its one logged reason
lumps a branch, a sample, a derivative, a store and a function that writes
memory. On the guest compositor's 780M walk it is 23,031 draws (23,463
before f922125bb1's demote guard), so the guard served another shape, and
which clause refuses decides the next step. Counts and interface facts
only; which slots qualify is unchanged.

Translator: spirv::requirements::snapshot keeps one reach mask per clause
and states each slot left out with every clause that holds for it
(StageInterface::snapshot_refusals, StageModule::snapshot_refusals, the new
public pipeline::SnapshotRefusal): Branch, Derivative, Sample,
GroupOperation, Store, Atomic, ImageWrite, UndefinedOperand, WritesMemory,
Interlock, Coherent, Other (a slot past 127, values that do not settle, a
ray query, a mesh output count, an unmatched call, the entry's returned
value). The walk now runs also in a function that writes memory or a module
with an interlock or coherent resource, so such a slot is stated with the
per-value clauses too; its slots stay left out as before. A snapshot variant
judges none. ARTIFACT_FORMAT_VERSION 494 (two encoded fields, one enum),
SEMANTICS_VERSION 1996 (a new interface fact).

Runtime: a draw split for UnreadableOwnPixel is counted once under each
clause that leaves out any of its unreadable attached slots
(WorkCounts::reading_draws_split_unreadable_own_pixel_{branch, derivative,
sample, group_operation, store, atomic, image_write, undefined_operand,
writes_memory, interlock, coherent, other}), and the log names the clauses,
once a device per set.

Tests:
- spirv::requirements::snapshot::tests::only_values_no_helper_can_pass_on_qualify:
  every sink states its one clause, with new sinks for a quad swap, a
  storage-buffer store, an atomic, an image write and a coherent image.
- spirv::requirements::snapshot::tests::a_slot_left_out_by_the_function_or_its_index_says_so:
  WritesMemory alone and beside a derivative; slot 200 Other beside slot 0
  qualifying.
- pipeline::compile::tests::the_interface_states_why_a_slot_takes_no_snapshot:
  owned fixture sd_read_discarding on the 780M's profile states none, and
  Branch alone with shaderDemoteToHelperInvocation withheld; tob_read none;
  the render pipeline's fragment stage the same.
- runtime_lane::snapshot_reads::a_reader_that_ends_itself_by_its_texel_takes_the_split_for_its_branch
  (device): the discarding reader with demote withheld: 3 * FILL, two
  splits, two unreadable own-pixel splits, both under branch alone.

api_signatures blessed (26 records); api_surface row for SnapshotRefusal;
docs/API.md's snapshot reads name snapshot_refusals.

(cherry picked from commit 4412816cc23ede42b266ad4d2c62465711853d83)
2026-11-08 18:29:23 -08:00
..