Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-01-08, 06:24 PM   #1
Linuxhippy
Registered User
 
Join Date: Feb 2004
Posts: 585
Default Java2D-Xrender backend on 177.70 - Developer feedback

Hi there,

I've tested the project I am working on with the new beta drivers, its a Java2D backend using XRender to accalerate Java2D operations: http://openjdk.java.net/projects/xrender/

The new release seems to be substantially better in accalerating XRender, however i found some problems with my pipeline.
It could be that the problem is in my code itself (its still in a very early stage of development), but it works well with XAA, EXA and the old proprietary nvidia driver (but very slow).

1.) Rendering corruptions when subpixel-aa is disabled (grayscale and no aa).
However time for a GUI benchmark (benchmarking Swing performance, the java toolkit on top of Java2D) went up from 16s (subpixel-aa) to 20s (no aa). So its both slower and corrupted.
The Nouveau driver ran the test in 10s, the intel driver in 8s. (both with EXA).
Please see the image attached.

Text performance was always low, no matter which antialiasing mode was selected.

2.) Java2D's texture paint seems in some situations fall back to software.
I wasn't able to reproduce this fallback with synthetic tests - but when running Java2Demo on top of my pipeline adding the second shape with the texture to the animation drops it form 1500fps to maybe 75fps or even less, and Xorg's CPU consumption goes up to ~97%.

The strange thing is that (except for solid colors) my pipeline uses always the same rendering paths:
* Render geometry in a A8 pixmap (using XDrawSegments and XRenderFillRectangles)
* Composite source and mask to dest
-> Repeat steps above if pre-allocated A8 mask-pixmap is not large enough to hold the geometry.

So my guess is that for some weird reason the source seems not to be migrated - because it seems to work with 1x1 ARGB32 pixmaps (used for colors with alpha).

Update:
This one seems really strange. Sometimes it triggers a fallback, another time not and sometimes its rendered the wrong way.

3.) Rendering corruptions when TexturePaint is used. Probably somehow correlated with the problem 2.) - TexturePaints sometimes are corrupted.
Please see the image attached.

4.) Transformed Image Rendering Problem.
I've seen this problem with the pixman version delivered with Xorg-derver-1.3 and I was running 177.70 on 1.3, so it behaves exactly the same as pixman does.
However on xorg-server-1.5 pixmap renderes this correct with no white pixels.
I was not able to track this problem down, I just saw it was resolved on 1.5 and this made me thing it was a bug in older pixman releases.
It would be cool if the new nvidia driver could follow new pixman releases in this case.

The problem is very hard to nail down because I have only seen it happen with the Nimbus-LookAndFeel for Swing.

5.) Gradient accaleration:
Gradients seem to be unaccalerated. Gradient accaleration would be really great, especially because gradients are used a lot for many modern user interfaces. Furthermore their implementation using shaders shouldn't be too hard.

The hardware I tested on was:
OpenSuse-10.3 (xorg-server-1.3)
Sempron-3100+ (256kb cache)
GeForce6600, 256MB, PCIE
NForce 4 powered mainboard
IPP=2, pixmap cache enabled, no shm pixmaps

For now only the code is public available, however building the JDK requires quite some time and patience. If you would be interested I could try to package binaries you could test against?

Thanks for improving XRender accaleration, Clemens
Attached Thumbnails
Click image for larger version

Name:	1-grayscaleAA_corruption.png
Views:	286
Size:	56.6 KB
ID:	32948  Click image for larger version

Name:	2-texturepaint_fallback.png
Views:	221
Size:	1.6 KB
ID:	32949  Click image for larger version

Name:	3-texturepaint_corrupted.png
Views:	232
Size:	30.9 KB
ID:	32950  Click image for larger version

Name:	3-texturepaint_ok.png
Views:	231
Size:	45.7 KB
ID:	32951  Click image for larger version

Name:	4-nimbus_slider.png
Views:	240
Size:	2.2 KB
ID:	32952  

Linuxhippy is offline   Reply With Quote
Old 09-02-08, 06:07 AM   #2
Linuxhippy
Registered User
 
Join Date: Feb 2004
Posts: 585
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Hi again,

I've found two concrete problems in 177.70:

1.) No output rendered with transformation on source-picture:
The test-case attached (no_output.c) composites with a scale-transformation set on the source-picture.
With IPP=2 this results in no output, whereas IPP=0 produces the correct result.

2.) If both a transformation and clip is set on the mask-picture, the clip is ignored.
Again, with IPP=0 I get the correct result, with IPP=2 it shows up.

This was again on my GF6600. Would be great if those problems could be solved without falling back to software (both cases are used by my software).

Not a concrete problem, but causing me some troubles are the migration/pinning heuristics used. Sometimes things work fast and accalerated (like the problem 2.) mentioned in the post above) and another time they exactly the same tests seem to hit a fallback.
Any ideas what could be the reason for this? Could it be that the PixmapCache space is exhausted?

