We will be using 3DLighting and RenderPerfTest to measure 3D rendering performance.
Current performance numbers of Metal compared to OpenGL in these 2 tests are :
1) 3DLighting numbers with default light and -Djavafx.animation.fullspeed=true:
OpenGL Sphere 1000 Vertices:
instant fps: 585.2698054075341
average fps: 584.6180149207024
Metal Sphere 1000 Vertices:
instant fps: 220.267217414662
average fps: 220.25653183903336
OpenGL Mesh 5000 Vertices:
instant fps: 5.005141499842315
average fps: 5.292156203391599
Metal Mesh 5000 Vertices:
instant fps: 55.361513141101014
average fps: 53.91321485213615
OpenGL Boxes:
instant fps: 818.8574573881052
average fps: 819.2276466305976
Metal Boxes:
instant fps: 203.45546352968262
average fps: 198.75532124311889
2) RenderPerfTest numbers:
OpenGL:
3DBox (Objects Frames FPS), 15000, 187, 18.599
3DCylinder (Objects Frames FPS), 15000, 192, 19.131
3DSphere (Objects Frames FPS), 15000, 187, 18.672
3DMesh (Objects Frames FPS), 12000, 186, 18.561
Metal:
3DBox (Objects Frames FPS), 15000, 5, 0.463
3DCylinder (Objects Frames FPS), 15000, 4, 0.359
3DSphere: Test workload could be too high. Try running the test with lesser number of objects.
3DMesh (Objects Frames FPS), 12000, 5, 0.433
Some optimization relates to memory consumption are already done to improve numbers of 3DLighting tests. We need to make more optimizations like re-using RenderEncoders/PipelineState or clubbing continuous calls with same state to achieve better performance numbers.
- is blocked by
-
JDK-8334813 3DSphere performance is low in RenderPerfTest
- In Progress
-
JDK-8321100 Optimize usage of RenderEncoder and PipelineState for 3D rendering
- Resolved
-
JDK-8335597 Set proper default culling mode in 3D Metal
- Resolved
-
JDK-8334117 Use dictionary to store 3D RenderPipelineStates
- Resolved
-
JDK-8332361 Implement usage of common encoder for both 2D and 3D rendering
- Resolved
-
JDK-8324115 Implement triple buffering to avoid processor stalls
- Resolved
-
JDK-8332684 Avoid creating MTLDepthStencilState repeatedly
- Resolved