Software renderer and Java6 Update10

Started by EgonOlsen, January 17, 2008, 01:14:11 PM

Previous topic - Next topic

EgonOlsen

Hi all!

I was just playing around with the early access version of Update10 (http://download.java.net/jdk6/binaries/), it has a new D3d-pipeline for Java2D (for Windows)...and it sucks. So just in case anybody is using this in combination with the software renderer, make sure to disable that new pipeline in case of performance problems by doing a -Dsun.java2d.d3d=false

On my test machine, the performance degrades to 50% of what the normal (or the OpenGL-) pipeline could deliver with that shiny new pipeline.

Jonas

Hi

ouch ... and this pipeline is turned on by default? Sounds like a step into the wrong direction;D

Thanx for the hint
Simple things should be simple, complex things should be possible - Alan Kay

EgonOlsen

Quote from: Jonas on January 17, 2008, 02:13:04 PM
ouch ... and this pipeline is turned on by default?
Yes, it is. But this is only an early access version, it's not a final release and it does work fine with the OpenGL-pipeline instead which should basically do the same thing, so i hope that this behaviour can be fixed. I've already opened a thread in the corresponding forum at Sun (http://forums.java.net/jive/thread.jspa?threadID=35484&tstart=0).

Jonas

I don't quite understand why anyone is interested in a d3d pipeline for java anyway..I mean..after all AWT should be platform independent :).
Especially for a 2d toolkit..oh well..

Simple things should be simple, complex things should be possible - Alan Kay

EgonOlsen

I think it's about performance. Some operations like transparency and scaling are much faster when done using a 3D pipeline.

Jonas

Yes but that should be possible to do using an OpenGl pipeline as well..at least to my humble understanding ;D.

Java3d also offers a direct3d modus which is used by quite a few people. Kinda wierd..since it's not possible to access it directly anyway...so I guess there must be some kind of gain when using d3d on windows or some such..
Simple things should be simple, complex things should be possible - Alan Kay

EgonOlsen

Better driver support maybe. OpenGL drivers usually lack in quality when compared to D3D drivers.

EgonOlsen

Plus Microsoft provides D3D drivers for most cards when installing Windows but no OpenGL drivers. You have to use the vendor's drivers to get proper OpenGL support. Maybe not all users are doing this.

EgonOlsen

#8
Update on the situation: They've filed a bug report for this after i had submitted a simple test case. I'll post a link to the bug once it appears on the list. I really hope that things can be improved, because otherwise, they've seriously damaged per-pixel stuff.

Jonas

Well I guess best is to turn it off by default ;D.

Wouldn't something like this in the main class help?

static
   {
      if(System.getProperty("os.name").contains("Win"))
      {
         System.setProperty("sun.java2d.d3d", "false");
      }
   }


That should work for applets too
Simple things should be simple, complex things should be possible - Alan Kay

EgonOlsen

Yes, that would work. The question is, if that works in an applet, because the VM may initialize the pipeline before actually giving control to the applet...i'm not sure about this. The new applet plugin in that update supports VM parameters, so that would be another place to add it. However, one have to know that this is needed, and not everyone will. The idea of a default d3d-pipeline just sucks imho.

Jonas

Simple things should be simple, complex things should be possible - Alan Kay

Hrolf

Ulp! Will this affect Runescape & Bloodridge?  :-[

EgonOlsen

#13
Yes, it will. But it's not a problem on all systems. But on some (like the AGP one that i used for testing), it's a killer. At SUN, they seem to test their Java2D changes on one or two machines IMHO and they keep ignoring that we are NOT taking about 10% slower compared to the current, official release but about 10% of the blitting performance. But because it's a problem with the way D3D works, i don't think that the situation will improve. Luckily, you can disable the pipeline even in applets when using the new applet plugin, which will be available for IE and FF3 (but not for FF2).
If you don't like this, vote for the bug (http://bugs.sun.com/view_bug.do?bug_id=6652116). It might not help but it doesn't hurt either.

Hrolf

OK I voted for it! That's bad news for me!  :(