Thanks, Clemens
Attached Files
File Type: gz nvbugs.tar.gz (7.1 KB, 152 views)
Linuxhippy is offline   Reply With Quote
Old 09-03-08, 10:46 PM   #3
d13f00l
Registered User
 
Join Date: Apr 2005
Posts: 197
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Does this work with Sun's JVM?
d13f00l is offline   Reply With Quote
Old 09-04-08, 04:24 AM   #4
Linuxhippy
Registered User
 
Join Date: Feb 2004
Posts: 585
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Quote:
Originally Posted by d13f00l View Post
Does this work with Sun's JVM?
Sun's JVM does not use XRender, therefor, yes - but thats not the point.
The point is not making the new XRender pipeline work with the nvidia drivers, but remove existing bugs in the drivers.
The XRender pipeline was developed to replace the existing pipeline someday when its mature and driver support for XRender is solid.

Nvidia-Developers: Would be great if you could post a short reply if you've read this thread and maybe you findings about the isolated test-cases.

lg Clemens
Linuxhippy is offline   Reply With Quote
Old 09-08-08, 04:35 PM   #5
Linuxhippy
Registered User
 
Join Date: Feb 2004
Posts: 585
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

@Nvidia: Please take a look at least for the attached stand-alone testcases.
Linuxhippy is offline   Reply With Quote
Old 09-10-08, 03:02 PM   #6
Linuxhippy
Registered User
 
Join Date: Feb 2004
Posts: 585
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Bump.

Please, I just would like to have a confimation that the stand-alone bug-testcases have been filed in the internal bug-tracker.

Thanks, Clemens
Linuxhippy is offline   Reply With Quote
Old 09-10-08, 04:44 PM   #7
Plagman
NVIDIA Corporation
 
Plagman's Avatar
 
Join Date: Sep 2007
Posts: 254
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Yeah, I've seen your thread.
I can't look at your test cases right now, though. Maybe next week.
Plagman is offline   Reply With Quote
Old 09-17-08, 04:52 AM   #8
Plagman
NVIDIA Corporation
 
Plagman's Avatar
 
Join Date: Sep 2007
Posts: 254
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Linuxhippy: If I'm understanding your bug report right, the output from the two test cases you attached should only differ from the software implementation when using Xserver 1.5, correct?
Also, you're right that gradient generation isn't currently accelerated. Do you need to generate gradients interactively? I'd expect gradients that are part of a user interface to be generated once and stored in a buffer Picture for subsequent use with repeating and/or transformations.
Plagman is offline   Reply With Quote

Old 09-21-08, 02:14 AM   #9
Linuxhippy
Registered User
 
Join Date: Feb 2004
Posts: 585
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Quote:
Originally Posted by Plagman View Post
Linuxhippy: If I'm understanding your bug report right, the output from the two test cases you attached should only differ from the software implementation when using Xserver 1.5, correct?
No, the two test-cases differ from both, 1.4 and 1.5. At least on my 6600 they clearly produce output which differs from the spec and xorg servers.

Quote:
Also, you're right that gradient generation isn't currently accelerated. Do you need to generate gradients interactively? I'd expect gradients that are part of a user interface to be generated once and stored in a buffer Picture for subsequent use with repeating and/or transformations.
Well, I wrote only the glue between java and xrender, so its up to the developers to decide how they use the gradient - but I fear some would prefer to use gradients for interactive purposes too, especially as the Direct3D backend provides very fast shader backed gradients.

Thanks, Clemens
Linuxhippy is offline   Reply With Quote
Old 09-22-08, 07:21 PM   #10
d13f00l
Registered User
 
Join Date: Apr 2005
Posts: 197
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

Quote:
Originally Posted by Plagman View Post
Do you need to generate gradients interactively? I'd expect gradients that are part of a user interface to be generated once and stored in a buffer Picture for subsequent use with repeating and/or transformations.
Well, resizing apps that use GTK and Cairo as a backend, lots of themes use gradients for buttons and whatnot. The lack of gradient acceleration does show there pretty bad.
d13f00l is offline   Reply With Quote
Old 09-24-08, 11:03 AM   #11
Linuxhippy
Registered User
 
Join Date: Feb 2004
Posts: 585
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

@Plagman: Were you able to test it? What were your results?

Thanks, Clemens
Linuxhippy is offline   Reply With Quote
Old 09-24-08, 12:09 PM   #12
Plagman
NVIDIA Corporation
 
Plagman's Avatar
 
Join Date: Sep 2007
Posts: 254
Default Re: Java2D-Xrender backend on 177.70 - Developer feedback

I've reproduced the issues and am currently looking into them. Thanks for heads-up!
Plagman is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:30 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.