RFR: 8154847: Rendering is incorrect or not visible with StageStyle.UNIFIED on some graphics cards

Christopher Schnick crschnick at openjdk.org
Thu Feb 5 20:47:09 UTC 2026


On Thu, 29 Jan 2026 21:09:16 GMT, Christopher Schnick <crschnick at openjdk.org> wrote:

> The previous value of BackBufferFormat for the D3DPRESENT_PARAMETERS for the d3d9 swap chain was set to D3DFMT_UNKNOWN by default. This causes the d3d implementation to use a default value, which depends on the system configuration. The RTT texture by JavaFX always uses D3DFMT_A8R8G8B8.
> 
> If the d3d swap chain defaults to D3DFMT_X8R8G8B8, this creates a format mismatch. In theory, that shouldn't be a big deal as it's only about the alpha channel being used or not in this case. But for whatever reason, the format conversion by d3d is completely whack here. This is not only an alpha conversion issue, I tested for that. The whole conversion is wrong.
> 
> This only occurs when using a translucent background, e.g. with the UNIFIED stage style previously. This issue is a blocker for the new translucent backdrops and translucent EXTENDED stage style PRs that are open. Because without this, you can't guarantee that they will display properly on all Windows systems. Most will work fine, but some will be unusable.
> 
> Most d3d swap chain implementations I have seen don't set an explicit BackBufferFormat. However, in the case of JavaFX, it is easier to set the format here than do it for the RTT texture to maintain the same format on all platforms.
> 
> The most important part about this issue is reproduction and testing: I have tested it on multiple Windows 11 systems, Windows 10 1709, and Windows 10 22H2. It fixes the issue on the affected systems and maintains the same behavior on the other systems.
> 
> The reproduction instructions of the original issue are quite old, so it's difficult to get this properly set up on modern systems. The hardware that was affected back then might have gotten driver updates. The easiest way I found was to run Hyper-V on Windows, and create a new MSIX packaging environment VM.
> 
> You can do so at Hyper-V Manager -> Action -> Quick Create -> Windows 10 MSIX packaging environment. This creates a Windows 10 VM which reproduces the issue reliably. The Windows 11 VM does not for some reason.
> 
> You can run the BackdropTest from https://github.com/openjdk/jfx/pull/2048/changes#diff-c25c5ccf435e59b6bfd593251ab6dfc31a12a782a78191a38b4e9adab31587a3 with and without the BackBufferFormat line added to compare.

Ok that worked now. Two things I noticed: The backport does not list co-contributors and the autogenerated email with the PR description template contains leading spaces, meaning that you need to do some manual fomatting after copy-pasting the text

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2058#issuecomment-3856090690


More information about the openjfx-dev mailing list