present_compose: fix premultiplied sRGB and additive alpha plane 1 decoding #2508

Merged
lixonik merged 2 commits from upstream-pr/2508 into main 2026-11-29 08:20:13 +00:00
lixonik commented 2026-11-27 21:35:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-27T21:35:25Z.


Summary

Fixes two alpha-decoding bugs in the PresentX composition shader (runtime/src/present_compose.comp + regenerated runtime/src/present_compose.inc) for premultiplied plane 1 overlays:

  1. Premultiplied *_UNORM_SRGB plane 1 overlays (flag_srgb_source != 0, flag_straight_alpha == 0, !opaque):
    An *_UNORM_SRGB render target blends in linear light and sRGB-encodes the premultiplied RGB on write, so texelFetch already returns linear premultiplied RGB. Previously fetch_texel re-encoded c.rgb with srgb_encode, divided the encoded value by linear alpha (srgb_encode(0.5) / 0.5 = 1.471), decoded it back (2.426), and multiplied by alpha (1.213), clipping translucent 50% and 25% white UI overlays to solid white (255 instead of 188 and 137).

    • Under piecewise sRGB (pc.sdr_eotf == 0u), fetch_texel now returns max(c.rgb, 0.0) directly without re-encoding or dividing by alpha.
    • Under gamma 2.2 (pc.sdr_eotf == 1u), fetch_texel splits continuously into the [0, a] unassociated sRGB component (preserving stored-byte identity for opaque pixels and avoiding 8-bit sRGB quantization jumps at lin ~= a) plus any additive excess max(lin - a, 0.0).
    • Straight-alpha *_UNORM_SRGB overlays (flag_straight_alpha != 0) and opaque *_UNORM_SRGB plane 0 are unchanged.
  2. Additive premultiplied pixels (rgb > 0, a == 0) on plane 1:
    Previously fetch_texel returned vec4(0.0) whenever a == 0.0 (and to_working returned vec3(0.0) when plane_hdr && !out_hdr && a <= 0.0), discarding additive premultiplied glow/UI pixels even though present_compose.comp explicitly notes additive premultiplied colour support.

    • Premultiplied UNORM (SDR and HDR10) and *_UNORM_SRGB planes now decode e / preserve lin when a == 0.0, while transparent black (0, 0, 0, 0) and straight-alpha a == 0 pixels still contribute zero light.
    • to_working now tone-maps HDR10 additive emission when a <= 0.0 instead of zeroing it.

Updated docs/d3d12_vulkan.md section 4.5 to document both rules.

SPIR-V generator note (runtime/src/present_compose.inc)

main's present_compose.inc was compiled with glslc --target-env=vulkan1.1 -O -mfmt=c (shaderc generator word 0x000d000b, ID bound 0xbb3). Because glslc is not installed locally, present_compose.inc in this PR was regenerated from present_compose.comp using glslang -V --target-env vulkan1.1 (glslang generator word 0x0008000b, ID bound 0x35f, SPIR-V 1.3, 5041 words), which accounts for the full-file .inc diff.

Verification

  • Negative control (new test cases on unpatched main 39f52f39c): xbox_present_test failed immediately at C2b with pixel 0,0 is 255,255,255, expected 188,188,188 on a 50% premultiplied R8G8B8A8_UNORM_SRGB overlay over black.
  • With this PR:
    • All existing and new compose cases in xbox_present_test pass on RTX 5070: premultiplied and straight *_UNORM_SRGB overlays under piecewise sRGB and gamma 2.2 (50% -> 188/186, 25% -> 137, opaque gamma 2.2 byte-20 identity), additive premultiplied a == 0 for sRGB, UNORM, and HDR10 (PQ and SDR tone-map), plus transparent-black and straight-alpha a == 0 invariants.
    • Note: on NVIDIA RTX 5070, main (39f52f39c) has a pre-existing resize-readback failure later in xbox_present case F (9f98dcc61 regression, fixed separately in #2507). With #2507 applied alongside this PR, ctest --output-on-failure -R ^xbox_present$ passes 1/1 (2.78 s).
    • python -I scripts/check_no_game_data.py on all 4 changed files: pass.
    • python -I tests/test_ctest_registration.py -v: pass (6/6).
    • git diff --check: clean; git merge-tree clean against open PRs #2001, #2014, and #2507.

Claimed in https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7228468595 (RT-PICTURE-2D-LAYERS). No game files used.

GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341; VK_LAYER_KHRONOS_validation and spirv-val not installed locally).
AI-assisted (Antigravity, Gemini).

