Files
metal2vulkan/docs
Anees Iqbal ded385b661 YCbCr textures: announce the device's conversion at the first conversion; the lanes read in-place samples as Metal's
On the Radeon 780M, which converts the 4:2:0 formats itself and reads their planes in place, the
ycbcr lanes failed 9 of 48 at this branch (um870 m3-max-8383) and 17 of 48 at development's tip
(gem10 m3-max-8421), the same 9 among them. Two causes:

- A texture whose conversion is the device's announced ycbcr-filter-not-exact as it was made,
  though a texture whose planes every function reads in place never converts and so never reads
  the device's conversion (a_ycbcr_texture_sampled_and_gathered_by_one_function_reads_its_planes_in_place,
  a_ycbcr_sample_through_an_unmeasured_filter_is_announced). Converts::new now announces it at
  the texture's first conversion. WorkCounts::ycbcr_device_conversions still counts the texture
  as it is made, so a lane can tell before a read that the texture's image holds the device's
  conversion. The lanes' notice predicates now take a conversion that ran,
  WorkCounts::ycbcr_device_samples (device_samples), in place of the textures made.
- The lanes held the samples of a texture whose planes are read in place to its image's texels,
  the device's conversion on such a device, where a function reading the planes converts the codes
  itself: Metal's conversion and filter under the lane's exact_answers (YCbCrInPlacePolicy::Exact),
  as ycbcr.rs states. Texels::sampled takes Metal's steps of the codes (modelled) for a texture read
  in place and the image's texels elsewhere, in a_linear_sample_of_a_ycbcr_texture_is_metals,
  a_linear_sample_is_metals_through_each_sampler_and_result and its fragment twin,
  a_ycbcr_slot_takes_the_devices_filter_in_the_pipeline_its_creation_made and
  ycbcr_textures_read_the_texels_metal_converts; a_draw_samples_the_planes_as_written_before_it
  holds a draw read in place to Metal's conversion of the uniform codes.

four_two_two_and_four_four_four_codes_read_what_metal_reads also held a code twin over a surface
whose chroma plane it does not fit in to Metal's codes where the device reconstructs them itself:
it now takes the device's codes there, as the test's other surfaces do.

Docs: the ycbcr.rs and ycbcr_device.rs module docs, Degradation::YCbCrFilterNotExact and its
docs/API.md catalogue entry say the notice comes at the first conversion.

Verified: cargo fmt; the 780M runs on um870 and gem10 follow.
(cherry picked from commit c498f9383a3f4a2ef3f267a135ea5494aa8fb5e4)
2026-11-08 06:29:49 -08:00
..