Files
metal2vulkan/crates
Anees Iqbal cbcf4e7888 SEMANTICS_VERSION 2090: a shader's uint2 rasterization-rate map overloads compile to Metal's decoder
The two commits before this one: canon compiles the uint2 overloads of map_screen_to_physical_
coordinates and map_physical_to_screen_coordinates beside the float2 ones, reusing the float2
decoder. Screen to physical is the float2 answer at the pixel's centre, converted to uint
(saturating, NaN 0); physical to screen is the bits of the float (0 - offset) * reciprocal of the
entry of granule c >> 5, as an Apple M3 Max answers (the coordinate's place inside its granule is
not read). The maths is the device's float (owner rule 1), under the existing denormals note. A
table entry's boundary byte is compared on its low seven bits, as Metal does, for float2 too.
Until now a fragment or kernel using the uint2 forms was refused Unsupported{RasterizationRateMap,
NotImplemented}, where Metal makes it (the consumer's Modern Rendering sample's light-heatmap
pipeline). Translator output changes (SEMANTICS); docs/REFUSALS.md is regenerated.

Verified by heapchunk's runs: the M3 probe rate_map_integer_overloads (m3-max-25539, macOS
27.0.1): 20,114 coordinates over 4 maps, at each map's layers and two past them, every one
matching both formulas; 1,561 of those answers kept as test vectors (Metal's answers to our probe
on our maps). At 247e8b66b2 (25640): metal2vulkan-air rate_map 7/7, metal2vulkan 54/54
(bind::rate_map, engine_rate_map with the integer tests, public_fixtures_engine::llvm_as,
engine_refused_families, refusal_surface); the translated kernel in the interpreter equals the
M3's recorded answers at all 587 points on the maps' own layers on 4 profiles. Negative control:
without the seven-bit mask 2 of the 1,561 answers differ. clippy plain, m2v_gpu and m2v_cpu_icd
and rustdoc clean (25607, the same diff before the rebase). Release: the uint2 kernel 0.24 s cold,
about 32 MiB, on moltenvk-m3. The fixture's two .air.ll rows (macOS-only metal-as) run at the
next pin's checks.
2026-11-13 08:32:31 -08:00
..