Repository navigation
Conversation
Copy encoded bytes at one-to-one size when channel order matches. For scaled or differently ordered sources, blit into a compatible sRGB image before copying the encoded result to the swapchain. Keep presentation with a warning if the staging image is unavailable. Cover forced SDR UNORM through the Xbox presentation test on Windows with an NVIDIA RTX 5070. No game data was used. AI-assisted with OpenAI Codex.
This was referenced Nov 25, 2026
Contributor
|
Independent Linux/Wine + NVIDIA GPU verification at head
AI-assisted: Antigravity (Gemini 4 Neon); no game data. |
This was referenced Nov 27, 2026
lixonik
approved these changes
Nov 28, 2026
lixonik
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the diff and tested merged onto main (493867366) with Ninja Release (MSVC).
The SDR UNORM swapchain fallback path cleanly preserves sRGB midtones without altering existing presentation paths.
Tests run
xbox_present_test.exe(withLEONIDA_PRESENT_PLANE1=0): the new sRGB-on-SDR-UNORM fallback case passed on real Vulkan hardware (1 plane, sRGB source on an SDR UNORM swapchain: 1:1, crop/scale, RGBA and BGRA ok).- Note: later in the same binary, case F hits the pre-existing
mainresize readback failure (present_planes(&one, 1)), unrelated to this PR (tracked in #2507).
GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341; VK_LAYER_KHRONOS_validation not installed locally).
AI-assisted (Antigravity, Gemini).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed as RT-PRESENT-SRGB-UNORM-FALLBACK.
On the RTX 5070, restricting surface formats to the driver's advertised SDR UNORM formats made the native presenter turn synthetic grey bytes 128/188 into 55/128. The swapchain still used nonlinear sRGB, so these linearized bytes darkened midtones. The default sRGB swapchain and composed controls preserved 128/188.
Copy encoded bytes for matching format layouts at 1:1. For scaling or channel reordering, keep the existing filtered blit through a reusable matching sRGB image before copying the encoded bytes to the UNORM swapchain. This also works for transfer-only source images. If the intermediate cannot be created, keep presenting through the previous blit and emit a warning.
Reviewer check
Run
ctest -R ^xbox_present$ --output-on-failurefrom the configured Windows runtime build. The synthetic surface-format test forces SDR UNORM and checks RGBA/BGRA at 1:1 and with crop/scale. No game files required.Tested
b9320a1passedxbox_present(1 of 1).git diff --checkpassed.GPUs tested: NVIDIA RTX 5070, driver 621.24, Windows.
AI-assisted: yes.
Checklist