Independent Vulkan validation passed the composition assertions on RTX 3080 and the full test, including the HDR-to-SDR additive edge, on AMD Radeon integrated graphics. The RTX 3080 full run passed with #2507 applied for swapchain resize. Test report.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5533376904 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-27T21:35:25Z. --- ## Summary Fixes two alpha-decoding bugs in the PresentX composition shader (`runtime/src/present_compose.comp` + regenerated `runtime/src/present_compose.inc`) for premultiplied plane 1 overlays: 1. **Premultiplied `*_UNORM_SRGB` plane 1 overlays (`flag_srgb_source != 0`, `flag_straight_alpha == 0`, `!opaque`):** An `*_UNORM_SRGB` render target blends in linear light and sRGB-encodes the premultiplied RGB on write, so `texelFetch` already returns linear premultiplied RGB. Previously `fetch_texel` re-encoded `c.rgb` with `srgb_encode`, divided the *encoded* value by linear alpha (`srgb_encode(0.5) / 0.5 = 1.471`), decoded it back (`2.426`), and multiplied by alpha (`1.213`), clipping translucent 50% and 25% white UI overlays to solid white (`255` instead of `188` and `137`). - Under piecewise sRGB (`pc.sdr_eotf == 0u`), `fetch_texel` now returns `max(c.rgb, 0.0)` directly without re-encoding or dividing by alpha. - Under gamma 2.2 (`pc.sdr_eotf == 1u`), `fetch_texel` splits continuously into the `[0, a]` unassociated sRGB component (preserving stored-byte identity for opaque pixels and avoiding 8-bit sRGB quantization jumps at `lin ~= a`) plus any additive excess `max(lin - a, 0.0)`. - Straight-alpha `*_UNORM_SRGB` overlays (`flag_straight_alpha != 0`) and opaque `*_UNORM_SRGB` plane 0 are unchanged. 2. **Additive premultiplied pixels (`rgb > 0, a == 0`) on plane 1:** Previously `fetch_texel` returned `vec4(0.0)` whenever `a == 0.0` (and `to_working` returned `vec3(0.0)` when `plane_hdr && !out_hdr && a <= 0.0`), discarding additive premultiplied glow/UI pixels even though `present_compose.comp` explicitly notes additive premultiplied colour support. - Premultiplied UNORM (SDR and HDR10) and `*_UNORM_SRGB` planes now decode `e` / preserve `lin` when `a == 0.0`, while transparent black `(0, 0, 0, 0)` and straight-alpha `a == 0` pixels still contribute zero light. - `to_working` now tone-maps HDR10 additive emission when `a <= 0.0` instead of zeroing it. Updated `docs/d3d12_vulkan.md` section 4.5 to document both rules. ### SPIR-V generator note (`runtime/src/present_compose.inc`) `main`'s `present_compose.inc` was compiled with `glslc --target-env=vulkan1.1 -O -mfmt=c` (shaderc generator word `0x000d000b`, ID bound `0xbb3`). Because `glslc` is not installed locally, `present_compose.inc` in this PR was regenerated from `present_compose.comp` using `glslang -V --target-env vulkan1.1` (glslang generator word `0x0008000b`, ID bound `0x35f`, SPIR-V 1.3, 5041 words), which accounts for the full-file `.inc` diff. ## Verification - **Negative control (new test cases on unpatched `main` `39f52f39c`):** `xbox_present_test` failed immediately at C2b with `pixel 0,0 is 255,255,255, expected 188,188,188` on a 50% premultiplied `R8G8B8A8_UNORM_SRGB` overlay over black. - **With this PR:** - All existing and new compose cases in `xbox_present_test` pass on RTX 5070: premultiplied and straight `*_UNORM_SRGB` overlays under piecewise sRGB and gamma 2.2 (50% -> 188/186, 25% -> 137, opaque gamma 2.2 byte-20 identity), additive premultiplied `a == 0` for sRGB, UNORM, and HDR10 (PQ and SDR tone-map), plus transparent-black and straight-alpha `a == 0` invariants. - Note: on NVIDIA RTX 5070, `main` (`39f52f39c`) has a pre-existing resize-readback failure later in `xbox_present` case F (`9f98dcc61` regression, fixed separately in #2507). With #2507 applied alongside this PR, `ctest --output-on-failure -R ^xbox_present$` passes 1/1 (2.78 s). - `python -I scripts/check_no_game_data.py` on all 4 changed files: pass. - `python -I tests/test_ctest_registration.py -v`: pass (6/6). - `git diff --check`: clean; `git merge-tree` clean against open PRs #2001, #2014, and #2507. Claimed in https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7228468595 (`RT-PICTURE-2D-LAYERS`). No game files used. GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341; `VK_LAYER_KHRONOS_validation` and `spirv-val` not installed locally). AI-assisted (Antigravity, Gemini). Independent Vulkan validation passed the composition assertions on RTX 3080 and the full test, including the HDR-to-SDR additive edge, on AMD Radeon integrated graphics. The RTX 3080 full run passed with #2507 applied for swapchain resize. [Test report](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7245232618).
timbot103 commented 2026-11-28 00:53:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T00:53:27Z.


