Files
metal2vulkan/scripts
Anees Iqbal a8af53b32a Answer supportsPullModelInterpolation and refuse sample reads at custom positions
The runtime had no answer for supportsPullModelInterpolation (the M3 Max, a
Radeon Pro 5300M and a UHD 630 answer 1), so the consumer passed none.

- DeviceProperties::supports_pull_model_interpolation (Query::
  PullModelInterpolation) answers yes where the compile layer lowers every
  interpolation function: DeviceProfile::interpolation_function_needs is
  empty (sampleRateShading, and MoltenVK's
  shaderSampleRateInterpolationFunctions), the same predicate the lowering
  refuses by.
- A draw at custom sample positions through a pipeline whose fragment
  function reads an interpolant at a sample
  (GraphicsState::interpolates_at_sample) is refused
  NotImplemented(RuntimeGap::InterpolateAtSampleWithPositions) in
  settle_draw, which direct and indirect-command draws share: Vulkan takes
  no InterpolateAtSample in a pipeline made with custom sample locations
  (VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524), and
  Metal's answer there is not measured.

Tests:
- runtime tests::capabilities: every committed profile answers from the
  enabled features; every venue (moltenvk-m3, both lavapipe gates, 780M
  RADV, both ANV, RTX 5080) answers yes; vk12-floor no; moltenvk-m3 without
  the portability member no; every query answers on moltenvk-m3.
- validation runtime_lane::pull_model_interpolation (--cfg m2v_gpu or
  m2v_cpu_icd): the probe's lane draws (one triangle of w 1, 2, 4 over 6x6,
  at 1 and 4 samples: center, centroid, each sample, sample_id, five
  offsets, the float2/float/half and half4 interpolants) against Metal's
  reading pull_model_interpolation_m3_max.txt, every sample's coverage
  equal; word for word where the profile takes MetalInterpolation, else
  within the device's interpolation plus the location Vulkan leaves to it;
  the offset pipelines alone record DeviceInterpolationOffset and require
  the device's origin property. A pm_sample draw at custom positions is
  refused; a pm_offset draw there runs.

Verified on the M3 Max (MoltenVK 1.4.2, macOS 27.0.1) through the Mac GPU
lock: 25 draws, 14 samples at 1x and 55 at 4x each, every word Metal's
(most apart 0); the refusal and the offset draw at custom positions as
stated. Negative control: the MoltenVK origin set to 1/2 put every offset
draw 0.06 to 0.11 off Metal's. Not run on lavapipe here (no container
runtime up); CI's lavapipe lane runs it. Runtime capabilities, degradation
and families tests 47/47; clippy all features and --cfg m2v_gpu.

(cherry picked from commit e9f45f7c85309ba6d1e6bc57f3b10fd47585893e)
2026-11-01 23:38:39 -08:00
..