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.
macOS out-of-process (IPC / workspace) content pass: an
_SRGBclient 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_macosthrough the workspace)Mean luminance of the brightest 20k atlas pixels (pre-weave):
_SRGB(43, the default)DXR_SWAPCHAIN_ENCODING=unorm)_SRGBclient is decoded and never re-encodedCause
comp_multi_content_blend_drawsamples 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
_SRGBatlas view that #1799 adds for the workspace decorations (the atlas is nowMUTABLE_FORMATwith its_SRGBsibling). 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:
cube_*_macos;Verification
Same atlas dump as the #1799 test. An
_SRGBclient should read its authored bytes (≈131 here), matching the UNORM-with-encoded-bytes reading today.