Independently checked head ef5620bf6 on Windows 11 Pro 26200, MSVC 2022 (19.44.35230.0, RelWithDebInfo, Ninja), Vulkan SDK 1.4.363.0, no game files.

Local build & dual-GPU verification (xbox_present_test, LEONIDA_PRESENT_PLANE1=0, LEONIDA_VK_VALIDATION=1):

  • Clean MSVC build of xbox_present_test.
  • AMD Radeon(TM) Graphics (25.10.30.02): xbox_present_test: all cases pass (exit 0, 0 validation errors), including all new PR cases:
    • compose: premultiplied and straight *_UNORM_SRGB plane 1 overlays: ok
    • compose: additive premultiplied (a == 0) sRGB and UNORM plane 1 overlays: ok
    • compose: HDR10 plane 1 additive premultiplied (a == 0) over SDR plane 0: ok
  • NVIDIA GeForce RTX 5080 (616.64): all compose cases above passed (0 validation errors); the later swapchain resize step failed at line 1304: present_planes(&one, 1) (VkResult -11), which also reproduces identically on #2503 (unrelated to this PR).

Code review notes:

  • The GLSL math in runtime/src/present_compose.comp (avoiding encode+divide on premultiplied *_UNORM_SRGB planes, splitting [0, a] vs additive excess under gamma 2.2, decoding e directly when a == 0 for UNORM/HDR10 additive pixels, and to_working handling a <= 0 on HDR→SDR tone mapping) and the new pixel tests in xbox_present_test.cpp look sound.
  • One change requested on runtime/src/present_compose.inc: the embedded SPIR-V generator word changed from 0x000d000b (tool 13, shaderc/glslc) to 0x0008000b (tool 8, glslangValidator) and the ID bound dropped from 0xbb3 to 0x35f, producing a ~2,800-line .inc diff that can't easily be diff-reviewed against the GLSL change. Regenerating present_compose.inc with the repo's usual compiler/flags (or noting the generator switch in the PR description) would make the SPIR-V diff much cleaner to audit.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7231266477 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7231266477). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T00:53:27Z. --- Independently checked head `ef5620bf6` on Windows 11 Pro 26200, MSVC 2022 (`19.44.35230.0`, RelWithDebInfo, Ninja), Vulkan SDK `1.4.363.0`, no game files. **Local build & dual-GPU verification (`xbox_present_test`, `LEONIDA_PRESENT_PLANE1=0`, `LEONIDA_VK_VALIDATION=1`):** - Clean MSVC build of `xbox_present_test`. - **AMD Radeon(TM) Graphics** (`25.10.30.02`): **`xbox_present_test: all cases pass`** (exit 0, 0 validation errors), including all new PR cases: - `compose: premultiplied and straight *_UNORM_SRGB plane 1 overlays: ok` - `compose: additive premultiplied (a == 0) sRGB and UNORM plane 1 overlays: ok` - `compose: HDR10 plane 1 additive premultiplied (a == 0) over SDR plane 0: ok` - **NVIDIA GeForce RTX 5080** (`616.64`): all compose cases above **passed** (0 validation errors); the later swapchain resize step failed at `line 1304: present_planes(&one, 1)` (`VkResult -11`), which also reproduces identically on `#2503` (unrelated to this PR). **Code review notes:** - The GLSL math in `runtime/src/present_compose.comp` (avoiding encode+divide on premultiplied `*_UNORM_SRGB` planes, splitting `[0, a]` vs additive excess under gamma 2.2, decoding `e` directly when `a == 0` for UNORM/HDR10 additive pixels, and `to_working` handling `a <= 0` on HDR→SDR tone mapping) and the new pixel tests in `xbox_present_test.cpp` look sound. - **One change requested on `runtime/src/present_compose.inc`:** the embedded SPIR-V generator word changed from `0x000d000b` (tool 13, shaderc/`glslc`) to `0x0008000b` (tool 8, `glslangValidator`) and the ID bound dropped from `0xbb3` to `0x35f`, producing a ~2,800-line `.inc` diff that can't easily be diff-reviewed against the GLSL change. Regenerating `present_compose.inc` with the repo's usual compiler/flags (or noting the generator switch in the PR description) would make the SPIR-V diff much cleaner to audit. AI-assisted.
