Files
metal2vulkan/docs
Anees Iqbal 1b97a620c8 rt: set 1 and index grants
Every pipeline of the new runtime takes set 1, one descriptor set the device makes at creation:
65,536 sampled textures (binding 0), 4,096 storage-capable textures (binding 1) and 4,000
samplers of each use, plain, depth comparison and integer texture (bindings 2, 3 and 4), each
partially bound, updated after bind and while unused elements are pending, seen by every stage.
Set 0 is empty. The pipeline layout is made once from it, in Device::new, and every pipeline and
dispatch uses that layout.

Every element no object owns is defined: a texture element is a null descriptor
(VK_EXT_robustness2 nullDescriptor, which joins the floor; the robust buffer and image access
beside it stay off), and a sampler element is its array's default sampler, nearest and clamped to
the edge, the comparison array's comparing with NEVER. The device writes every element at
creation and holds the two default VkSamplers (Gauges::device_samplers). The translator is told
of VK_EXT_robustness2, so its profile has nullDescriptor.

Device::grant_indices(class, first, count) grants the consumer the range it names, so the IDs it
picks reproduce in replay: storage-capable textures 1 to 4,095, other textures 4,096 to 65,535,
samplers 1 to 3,999, 0 nil and never granted (IndexClass, IndexGrant). Limit::IndexRange,
Refusal::IndicesGranted and Refusal::IndicesNotGranted, with Basis lines; docs/REFUSALS.md
regenerated. The floor's sampler limits are now three arrays' (12,000 samplers per stage and set,
81,632 update-after-bind descriptors in all pools). README: "Set 1 and index grants", and the
floor's extension, feature and limit rows.

Device::new output is unchanged: no translator source changes.

Verified:
- m3-max-42273 (msi): clippy -p metal2vulkan-rt --all-targets --all-features, plain, --cfg
  m2v_gpu and --cfg m2v_cpu_icd, green; rustdoc -D warnings green; rt tests 33/33; every device
  test on lavapipe with the Khronos validation layer, 0 validation errors; making a second set 1
  takes 106 ms there. refusal_surface.py --check clean.
- m3-max-42305 (Radeon 780M, RADV, gem10) and m3-max-42306 (RTX 3090, um870), validation layer
  on: every device test passes with 0 validation errors, gauges zero at drop; a second set 1
  takes 15.1 ms on the 780M and 4.6 ms on the 3090. The three tests that read the source tree
  fail on those nodes only because the carried archive names msi's paths; they pass on msi.
2026-11-17 13:23:55 -08:00
..
2026-11-17 13:23:55 -08:00