Repository navigation
Conversation
Preserve the DXGI alpha semantics when the Vulkan composer samples plane 1. Use the existing BGRX format classification to swizzle sampled alpha to one while retaining the overlay placement and the behavior of real alpha formats.
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).
Treating DXGI_FORMAT_B8G8R8X8_UNORM / B8G8R8X8_UNORM_SRGB overlay planes as opaque via opaque_alpha + VK_COMPONENT_SWIZZLE_ONE on the view is clean, minimal, and keeps BGRA overlays blending normally.
Tests run
xbox_present_test.exe(withLEONIDA_PRESENT_PLANE1=0): both new compose checks passed on real Vulkan hardware:compose: BGRA overlay still uses its alphacompose: BGRX UNORM and sRGB overlays are opaque inside their placement for both alpha modes
- 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-BGRX-OPAQUE-PLANE.
On public main, a synthetic green BGRX overlay disappeared when its unused X byte was zero. The sampled result was the base color 51/153/230. With X set to 255, the same input was green 0/255/0. Genuine BGRA controls correctly distinguished alpha 0 and 255. DXGI defines BGRX's X channel as unused, so the overlay should be opaque at either value.
Carry the BGRX format distinction into the compositor and use alpha-one swizzle for the sampled view of the secondary plane. The surrounding image retains the base plane outside the overlay rectangle. Ordinary BGRA/RGBA and direct presentation preserve their existing paths.
Reviewer check
Run the Windows synthetic
xbox_presenttest. The regression uses both BGRX UNORM and sRGB, selects X = 0 and 255, checks straight and premultiplied inputs, and compares pixel placement and genuine BGRA alpha controls.Tested
xbox_present,d3d12_present, andd3d12_typeless_familiesall passed.b9320a1. Clean merge-tree with Preserve sRGB midtones on the SDR UNORM swapchain fallback #2001. Source-only check andgit diff --checkpassed.GPUs tested: NVIDIA RTX 5070, 621.24, Windows.
AI-assisted: yes.
Checklist