akimfomin commented 2026-11-28 01:25:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by akimfomin on 2026-11-28T01:25:18Z.


Vice-Tay #370 isolates the transfer-function portion: an sRGB view reading a midpoint returned about 0.21582 rather than the raw 0.50196. That provides a simple full-alpha control for the sRGB path here. Then run the exact RGB/alpha pair at half alpha against the premultiplied path and retain a linear-format control. This would distinguish a transfer-function fix from applying the alpha correction twice.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7231654057 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7231654057). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-28T01:25:18Z. --- [Vice-Tay #370](https://github.com/TaynanGT/Vice-Tay/pull/370) isolates the transfer-function portion: an sRGB view reading a midpoint returned about 0.21582 rather than the raw 0.50196. That provides a simple full-alpha control for the sRGB path here. Then run the exact RGB/alpha pair at half alpha against the premultiplied path and retain a linear-format control. This would distinguish a transfer-function fix from applying the alpha correction twice.
lixonik commented 2026-11-28 08:17:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T08:17:04Z.


@timbot103 Thanks for the dual-GPU + validation verification! glslc is not installed locally here (only glslang), so I updated the PR description with a dedicated SPIR-V generator note explicitly documenting the generator switch from 0x000d000b (shaderc/glslc, ID bound 0xbb3) to 0x0008000b (glslang -V --target-env vulkan1.1, ID bound 0x35f, 5041 words).

@akimfomin Good check -- xbox_present_test.cpp covers those controls side by side:

  • Full-alpha *_UNORM_SRGB controls: opaque srgb plane 0 (0.5 linear -> byte 188) and opaque dark_opaque (a = 1.0, byte 20) on plane 1 under gamma22.
  • Half-alpha premultiplied *_UNORM_SRGB ({0.5, 0.5, 0.5, 0.5} -> 188/186) vs straight-alpha *_UNORM_SRGB ({1.0, 1.0, 1.0, 0.5} -> 188/186).
  • Linear-format (R8G8B8A8_UNORM) premultiplied control (half_white {128, 128, 128, 128} -> 188/186 right above in C2).

