Skip to content

Dithering breaks the uniform-image assumption in two GPU luminance cutoff tests #3780

Done

Description

@lostwald

After main commit 56d1cc28 (#3509), default Metal-enabled cargo xtask ci fails in crates/gpu/tests/it/equivalence.rs:56: v3_luminance_cutoff_chroma_2 and v3_luminance_cutoff_chroma_4 both assert that every output pixel equals the first pixel. Ordered dithering now intentionally produces spatial variation for a uniform input.

Environment: Apple M2 / Metal, macOS 27.2 aarch64, rustc 1.95.0, craft-fonts enabled. These files and the pipeline were unchanged from upstream main in the run (the only working-tree change was the unrelated web serialization test fix tracked in #3778).

The tests need to accommodate the intended dither pattern while retaining per-pixel colour and CPU/GPU bounds. Do not disable the GPU or skip the regressions. This is separate from #3778 and the persistent face-ignore work in #3757; no production or cutoff-test changes are included in those fixes.

Activity

  1. added
    bug
    on Nov 5, 2026
  2. ticket-craft commented on Nov 5, 2026

    @ticket-craft

    Possibly related: #3778 and #479.

  3. radialmonster commented on Nov 7, 2026

    @radialmonster
    Contributor

    Fixed as of v0.19.0 by #3789.

    v3_luminance_cutoff_chroma_2 and v3_luminance_cutoff_chroma_4 no longer expect every pixel of the flat source to equal the first one. They now allow the one-level spread the ordered dither from #3509 adds, and they still check each pixel against the expected colour and the CPU against the GPU within one level (crates/gpu/tests/it/equivalence.rs). The same PR fixes the mask geometry GPU test, which was counting dither as the mask's effect. The PR was verified on Vulkan only; the assertion is the same on every backend, but a Metal run of cargo xtask ci on your M2 would confirm it.

    If this solves it, please close the issue, thanks! If not, feel free to reply with more.

  4. FredApps commented on Dec 3, 2026

    @FredApps
    Contributor

    Fixed by #3789, first released in https://github.com/storytold/lightcraft/releases/tag/v0.19.0. If you still see this on the latest release, please comment with details (Help > System Info and the steps) and it can be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmacospriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions