Files
metal2vulkan/tests
Anees Iqbal 1b119af370 Pin the two unsupported classes that actually turn up
`tests/must_fallback.rs` exists so a refactor cannot quietly turn a clean FALLBACK into SPIR-V that
"succeeds" with garbage, and it covered the classes that were easy to name: raytracing intrinsics,
emask intrinsics, texture atomics, malformed modules. It did not cover either of the two classes
that account for almost every real rejection.

Measured over the 2880-source local corpus sample: 204 sources do not translate, and 191 are one of
two shapes -- a call through a Metal visible function table (136) and an intersection whose custom
intersection functions come from a function buffer (about 55). Both are function pointers, which
Logical SPIR-V does not have, so neither is a lowering waiting to be written; the only way they can
change is by becoming wrong. Each is now an authored kernel in the negative suite, and each was
checked to produce the same diagnostic the corpus sources produce, through the public
`translate_sanitized_native` path rather than a component entry point:

    unsupported indirect call through function pointer %fp (Metal visible function table)
    unhandled air.* intrinsic: air.intersect.intersection_function_buffer.triangle_data

Both inputs are authored, not extracted: the `HEAD`/`TAIL` template already in that file with one
construct injected, so the rejection is attributable to the construct and to nothing else --
`base_kernel_translates` is the anchor for that. `kernel_with_declarations` is the only new
scaffolding, for the two cases whose callee needs declaring.

The `intersection_function_buffer` tag suffix is a combinatorial family -- the corpus alone has
`instancing`, `triangle_data`, `world_space_data`, `user_data`, `primitive_motion`,
`instance_motion` and `multi_level_instancing` in about twenty combinations. The rejection is on the
`intersection_function_buffer` stem rather than on any one combination, so one of them stands for
all of them and the test says so.

Tests only; no product code changed. Full gate green.
2026-08-31 19:33:18 +03:00
..
2026-07-22 13:15:24 +03:00