Skip to content

macOS OOP content pass: _SRGB clients render one decode too dark (pre-existing, ADR-044 §7) #1800

Description

@dfattal

macOS out-of-process (IPC / workspace) content pass: an _SRGB client is one decode too dark. Pre-existing: reproduces on v2.22.2 too, so it is not a #1799 regression. Found during the ADR-044 §7 Mac test (tmp-adr044-mac-colour).

Measured (mac box, sim_display, cube_handle_vk_macos through the workspace)

Mean luminance of the brightest 20k atlas pixels (pre-weave):

client swapchain luminance
_SRGB (43, the default) 61 (v2.22.2: 66)
UNORM (37, DXR_SWAPCHAIN_ENCODING=unorm) 131
131 decoded once ≈57, i.e. the _SRGB client is decoded and never re-encoded

Cause

comp_multi_content_blend_draw samples the client view as its declared format (43, so the hardware decodes) into the B8G8R8A8_UNORM (44) shared-atlas render target, with no re-encode.

Fix direction

Render the content pass through the same _SRGB atlas view that #1799 adds for the workspace decorations (the atlas is now MUTABLE_FORMAT with its _SRGB sibling). Each client is then sampled as declared, blended in linear light and encoded once.

Compatibility, ADR-044 "apps first": a UNORM client holding encoded bytes currently passes through unchanged and would come out one encode lighter. Before changing it, audit which macOS clients still submit UNORM:

  • the demos are on common v2.27.0 now;
  • the runtime test apps;
  • cube_*_macos;
  • anything else.

Verification

Same atlas dump as the #1799 test. An _SRGB client should read its authored bytes (≈131 here), matching the UNORM-with-encoded-bytes reading today.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions