When D3D9Ex is enabled (-DdisableD3D9Ex=false), there is a significant performance drop in rendering big number of effects per frame, this can be seen in HelloEffects by adding bechmarking via Scene.snapshot.
On the low-end machine, the hit is as much as 2.5 times.
The root cause of it is the much slower nGetAdapterOrdinal native method which calls D3D GetAdapterMonitor.
This method is repeatedly called by the GraphicsPipeline.getResourceFactory method.
We should cache the mapping between the Screen and adapter.
This is closely related to theRT-33475 and since we have stale Screens, we don't have a point where this cache can be cleaned.
OTOH, it probably can be safely cleaned on each screen configuration change.
On the low-end machine, the hit is as much as 2.5 times.
The root cause of it is the much slower nGetAdapterOrdinal native method which calls D3D GetAdapterMonitor.
This method is repeatedly called by the GraphicsPipeline.getResourceFactory method.
We should cache the mapping between the Screen and adapter.
This is closely related to the
OTOH, it probably can be safely cleaned on each screen configuration change.
- relates to
-
JDK-8093950 [D3D] Re-enable DirectX 9Ex to avoid losing textures when surface lost
- Resolved