Issue
I use JavaFX with Java 8 and i set this properties before launching my app
System.setProperty("prism.forceGPU","true");
System.setProperty("prism.order","d3d,sw");
The verbose mode for prism gives me this :
Prism pipeline init order: d3d sw
Using native-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Threshold to enable UI scaling factor: 1.5
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
succeeded.
D3DPipelineManager: Created D3D9Ex device
Direct3D initialization succeeded
(X) Got class = class com.sun.prism.d3d.D3DPipeline
Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline
Maximum supported texture size: 8192
Maximum texture size clamped to 4096
OS Information:
Windows version 10.0 build 19044
D3D Driver Information:
Intel(R) HD Graphics 630
\\.\DISPLAY1
Driver igdumdim64.dll, version 25.20.100.6373
Pixel Shader version 3.0
Device : ven_8086, dev_591B, subsys_11C81462
Max Multisamples supported: 4
vsync: true vpipe: true
PPSRenderer: scenario.effect - createShader: LinearConvolveShadow_16
which shows that hardware acceleration is supported, but I have a Nvidia GTX 1050m TI perfectly installed and set up and JavaFX doesn't seem to want to use it, it's always using Intel(R) HD Graphics 630.
Is there a way to force gpu usage ?
ANSWER :
I solve the problem by simply setting java.exe default gpu to be the nvidia's one after many hours of research, it seems to work but cannot be done from the application code.
Solution
For those who are trying to solve a similar issue, it might be coming from the java.exe executable not using the gpu you want as a default device, you can change that in Windows' settings.
Answered By - Eorix
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)