Hi Marius,

Thanks for checking! It is difficult to say whether this is still an issue, as 
that EA build is already a couple months old and I did squash some similar 
looking bugs since then.

We have a new one in the works, but if you don’t want to wait for it you should 
be able to build the most recent version out of jfx-sandbox repo, “direct3d12” 
branch and test this again (on that branch D3D12 builds by default so you 
shouldn’t have to worry about any additional flags for gradle). If the problem 
still persists, submitting a JBS issue with a reproducer would be helpful.

-Lukasz

From: Marius Hanl <[email protected]>
Sent: Thursday, 2 October 2025 16:18
To: Lukasz Kostyra <[email protected]>; [email protected]
Subject: [External] : Aw: JavaFX Direct3D 12 rendering pipeline for Windows

Hi Lukasz

just tried the build under 
https://jdk.java.net/javafxdirect3d12/<https://urldefense.com/v3/__https:/jdk.java.net/javafxdirect3d12/__;!!ACWV5N9M2RV99hQ!JngYLLw7RiUv70PBZplk9GHtsiaxBopDoNZKImjtPXoaDO8VzXFe7Emsl1z07OcYzvos_tkadNga_dfleYXQ7Tzu$>
 with some applications (not sure if that is the newest though).
Thing look very good, however, I found two issues:

When I toggle fullScreen on the primary stage with: stage.setFullScreen(..) , I 
get an exception (D3D12 swapchain is NULL):

java.lang.NullPointerException: D3D12 swapchain is NULL
    at 
javafx.graphics@25-direct3d12/com.sun.prism.d3d12.D3D12SwapChain.<init>(D3D12SwapChain.java:66)<mailto:javafx.graphics@25-direct3d12/com.sun.prism.d3d12.D3D12SwapChain.%3cinit%3e(D3D12SwapChain.java:66)>
    at 
javafx.graphics@25-direct3d12/com.sun.prism.d3d12.D3D12SwapChain.create(D3D12SwapChain.java:78)<mailto:javafx.graphics@25-direct3d12/com.sun.prism.d3d12.D3D12SwapChain.create(D3D12SwapChain.java:78)>
    at 
javafx.graphics@25-direct3d12/com.sun.prism.d3d12.D3D12ResourceFactory.createPresentable(D3D12ResourceFactory.java:338)<mailto:javafx.graphics@25-direct3d12/com.sun.prism.d3d12.D3D12ResourceFactory.createPresentable(D3D12ResourceFactory.java:338)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:81)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:81)>
    at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
    at 
java.base/java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:369)
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
    at --- Async.Stack.Trace --- (captured by IntelliJ IDEA debugger)
    at java.base/java.util.concurrent.FutureTask.<init>(FutureTask.java:153)
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.RenderJob.<init>(RenderJob.java:45)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.RenderJob.%3cinit%3e(RenderJob.java:45)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.PaintCollector.lambda$liveRepaintRenderJob$2(PaintCollector.java:330)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.PaintCollector.lambda$liveRepaintRenderJob$2(PaintCollector.java:330)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.PaintCollector.liveRepaintRenderJob(PaintCollector.java:329)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.PaintCollector.liveRepaintRenderJob(PaintCollector.java:329)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.GlassViewEventHandler$ViewEventNotification.get(GlassViewEventHandler.java:810)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.GlassViewEventHandler$ViewEventNotification.get(GlassViewEventHandler.java:810)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.GlassViewEventHandler$ViewEventNotification.get(GlassViewEventHandler.java:770)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.GlassViewEventHandler$ViewEventNotification.get(GlassViewEventHandler.java:770)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)>
    at 
javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleViewEvent(GlassViewEventHandler.java:850)<mailto:javafx.graphics@25-direct3d12/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleViewEvent(GlassViewEventHandler.java:850)>
    at 
javafx.graphics@25-direct3d12/com.sun.glass.ui.View.handleViewEvent(View.java:543)<mailto:javafx.graphics@25-direct3d12/com.sun.glass.ui.View.handleViewEvent(View.java:543)>
    at 
javafx.graphics@25-direct3d12/com.sun.glass.ui.View.notifyResize(View.java:884)<mailto:javafx.graphics@25-direct3d12/com.sun.glass.ui.View.notifyResize(View.java:884)>
    at 
javafx.graphics@25-direct3d12/com.sun.glass.ui.win.WinView.notifyResize(WinView.java:91)<mailto:javafx.graphics@25-direct3d12/com.sun.glass.ui.win.WinView.notifyResize(WinView.java:91)>
    at 
javafx.graphics@25-direct3d12/com.sun.glass.ui.win.WinApplication._runLoop(Native<mailto:javafx.graphics@25-direct3d12/com.sun.glass.ui.win.WinApplication._runLoop(Native>
 Method)
    at 
javafx.graphics@25-direct3d12/com.sun.glass.ui.win.WinApplication.lambda$runLoop$0(WinApplication.java:168)<mailto:javafx.graphics@25-direct3d12/com.sun.glass.ui.win.WinApplication.lambda$runLoop$0(WinApplication.java:168)>
    at java.base/java.lang.Thread.run(Thread.java:1474)

The other problem is related to LineChart. For me, sometimes the lines and the 
text is not rendered on the x and y axis.
When the axis change, it will render them again, but they will always disappear 
again after resizing the window.

Let me know if I should create an issue, or if I should build the branch by 
myself and test again! :)

-- Marius

Gesendet: Montag, 14. Oktober 2024 um 17:24
Von: "Lukasz Kostyra" 
<[email protected]<mailto:[email protected]>>
An: openjfx-dev <[email protected]<mailto:[email protected]>>
Betreff: JavaFX Direct3D 12 rendering pipeline for Windows
Hello openjfx-dev,

we just pushed a prototype of a new JavaFX Direct3D 12 rendering pipeline
for Windows to a new "direct3d12" branch on jfx-sandbox. It is more than an
experiment branch - we intend to fully develop the D3D12 backend there.

We're not necessarily looking for contributions at this point, but if anyone
has early feedback about it or wants to try it by building it themselves,
that would be fine. We also did not test it on a wider range of hardware, so
your mileage may vary. While D3D12 pipeline will build by default, D3D9
pipeline is still the default pick at runtime. To run anything on D3D12
pipeline you need to force it with ex.:
  java -Dprism.order=d3d12 ...

Backend supports 2D rendering (albeit with some graphical issues here and there
that need to be ironed out) and basic 3D rendering. Expect not everything fully
working yet (ex. some gradients on 2D controls are incorrect, or 3D-in-2D will
straight up not work) and the performance not matching D3D9 yet. Our goal is to
first reach feature completion and then focus on performance.

Lukasz

Reply via email to