Files
metal2vulkan/scripts
Anees Iqbal 1c307b4608 Runtime: a pass rasterizes at the sample positions its descriptor sets, through VK_EXT_sample_locations
L168: a pass's custom sample positions were dropped while the guest could be told they are
supported, so a non-default set rendered at the standard positions with no refusal.

What changed:
- VK_EXT_sample_locations joins the floor's OPTIONAL_EXTENSIONS (enabled where listed; it has no
  feature). Device::programmable_sample_positions_supported (programmableSamplePositionsSupported)
  is true where the device lists it with locations at every sample count above 1 it renders, a
  1 x 1 grid, every sixteenth from 0 to 15/16 and variableSampleLocations; false elsewhere. No
  second form: a device that answers no refuses positions other than the defaults.
- RenderPassDescriptor::sample_positions is checked as the pass begins (crate::positions): each
  coordinate is taken to the nearest sixteenth, a tie up, at most 15/16, and each sample past the
  positions given at the pixel's corner, as the conformance suite's sample_positions rows measured
  an Apple M4. A set that comes to Vulkan's standard locations (Metal's defaults at 1, 2 and 4
  samples) rasterizes as an empty one on every device.
- Refusal::SamplePositions (Count, Coordinate, OneSample, Unsupported) where Metal's validation
  stops the descriptor or the device answers no. Gap::RenderPass of SamplePositions for other
  positions beside a depth attachment (Vulkan needs a sample-locations-compatible depth image whose
  layout transitions name the last locations) or at a count the device's locations lack.
  Gap::Draw of SamplePositions for a draw in such a pass whose fragment module uses
  InterpolateAtSample (VUID-01524), read from the translator's GraphicsState.
- A draw in such a pass takes a VkPipeline of its class made with sampleLocationsEnable and the
  locations as dynamic state (Raster::positions), one pipeline for every set; the encoder records
  vkCmdSetSampleLocationsEXT before the pass's first draw. Every coordinate handed to Vulkan is a
  sixteenth in [0, 15/16], which Vulkan's required 4 sub-pixel bits hold exactly, so no precision
  note.
- The translator's description of a device that enables the extension states it
  (floor::shader_extension), as for every extension creation enables that the translator names;
  the translator reads none of its properties. tests::translator_fields gives
  GraphicsState::interpolates_at_sample its verdict (refused at custom positions).
- The conformance rt side passes a case's positions to the runtime; the replay player sets them on
  the runtime's descriptor and drops its count of passes at other positions (docs/REPLAY-STREAM.md
  says so).
- README (floor table, the device's answers, the known gap rewritten), REFUSALS.md and basis.rs,
  api_signatures.tsv, METAL-COVERAGE.md and CONFORMANCE-COVERAGE.md regenerated.

Tests: the device test every_device_rasterizes_a_pass_at_its_sample_positions now gates on the
device's answer and holds the answer to the extension's properties; new device tests
every_device_refuses_the_positions_metal_refuses and
a_draw_that_interpolates_at_a_sample_is_refused_at_custom_positions; new device-free tests
(placed::) of the answer's gates (each count above 1 the device renders in
sampleLocationSampleCounts, a 1 x 1 grid, a range holding 15/16, 4 sub-pixel bits, variable
locations) and of the placement (every coordinate in [0, 1) on a sixteenth from 0 to 15/16,
refusals, the corner, the standard sets, the count and depth gaps); the replay device test
sample_positions_play_through_the_runtime_s_descriptor. Verification: the lane's jobs, named in
the ledger commit that follows.
2026-12-02 08:39:10 -08:00
..