AI-assisted (Antigravity, Gemini).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7236482967 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7236482967). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-28T08:17:04Z. --- @timbot103 Thanks for the dual-GPU + validation verification! `glslc` is not installed locally here (only `glslang`), so I updated the PR description with a dedicated **SPIR-V generator note** explicitly documenting the generator switch from `0x000d000b` (shaderc/`glslc`, ID bound `0xbb3`) to `0x0008000b` (`glslang -V --target-env vulkan1.1`, ID bound `0x35f`, 5041 words). @akimfomin Good check -- `xbox_present_test.cpp` covers those controls side by side: - Full-alpha `*_UNORM_SRGB` controls: opaque `srgb` plane 0 (`0.5` linear -> byte `188`) and opaque `dark_opaque` (`a = 1.0`, byte `20`) on plane 1 under `gamma22`. - Half-alpha premultiplied `*_UNORM_SRGB` (`{0.5, 0.5, 0.5, 0.5}` -> `188`/`186`) vs straight-alpha `*_UNORM_SRGB` (`{1.0, 1.0, 1.0, 0.5}` -> `188`/`186`). - Linear-format (`R8G8B8A8_UNORM`) premultiplied control (`half_white` `{128, 128, 128, 128}` -> `188`/`186` right above in C2). AI-assisted (Antigravity, Gemini).
timbot103 commented 2026-11-28 14:36:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T14:36:31Z.

Review: COMMENTED


Static code audit against ef5620bf6 and ec740bcc3. The embedded SPIR-V matches an in-memory glslang compile byte for byte and passes Vulkan 1.1, 1.2, and 1.3 validation. The new uniform overlay expectations agree with the hand calculations.

  • runtime/src/present_compose.comp:153 — Please preserve additive HDR light separately through bilinear filtering and SDR tone mapping. With 203-nit white and a 1000-nit peak, the 100-nit zero-alpha grey from C4 gives byte 186 over black. Mixing in just 2.5% opaque black gives about byte 45 because the shader divides the additive light by the filtered alpha before tone mapping. Weighting the additive contribution gives about byte 184. A mixed-texel C4 case would catch the resulting dark seam.
  • runtime/src/present_compose.comp:100 — C2b's UNORM red code 188 over grey 64 gives red byte 196 at alpha code 0 and clips to 255 at alpha code 1. Please handle the encoded additive excess independently of coverage and test those adjacent alpha codes.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6098418534 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#pullrequestreview-6098418534). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T14:36:31Z. **Review:** COMMENTED --- Static code audit against `ef5620bf6` and `ec740bcc3`. The embedded SPIR-V matches an in-memory glslang compile byte for byte and passes Vulkan 1.1, 1.2, and 1.3 validation. The new uniform overlay expectations agree with the hand calculations. - `runtime/src/present_compose.comp:153` — Please preserve additive HDR light separately through bilinear filtering and SDR tone mapping. With 203-nit white and a 1000-nit peak, the 100-nit zero-alpha grey from C4 gives byte 186 over black. Mixing in just 2.5% opaque black gives about byte 45 because the shader divides the additive light by the filtered alpha before tone mapping. Weighting the additive contribution gives about byte 184. A mixed-texel C4 case would catch the resulting dark seam. - `runtime/src/present_compose.comp:100` — C2b's UNORM red code 188 over grey 64 gives red byte 196 at alpha code 0 and clips to 255 at alpha code 1. Please handle the encoded additive excess independently of coverage and test those adjacent alpha codes. AI-assisted.
lixonik commented 2026-11-28 15:45:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T15:45:28Z.


