mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #2014] Treat BGRX overlays as opaque in PresentX composition #2023
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2023
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2014
Author: @lgr123
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:lgr123/present-bgrx-opaque-plane📝 Commits (1)
71d41e4Treat BGRX PresentX overlays as opaque📊 Changes
6 files changed (+40 additions, -7 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+3 -0)📝
runtime/shims/d3d12_com.h(+7 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+0 -7)📝
runtime/shims/xbox_present.cpp(+1 -0)📝
runtime/src/vulkan_present.h(+2 -0)📝
runtime/test/xbox_present_test.cpp(+27 -0)📄 Description
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 #2001. Source-only check andgit diff --checkpassed.GPUs tested: NVIDIA RTX 5070, 621.24, Windows.
AI-assisted: yes.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.