As some of you have noticed, we’ve integrated a new D3D pipeline into mustang build 33. I’ll probably write something similar to Chris did for the Opengl pipeline (may be not as extensive, since the pipelines are pretty similar). Chris’ article for your references:
http://today.java.net/cs/user/print/a/147
In the meantime, I’ll just say a few words so you can start checking it out if you want to.
The bug id for the pipeline is
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5104393
An important performance improvement to the pipeline, which is also in b33:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6252147
Currently the d3d pipeline does most of what the opengl pipeline is capable of, with the exception of:
- gradient paint (yeah, sorry)
- xor rendering mode (still accelerated via gdi where possible)
- accelerated copies from a system memory surface to an accelerated
surface (see Chris’ article for more info) - mostly relevant for the first
copy from BufferedImage to volatileImage, then the image is cached in
a texture anyway - the VolatileImage => VolatileImage or VolatileImage => Screen
copies are still done via ddraw Blit. This also means that
compositing/transformation for VI->VI aren’t accelerated and go
through our software loops - hopefully not many people use VIs for
sprites - rendering to the screen is not accelerated, only to a VolatileImage or
BufferStrategy’s backbuffer (a Direct3D restriction)
One minor difference between ogl and d3d pipelines is that the d3d pipeline always uses the Direct3D transformation engine for geometry transformations (with thin stroke), even for shapes (the opengl pipeline does the rasterisation using our software rasterizer and then feeds the resulting spans to opengl).
Note The pipeline is disabled by default, since we’re still working on some quality and robustness issues. We have all intentions of enabling it by default or mustang.
To enable it, provide the -Dsun.java2d.d3d=true flag.
Unfortunately, I didn’t have time to add any output when the pipeline is enabled, but you can use -Dsun.java2d.trace=log to make sure it is.
It’s also enabled if the good old -Dsun.java2d.translaccel flag is set (I’m assuming if you’re crazy enough to use this flag, you’ll be fine with the new pipeline =)
Note that there are cases when the pipeline won’t be enabled even with the d3d=true set, that is, if we detect that there’s not enough capabilities provided by the d3d device.
Also, our implementation tends to highlight the quality issues with the video drivers, so don’t be surprised if you see some rendering artifacts. (most of them are indeed drivers issues because they disappear once a reference Mircosoft d3d rasterizer is selected)
Some known issues with the b33 version of the pipeline:
some of the fullscreen functionality may be broken, like alt+tabbing in/out of the app, restoration of the surfaces when a command line console goes fullscreen. Bugs:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6255408
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6255346
These should be fixed in the next build.
Please try the new pipeline, and let us know what you think.
When reporting problems, please provide as much information about the os, hardware and drivers as posssible, it really helps.
Thanks,
Dmitri
Java2D Team