@timbot103 Thanks for pointing out both edge cases. 10f14f613 keeps additive light separate from covered RGB through bilinear filtering and HDR-to-SDR tone mapping. For premultiplied UNORM, encoded RGB above alpha is decoded separately as additive light. I added checks for adjacent alpha codes 0 and 1 and for an HDR additive texel filtered against opaque black, and regenerated the embedded SPIR-V with the PR's existing glslang command.

The previous shader failed at alpha code 1 with the new fixture. With the updated shader both new cases passed on Windows 11 with RTX 5070 (610.88). The standalone run still hit the existing swapchain resize failure later in the test. With #2507 applied locally, the complete xbox_present test passed.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7241711285 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7241711285). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-28T15:45:28Z. --- @timbot103 Thanks for pointing out both edge cases. `10f14f613` keeps additive light separate from covered RGB through bilinear filtering and HDR-to-SDR tone mapping. For premultiplied UNORM, encoded RGB above alpha is decoded separately as additive light. I added checks for adjacent alpha codes 0 and 1 and for an HDR additive texel filtered against opaque black, and regenerated the embedded SPIR-V with the PR's existing glslang command. The previous shader failed at alpha code 1 with the new fixture. With the updated shader both new cases passed on Windows 11 with RTX 5070 (610.88). The standalone run still hit the existing swapchain resize failure later in the test. With #2507 applied locally, the complete `xbox_present` test passed. AI-assisted.
Maticcm commented 2026-11-28 20:21:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Maticcm on 2026-11-28T20:21:58Z.


Independent native Windows verification of 10f14f6130e8cf4b4014dc9cf93ec05f497caf74, synthetic xbox_present_test, RelWithDebInfo, MSVC 19.50.35717, Vulkan SDK 1.4.363.1, Vulkan validation enabled.

Device Tested revision Result
GeForce RTX 3080 desktop, 10 GiB, driver 630.20 Exact #2508 head The sRGB and UNORM composition assertions passed, including alpha codes 0 and 1. The HDR10 surface skipped the forced-SDR HDR branch. The overall test reproduced the existing resize failure at present_planes(&one, 1).
Same RTX 3080 #2508 plus #2507 at b8486b4a58e6f0748b350225bf84ff3156c86694 (local combination cc6f37308a0c2a4cb1d3a96c880d955ac10f713d) 1/1 CTest passed, including all three swapchain resizes. The forced-SDR HDR branch still skipped on this surface.
AMD Radeon integrated graphics, driver 26.11.2 Exact #2508 head 1/1 CTest passed. The SDR surface exercised the HDR10 additive overlay and the filtered edge against opaque black, including the new per-column reference assertions. The native ST.2084 swapchain case skipped on this adapter.

