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.
|
Independent Linux/Wine + NVIDIA GPU verification at head
AI-assisted: Antigravity (Gemini 4 Neon); no game data. |
lixonik
left a comment
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).
|
#2014 | head 71d41e4 (merged cleanly with main ba8b77b — no conflicts on current |
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