git: openjdk/jfx-sandbox: direct3d12: Make Mask Shaders deny Clear optimization
duke
duke at openjdk.org
Mon Feb 2 11:37:42 UTC 2026
Changeset: dcaf8879
Branch: direct3d12
Author: Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date: 2026-02-02 12:23:47 +0000
URL: https://git.openjdk.org/jfx-sandbox/commit/dcaf8879db2b660e547e21edf31a1c8421aeab34
Make Mask Shaders deny Clear optimization
This is more of a workaround than a proper solution, but for now it
works. In some cases it can happen that Text/Label rendering will
reuse temporary RTTs in the same frame. It can also happen that newly
rendered text bbox will cover used RTT contents. This might not always
be the most accurate decision due to dirty bbox RTT calculations being
too simplified - Text rendering consists of a quad per each letter, and
those can sometimes be smaller than the overall bbox area covered by the
Draw call. As such, sometimes text won't be fully overdrawn which will
result in Text/Labels looking "corrupted".
The long-term and more universal solution would be to rework the dirty
bbox algorithm, but for a simpler answer it's easier to simply deny the
Clear optimization for Mask shaders, which is what this commit does.
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12PSOManager.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RenderingContext.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Shader.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Shader.hpp
More information about the openjfx-changes
mailing list