No Vulkan validation errors were reported in these runs. spirv-val --target-env vulkan1.1 passed for the submitted embedded synthetic module (5,414 words) and for a separate glslc 2026.4 -O compilation of the submitted GLSL. The GPU test executable used the embedded module from its recorded source revision. Windows 11 build 26340. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7245232618 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7245232618). Originally posted by [Maticcm](https://github.com/Maticcm) on 2026-11-28T20:21:58Z. --- Independent native Windows verification of `10f14f6130e8cf4b4014dc9cf93ec05f497caf74`, synthetic `xbox_present_test`, RelWithDebInfo, MSVC 19.50.35717, Vulkan SDK 1.4.363.1, Vulkan validation enabled. | Device | Tested revision | Result | | --- | --- | --- | | GeForce RTX 3080 desktop, 10 GiB, driver 630.20 | Exact #2508 head | The sRGB and UNORM composition assertions passed, including alpha codes 0 and 1. The HDR10 surface skipped the forced-SDR HDR branch. The overall test reproduced the existing resize failure at `present_planes(&one, 1)`. | | Same RTX 3080 | #2508 plus #2507 at `b8486b4a58e6f0748b350225bf84ff3156c86694` (local combination `cc6f37308a0c2a4cb1d3a96c880d955ac10f713d`) | 1/1 CTest passed, including all three swapchain resizes. The forced-SDR HDR branch still skipped on this surface. | | AMD Radeon integrated graphics, driver 26.11.2 | Exact #2508 head | 1/1 CTest passed. The SDR surface exercised the HDR10 additive overlay and the filtered edge against opaque black, including the new per-column reference assertions. The native ST.2084 swapchain case skipped on this adapter. | No Vulkan validation errors were reported in these runs. `spirv-val --target-env vulkan1.1` passed for the submitted embedded synthetic module (5,414 words) and for a separate `glslc 2026.4 -O` compilation of the submitted GLSL. The GPU test executable used the embedded module from its recorded source revision. Windows 11 build 26340. AI-assisted (Codex).
TheGeogeo commented 2026-11-29 05:58:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T05:58:30Z.


Tested 10f14f613 merged (no commit) with main c8bf0e7b6. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), Ninja, RelWithDebInfo. check_no_game_data.py is clean.

  • xbox_present exits non-zero both on main and on the merge: it stops at the swapchain resize step (line 1319: present_planes(&one, 1), VkResult -11), which #2507 fixes. So the verdict below comes from its compose: lines, not from the exit code.
  • Green: on the merge, every compose: check runs and passes, including premultiplied and straight *_UNORM_SRGB plane 1 overlays: ok, until that pre-existing resize stop.
  • Red: with present_compose.comp and present_compose.inc back to main, it stops earlier, at the new check line 1085: region_is(frame, 0, 0, width, height, g22 ? Px{186, 186, 186} : Px{188, 188, 188}, 1). The old shader clips to 255.
  • No regression: the merge rebuilds 142 executables, and their 246 other tests pass.
  • LINK: gta6rt.exe linked without ws2_32.lib gives main's 26 unresolved Rust-std symbols, nothing new. Its imports are identical to main's.
  • The second commit (10f14f613) answers the review's two points (HDR additive light through bilinear filtering, UNORM alpha codes 0/1) with tests. present_compose.inc is regenerated with glslang, as the description says.

No blocker from my side. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7251569781 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7251569781). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T05:58:30Z. --- Tested `10f14f613` merged (no commit) with `main` `c8bf0e7b6`. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), Ninja, RelWithDebInfo. `check_no_game_data.py` is clean. - `xbox_present` exits non-zero both on `main` and on the merge: it stops at the swapchain resize step (`line 1319: present_planes(&one, 1)`, `VkResult -11`), which #2507 fixes. So the verdict below comes from its `compose:` lines, not from the exit code. - Green: on the merge, every `compose:` check runs and passes, including `premultiplied and straight *_UNORM_SRGB plane 1 overlays: ok`, until that pre-existing resize stop. - Red: with `present_compose.comp` and `present_compose.inc` back to `main`, it stops earlier, at the new check `line 1085: region_is(frame, 0, 0, width, height, g22 ? Px{186, 186, 186} : Px{188, 188, 188}, 1)`. The old shader clips to 255. - No regression: the merge rebuilds 142 executables, and their 246 other tests pass. - LINK: `gta6rt.exe` linked without `ws2_32.lib` gives `main`'s 26 unresolved Rust-std symbols, nothing new. Its imports are identical to `main`'s. - The second commit (`10f14f613`) answers the review's two points (HDR additive light through bilinear filtering, UNORM alpha codes 0/1) with tests. `present_compose.inc` is regenerated with glslang, as the description says. No blocker from my side. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 08:20:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T08:20:16Z.


Merged after TheGeogeo's red/green check (check: green with this PR merged onto main, red without it; gta6rt.exe still links) and a re-check here: no conflict with main a6a65a452, same head as checked, not frozen, no-game-data green.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253039008 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7253039008). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T08:20:16Z. --- Merged after **TheGeogeo**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/2508#issuecomment-7251569781): green with this PR merged onto `main`, red without it; `gta6rt.exe` still links) and a re-check here: no conflict with `main` a6a65a452, same head as checked, not frozen, `no-game-data` green. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2508
No description provided.