Thanks for filing those and for checking! I’ll take a closer look at them in 
coming days.

> FYI: The ALT+ENTER fullscreen behavior really comes from DXGI. This behavior 
> can also be disabled.
Good catch. We might end up disabling the DXGI full screen shortcut as well to 
match the behavior with D3D9.

-Lukasz

From: Marius Hanl <[email protected]>
Sent: Friday, 3 October 2025 17:36
To: Lukasz Kostyra <[email protected]>
Cc: [email protected]
Subject: [External] : RE: RE: JavaFX Direct3D 12 rendering pipeline for Windows

Hi Lukasz,

created:

  *   https://bugs.openjdk.org/browse/JDK-8369116 (LineChart)
  *   https://bugs.openjdk.org/browse/JDK-8369117 (Fullscreen)
FYI: The ALT+ENTER fullscreen behavior really comes from DXGI. This behavior 
can also be disabled. Godot does it here:
https://github.com/godotengine/godot/blob/master/drivers/d3d12/rendering_device_driver_d3d12.cpp#L2852<https://urldefense.com/v3/__https:/github.com/godotengine/godot/blob/master/drivers/d3d12/rendering_device_driver_d3d12.cpp*L2852__;Iw!!ACWV5N9M2RV99hQ!PVSGq3jF5gphblBAEWhPnbNos3my0l-MsWDA257qVqbOu5wA22KHJqJ5wZ0DI9VfIpWjF7a4HzCWcohhiDKQO1G-$>

Also noted that in the ticket!
And thank your for working on Direct3D12!

-- Marius

Gesendet: Freitag, 3. Oktober 2025 um 11:55
Von: "Lukasz Kostyra" 
<[email protected]<mailto:[email protected]>>
An: "Marius Hanl" <[email protected]<mailto:[email protected]>>
CC: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Betreff: RE: JavaFX Direct3D 12 rendering pipeline for Windows
Thanks for checking. I can reproduce both of those as well. The LineChart bug 
happens with your code (interestingly not in Ensemble8 examples I checked…) and 
the fullscreen bug also happens on Ensemble. Filing JBS issues would be 
helpful, you can set me as an assignee as well.

  > Interestingly, this seems to be a new feature from Direct3D 12? Because 
before, ALT+ENTER did nothing for me
This is possible. To get a D3D12 device and create a D3D12 swap chain we need 
to integrate with DXGI which is a “new" subsystem of Windows (“new” == did not 
exist when 9.0c was out; I believe it was introduced with Windows Vista and 
starting from DX10). It is possible DXGI has some integrations that make this 
behaviour possible.

I didn’t look too deep into fullscreen behaviour, mostly because related system 
tests we have work perfectly fine on 12. My main worry is that it might clash 
with something JavaFX expects from switching to full screen, so I guess it’s 
time to take a closer look :)

-Lukasz



From: Marius Hanl <[email protected]<mailto:[email protected]>>
Date: Thursday, 2 October 2025 at 23:10
To: Lukasz Kostyra <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>
Subject: Aw: RE: [External] : Aw: JavaFX Direct3D 12 rendering pipeline for 
Windows
Hi Lukasz,

I can reproduce both bugs with the newest version from the sandbox repository.
I created a reproducer, both bugs are very simple to reproduce there

  *   The fullscreen bug: Just press ALT+ENTER, and the window tries to get 
into fullscreen, fails and the exception is printed.
Interestingly, this seems to be a new feature from Direct3D 12? Because before, 
ALT+ENTER did nothing for me
(I reimplemented that into an application, thats where I found this problem 
initially, but found out that this works even without handling ALT+ENTER since 
Direct3D 12)
  *   The LineChart bug: Just resize the window, the LineChart Axis Text 
disappears sometimes.
This happens for me even initally in another application. Works on the latest 
branch without Direct3D 12.
The reproducer:

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class LineChartBug {
    public static void main(String[] args) {
        Application.launch(FxApp.class, args);
    }
    public static class FxApp extends Application {
        @Override
        public void start(Stage primaryStage) {
            BorderPane root = new BorderPane();
            NumberAxis xAxis = new NumberAxis();
            NumberAxis yAxis = new NumberAxis();
            LineChart<Number, Number> lineChart = new LineChart<>(xAxis, yAxis);
            StackPane stackPane = new StackPane(lineChart);
            stackPane.setMaxSize(300, 300);
            root.setCenter(stackPane);
            Scene scene = new Scene(root, 1280, 540);
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    }
}

I can also create 2 tickets if needed. Just let me know!

-- Marius


Gesendet: Donnerstag, 2. Oktober 2025 um 16:56
Von: "Lukasz Kostyra" 
<[email protected]<mailto:[email protected]>>
An: "Marius Hanl" <[email protected]<mailto:[email protected]>>
CC: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Betreff: RE: [External] : Aw: JavaFX Direct3D 12 rendering pipeline for Windows
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]<mailto:[email protected]>>
Sent: Thursday, 2 October 2025 16:18
To: Lukasz Kostyra 
<[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[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