[OpenJDK 2D-Dev] RFR: 8251854: [macosx] Java forces the use of discrete GPU
serb at openjdk.java.net
Tue Nov 10 17:17:58 UTC 2020
On Tue, 10 Nov 2020 16:38:25 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Change looks ok from a build point of view, but I can't comment on the validity and implications of using this key.
> I ran a 3D lighting test that is designed to be a GPU stress test. It's a worst case, to be sure, but it take 10 times as long to render with the integrated GPU as it does with the discrete GPU:
> **attenuation.LightingSample: 500 large quads**
> discrete GPU: 23.5 fps
> integrated GPU: 2.34 fps
> In a more realistic example of drawing a large number of 2D vectors, it runs 35% slower with the integrated GPU:
> **Vector charting test, oval clip**
> discrete GPU: 41.1 fps
> integrated GPU: 26.6 fps
> I see similar results in the performance numbers you listed above.
> An application developer who packages up their JDK, for example, using jpackage, can make the decision for themselves. Application developers who rely on the JDK as delivered will get whatever we choose as the default. So we need to be sure that the benefit of doing this justifies the performance hit.
The difference between the two is that, if the integrated card is default then it is possible to force the discrete card if needed, but it is not possible to force the integrated card if discrete is the default. In the end, it is a laptop, it will work longer on an integrated card.
More information about the 2d-dev