<div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: #ffffff;">Hi Lukasz,</span></div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: #ffffff;"> </span></div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: #ffffff;">Thanks a lot for the information. Turns out you are absoulutely right.</span></div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: #ffffff;">In order to test that, I connected a MiniDP to an external Screen, and indeed, the iGPU was at 0% when I did rerun the benchmark. <br>When I wrote my previous mail, I did the benchmark with no external Screen connected to the Laptop, and then there is the 10-20% iGPU usage, for the reason you mentioned.</span></div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">Checking the verbose printed information, I can indeed confirm that he used the Integrated GPU when NVIDIA is deciding (Maybe this is the NVIDIA Optimus feature), <br>and the discrete GPU when I set it to use it (=High Performance Processor).</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">I will send all my results soon, still need to run them on my Tower PC!</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">-- Marius</div>
<div id="sub-body-container" style="margin: 10px 5px 5px 10px; padding: 10px 0px 10px 10px; border-left: 2px solid rgb(195, 217, 229);">
<div style="margin: 0px 0px 10px;">
<div><strong>Gesendet: </strong>Freitag, 28. November 2025 um 12:30</div>
<div><strong>Von: </strong>"Lukasz Kostyra" <lukasz.kostyra@oracle.com></div>
<div><strong>An: </strong>"Marius Hanl" <mariushanl@web.de></div>
<div><strong>CC: </strong>"openjfx-dev@openjdk.org" <openjfx-dev@openjdk.org></div>
<div><strong>Betreff: </strong>RE: RE: RE: JavaFX Direct3D 12 - Call for performance testing help</div>
</div>
<div class="WordSection1">
<p class="MsoNormal">Hi Marius,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks for checking. You can get D3D12 to inform you which GPU was used by adding “-Dprism.verbose=true” to Java properties on launch. You should see something along the lines of:<br><br></p>
<p class="MsoNormal">=======8<=======</p>
<p class="MsoNormal">…<br>OS Information:</p>
<p class="MsoNormal"> Windows version 10.0 build 26100</p>
<p class="MsoNormal">DXGI Adapter Information:</p>
<p class="MsoNormal"> Intel(R) Iris(R) Xe Graphics</p>
<p class="MsoNormal"> Device ID: ven_8086, dev_46A6, subsys_0B0B1028, rev_0000000C</p>
<p class="MsoNormal"> Device Memory: VRAM 8000000 System 0 Shared 3EE1D3000</p>
<p class="MsoNormal">D3D12 Device Information:</p>
<p class="MsoNormal"> Intel(R) Iris(R) Xe Graphics</p>
<p class="MsoNormal"> Feature Level: 12_1</p>
<p class="MsoNormal"> Shader Model: 6.7</p>
<p class="MsoNormal">vsync: false vpipe: true</p>
<p class="MsoNormal">=======8<=======</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">You can also cross-check it with D3D, that same property should print similar information from D3D9.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The only reason I can think of as to why the integrated GPU is sharing some work despite running JFX on discrete GPU is the way these hybrid systems are sometimes designed. A lot depends on where the display physically connects to in the computer, for example on laptops it is a common strategy to wire the screens and HDMI directly to the iGPU and if dGPU is needed the driver implicitly clones drawn frames to iGPU’s memory for presentation on the screen at a cost of some extra work and latency. Some laptops have a way to switch over the HDMI and integrated display output directly to dGPU, but this is mostly on the more expensive higher tier gaming laptops and requires some tinkering in BIOS. Tower PCs can have similar symptoms if displays are connected to motherboard HDMI/DP ports (which wire to iGPU) instead of dGPU ports.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">In short, unless you use a tower PC and your HDMI/DP cable is connected to the wrong port I wouldn’t worry about that shared usage that much. If devices listed by D3D and D3D12 are matching and what you expect them to be, both D3D9 and D3D12 use the same GPU. I think it’s more probable that the problem is, as I like to sometimes call it, “between the chair and the keyboard” of whoever wrote the backend. ;) It is highly probable the Nvidia results are viable, because we did see low and similar performance on discrete GPUs both here and from others who sent over the results.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Regardless, having two benchmarks would be handy, as long as both of them have the D3D9 baseline run on the same GPU. The initialization process should be identical between D3D9 and D3D12 (I essentially wrote it based on D3D9, but with D3D12/DXGI API) so whatever applies to D3D9 should also apply to D3D12 - if it doesn’t let me know.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">-Lukasz</p>
<p class="MsoNormal"> </p>
<div style="border: none; border-top: solid rgb(225,225,225) 1.0pt; padding: 3.0pt 0.0cm 0.0cm 0.0cm;">
<p class="MsoNormal"><strong>From:</strong> Marius Hanl <mariushanl@web.de> <br><strong>Sent:</strong> Thursday, 27 November 2025 21:40<br><strong>To:</strong> Lukasz Kostyra <lukasz.kostyra@oracle.com>; openjfx-dev@openjdk.org<br><strong>Subject:</strong> [External] : RE: RE: JavaFX Direct3D 12 - Call for performance testing help</p>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal"><span style="font-size: 9.0pt; font-family: Verdana , sans-serif; color: black; background: white;">Hi Lukasz,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 9.0pt; font-family: Verdana , sans-serif; color: black; background: white;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 9.0pt; font-family: Verdana , sans-serif; color: black;">I started testing today and noticed that my laptop isn't using the discrete GPU at all.<br>So I looked around in the NVIDIA Control Panel and found a setting that apparently automatically selects the GPU for the application. <br>The discrete NVIDIA GPU is used for games, while the internal AMD GPU is used for JavaFX, but also my browser, for example.<br><br>When set to use the discrete NVIDIA GPU, he still seems to somewhat share the work between both GPUs when doing the benchmark. <br>In my case, I can see 40% utilization for the NVIDIA GPU and 15% for the internal AMD GPU.<br><br>I wonder if I should do two benchmarks: One with the NVIDIA GPU set, and one where it is not used at all as described above?<br>And if yes, is there something I need to check for my scenario?</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 9.0pt; font-family: Verdana , sans-serif; color: black;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 9.0pt; font-family: Verdana , sans-serif; color: black;">-- Marius</span></p>
</div>
<div id="sub-body-container" style="border: none; border-left: solid rgb(195,217,229) 1.5pt; padding: 0.0cm 0.0cm 0.0cm 8.0pt; margin: 7.5pt 3.75pt 3.75pt 7.5pt;">
<div style="margin-bottom: 7.5pt;">
<div>
<p class="MsoNormal"><strong><span style="font-family: Calibri , sans-serif;">Gesendet: </span></strong>Freitag, 14. November 2025 um 15:10</p>
</div>
<div>
<p class="MsoNormal"><strong><span style="font-family: Calibri , sans-serif;">Von: </span> </strong>"Lukasz Kostyra" <<a href="mailto:lukasz.kostyra@oracle.com" target="_blank" rel="noopener noreferrer">lukasz.kostyra@oracle.com</a>></p>
</div>
<div>
<p class="MsoNormal"><strong><span style="font-family: Calibri , sans-serif;">An: </span> </strong>"<a href="mailto:openjfx-dev@openjdk.org" target="_blank" rel="noopener noreferrer">openjfx-dev@openjdk.org</a>" <<a href="mailto:openjfx-dev@openjdk.org" target="_blank" rel="noopener noreferrer">openjfx-dev@openjdk.org</a>></p>
</div>
<div>
<p class="MsoNormal"><strong><span style="font-family: Calibri , sans-serif;">Betreff: </span></strong>RE: JavaFX Direct3D 12 - Call for performance testing help</p>
</div>
</div>
<div>
<p class="MsoNormal">Hello all,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I got feedback on the previous call for performance testing email that, instead of using the Bash test script on Windows (and hoping you have Cygwin/MINGW installed) it would be easier to integrate testing and CSV output functionality into RenderPerfTest. I made those changes and they are now available on jfx-sandbox direct3d12 branch (you WON’T find those on main repo yet): <a href="https://urldefense.com/v3/__https:/github.com/openjdk/jfx-sandbox/tree/direct3d12/tests/performance/animation/RenderPerfTest/src/renderperf__;!!ACWV5N9M2RV99hQ!NACLMPpZKSbTmGhcTtK5jc1rvnIok9sbUdoWjrM6f2va7sR0xDJAwUJbK2RRMBf8vCcZhUaUwsfTjWkJxOQkU0fc$" target="_blank" rel="noopener noreferrer"> https://github.com/openjdk/jfx-sandbox/tree/direct3d12/tests/performance/animation/RenderPerfTest/src/renderperf</a><br><br>Any feedback regarding RenderPerfTest will be updated on that branch automatically, so it’s indeed a better solution if there’s more feedback to it :)</p>
<p class="MsoNormal"><br><strong><u><span style="font-family: Calibri , sans-serif;">New steps for running tests:</span></u></strong></p>
<ol start="1" type="1">
<li class="MsoListParagraph">Download RenderPerfTest from above link (has to be jfx-sandbox repo, direct3d12 branch) - best to download the entire “renderperf” folder as ZIP as it contains extra resources needed for the test app</li>
<li class="MsoListParagraph">Get JavaFX Direct3D 12 build - either download the EA2 SDK from [ <a href="https://urldefense.com/v3/__https:/jdk.java.net/javafxdirect3d12/__;!!ACWV5N9M2RV99hQ!NACLMPpZKSbTmGhcTtK5jc1rvnIok9sbUdoWjrM6f2va7sR0xDJAwUJbK2RRMBf8vCcZhUaUwsfTjWkJxIRm1EHi$" target="_blank" rel="noopener noreferrer"> https://jdk.java.net/javafxdirect3d12/</a> ] or build it from scratch from direct3d12 [ <a href="https://urldefense.com/v3/__https:/github.com/openjdk/jfx-sandbox/tree/direct3d12__;!!ACWV5N9M2RV99hQ!NACLMPpZKSbTmGhcTtK5jc1rvnIok9sbUdoWjrM6f2va7sR0xDJAwUJbK2RRMBf8vCcZhUaUwsfTjWkJxGGtC5B2$" target="_blank" rel="noopener noreferrer"> https://github.com/openjdk/jfx-sandbox/tree/direct3d12</a> ] branch (make sure to <strong><span style="font-family: Calibri , sans-serif;">build with -PCONF=Release</span></strong>; at the time of writing this email there is no functional difference between the sandbox repo and the EA2 build).</li>
<li class="MsoListParagraph">RenderPerf can be run with (underlined parts you need to fill in yourself):<br> <strong><span style="font-family: Calibri , sans-serif;">java --upgrade-module-path="<u><path_to_jfx_sdk>/lib</u>" --add-modules=javafx.base,javafx.controls,javafx.graphics,jdk.jsobject,javafx.media --enable-native-access=javafx.graphics -Dprism.order=<u><backend></u> renderperf/RenderPerfTest.java --output-csv -r <u><runs></u></span></strong><strong><u><br></u></strong>Where:<br><strong><span style="font-family: Calibri , sans-serif;"> <path_to_jfx_sdk></span></strong> - path to directory where JavaFX SDK is located (has to be where JavaFX bin and lib folders reside)<br><strong><span style="font-family: Calibri , sans-serif;"> <backend> </span></strong>- short-hand for which Prism backend to use<br> <strong><span style="font-family: Calibri , sans-serif;"><runs></span></strong> - how many times each test case should run; RenderPerf will average FPS results from these runs</li>
</ol>
<p class="MsoListParagraph"> </p>
<ol start="4" type="1">
<li class="MsoListParagraph">Running RenderPerf like above will produce <strong><span style="font-family: Calibri , sans-serif;">RenderPerf_results-<backend>-<date>-<time>.csv</span></strong> in your current directory.</li>
</ol>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><strong><u><span style="font-family: Calibri , sans-serif;">Examples:</span></u></strong></p>
<ol start="1" type="1">
<li class="MsoListParagraph" style="margin-bottom: 12.0pt;">For D3D baseline test, run:<br> <strong><span style="font-family: Calibri , sans-serif;">java --upgrade-module-path="<u><path_to_jfx_sdk></u>/lib" --add-modules=javafx.base,javafx.controls,javafx.graphics,jdk.jsobject,javafx.media, --enable-native-access=javafx.graphics -Dprism.order=d3d renderperf/RenderPerfTest.java --output-csv -r 3</span></strong></li>
<li class="MsoListParagraph">For D3D12 baseline test, run:<br> java --upgrade-module-path="<strong><u><span style="font-family: Calibri , sans-serif;"><path_to_jfx_sdk></span></u></strong>/lib" --add-modules=javafx.base,javafx.controls,javafx.graphics,jdk.jsobject,javafx.media, --enable-native-access=javafx.graphics -Dprism.order=d3d12 renderperf/RenderPerfTest.java --output-csv -r 3</li>
</ol>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><strong><u><span style="font-family: Calibri , sans-serif;">Notes:</span></u></strong></p>
<p class="MsoNormal">* Closing the test on warm-up stage will stop the test run early</p>
<p class="MsoNormal">* Similarly to the test script, RenderPerfTest defines default object numbers at the beginning as <strong><span style="font-family: Calibri , sans-serif;">Map<String, Integer> defaultObjectCounts </span></strong>which are used for running all the tests. Similar remarks as to the test script apply - It would be preferred to keep these numbers as-is but if needed (test timeouts loading, or framerate on baseline D3D run is very low (below 15FPS) ) they can be lowered, as long as they remain consistent between D3D and D3D12 runs.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks once again for your help!</p>
<p class="MsoNormal">-Lukasz</p>
<p class="MsoNormal"> </p>
<div>
<div style="border: none; border-top: solid rgb(225,225,225) 1.0pt; padding: 3.0pt 0.0cm 0.0cm 0.0cm;">
<p class="MsoNormal"><strong><span style="font-family: Calibri , sans-serif;">From:</span></strong> openjfx-dev <<a href="mailto:openjfx-dev-retn@openjdk.org" target="_blank" rel="noopener noreferrer">openjfx-dev-retn@openjdk.org</a>> <strong><span style="font-family: Calibri , sans-serif;">On Behalf Of </span></strong>Lukasz Kostyra<br><strong><span style="font-family: Calibri , sans-serif;">Sent:</span></strong> Thursday, 13 November 2025 15:50<br><strong><span style="font-family: Calibri , sans-serif;">To:</span></strong> <a href="mailto:openjfx-dev@openjdk.org" target="_blank" rel="noopener noreferrer"> openjfx-dev@openjdk.org</a><br><strong><span style="font-family: Calibri , sans-serif;">Subject:</span></strong> JavaFX Direct3D 12 - Call for performance testing help</p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Hello openjfx-dev,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Because Windows is very open hardware-wise, it is difficult to prepare the backend for all possible hardware combinations available, especially from performance perspective. To make sure JavaFX performance does not degrade compared to old D3D backend we would like to call for volunteers to help performance-test the backend. These tests will let us get a general idea on how the backend behaves on different hardware and which areas of the backend to focus on while moving forward with optimization effort for Direct3D 12.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">At this point we tested the backend quite extensively on Intel-based integrated GPUs and did some testing on a machine running a recent discrete Nvidia GPU. We are primarily looking for testing Direct3D 12 backend <strong><span style="font-family: Calibri , sans-serif;">on a system running an AMD discrete GPU</span></strong>, but any hardware combinations are welcome - the more the merrier :). Also note that these tests <strong><span style="font-family: Calibri , sans-serif;">require a Windows machine</span></strong>, as D3D12 backend is Windows-only.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">We run performance testing using RenderPerfTest JavaFX app located in the JavaFX repository under "tests/performance/animation/RenderPerfTest". I wrote a bash script to use with this app for performance-testing the backend. The script will run all available demos on RenderPerfTest with a set amount of objects per test, average the FPS results from each run and output the results into a CSV file.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><strong><u><span style="font-family: Calibri , sans-serif;">How to run perf tests:</span></u></strong></p>
<ol start="1" type="1">
<li class="MsoListParagraph">Download the test script - <a href="https://urldefense.com/v3/__https:/gist.github.com/lukostyra/bc354a5fd845b82805ffb3380caebe9a__;!!ACWV5N9M2RV99hQ!NACLMPpZKSbTmGhcTtK5jc1rvnIok9sbUdoWjrM6f2va7sR0xDJAwUJbK2RRMBf8vCcZhUaUwsfTjWkJxJApdPYs$" target="_blank" rel="noopener noreferrer"> https://gist.github.com/lukostyra/bc354a5fd845b82805ffb3380caebe9a</a></li>
<li class="MsoListParagraph">Get JavaFX Direct3D 12 build - either download the EA2 SDK from [ <a href="https://urldefense.com/v3/__https:/jdk.java.net/javafxdirect3d12/__;!!ACWV5N9M2RV99hQ!NACLMPpZKSbTmGhcTtK5jc1rvnIok9sbUdoWjrM6f2va7sR0xDJAwUJbK2RRMBf8vCcZhUaUwsfTjWkJxIRm1EHi$" target="_blank" rel="noopener noreferrer"> https://jdk.java.net/javafxdirect3d12/</a> ] or build it from scratch from direct3d12 [ <a href="https://urldefense.com/v3/__https:/github.com/openjdk/jfx-sandbox/tree/direct3d12__;!!ACWV5N9M2RV99hQ!NACLMPpZKSbTmGhcTtK5jc1rvnIok9sbUdoWjrM6f2va7sR0xDJAwUJbK2RRMBf8vCcZhUaUwsfTjWkJxGGtC5B2$" target="_blank" rel="noopener noreferrer"> https://github.com/openjdk/jfx-sandbox/tree/direct3d12</a> ] branch (make sure to <strong><span style="font-family: Calibri , sans-serif;">build with -PCONF=Release</span></strong>; at the time of writing this email there is no functional difference between the sandbox repo and the EA2 build).</li>
<li class="MsoListParagraph">Put the script in the same directory as <strong><span style="font-family: Calibri , sans-serif;">renderperf/RenderPerfTest.java</span></strong> - I usually copy the contents of tests/performance/animation/RenderPerfTest/src into a separate directory where the script is located. The script will look in the current directory specifically for "<strong><span style="font-family: Calibri , sans-serif;">renderperf</span></strong>" directory containing a "<strong><span style="font-family: Calibri , sans-serif;">RenderPerfTest.java</span></strong>" source file.</li>
<li class="MsoListParagraph">Ensure nothing else is running on your system.</li>
<li class="MsoListParagraph">Perform a baseline test run with D3D backend:<br> <strong><span style="font-family: Calibri , sans-serif;">./run_renderperf_all.sh -j <path_to_jfx_sdk> -b d3d -r 3</span></strong><strong><br></strong>When the script is done, this should result in "<strong><span style="font-family: Calibri , sans-serif;">RenderPerf_results_d3d-<date>-<time>.csv</span></strong>" file. This will let us establish how your machine performs on RenderPerf’s test cases on the old D3D backend.</li>
<li class="MsoListParagraph">Perform a perf test run for D3D12 backend:<br> <strong><span style="font-family: Calibri , sans-serif;">./run_renderperf_all.sh -j <path_to_jfx_sdk> -b d3d12 -r 3</span></strong><strong><br></strong>This should result in "<strong><span style="font-family: Calibri , sans-serif;">RenderPerf_results_d3d12-<date>-<time>.csv</span></strong>" file. The results will be used as a comparison to D3D backend.</li>
</ol>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Once you are done, reply to this email thread with details what hardware you ran the tests on and with contents of both CSV files specifying which came from which test run - I’m pretty sure <strong><span style="font-family: Calibri , sans-serif;">attachments will be stripped when sending an email to the mailing list</span></strong>, so to make sure the results get to us you should paste them inline. Also, include the console output of running any JavaFX app on D3D12 backend with "-Dprism.verbose=true".</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Note that these tests will run for quite a bit of time. Each test case's single run will take 15 seconds - 5 seconds of warm-up and 10 seconds of actual test run where FPS is measured. Testing every single case, 3 runs each, for a single backend takes approximately 40 minutes - ensure your computer won't lock or turn off the screens during that process.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><strong><u><span style="font-family: Calibri , sans-serif;">Test script reference:</span></u></strong></p>
<p class="MsoNormal"> <strong><span style="font-family: Calibri , sans-serif;">./run_renderperf_all.sh -j/--jfx <path_to_jfx_sdk> [-b/--backend <backend>] [-r/--runs <runs>]</span></strong></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Where:</p>
<p class="MsoNormal"> <strong><span style="font-family: Calibri , sans-serif;">-j, --jfx </span></strong> - required; path to directory where JavaFX SDK is located (has to be where JavaFX bin and lib folders are located)</p>
<p class="MsoNormal"> <strong><span style="font-family: Calibri , sans-serif;">-b, --backend</span></strong> - optional, defaults to "d3d12"; short-hand for which Prism backend to use. Whatever is set here will be forwarded to "-Dprism.order" property.</p>
<p class="MsoNormal"> <strong><span style="font-family: Calibri , sans-serif;">-r, --runs</span></strong> - optional, defaults to 3; how many times each test case should run. Script will average FPS results from these runs.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Notes:</p>
<p class="MsoNormal"> * Closing currently running test during the warm-up stage (first 5 seconds since starting the execution of the test case) should stop the test script early.</p>
<p class="MsoNormal"> * Script starts by declaring an array of test cases and object counts to run. We recommend leaving those as they are, however if there are tests which do not load because of a "Timeout" message (the script will then exit early) or perform significantly worse on D3D backend (below 20 FPS) you can lower the object count and retry.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Let me know if you have any problems with running the tests. And, in advance, thanks for your help!</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Regards,</p>
<p class="MsoNormal">Lukasz</p>
</div>
</div>
</div>
</div>