JDK-6251468 : OGL: GradientPaint slow on Nvidia GF2-series hardware
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: generic
  • Submitted: 2005-04-06
  • Updated: 2008-02-06
  • Resolved: 2005-04-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b33Fixed
Related Reports
Relates :  
Description
Primitives rendered with GradientPaint (without AA enabled) with the OGL
pipeline enabled are extremely slow on Nvidia GF2-series hardware.  For
example, on a 2x 2.6GHz P4 (WinXP) running the GradAnim demo in Java2Demo:

with Nvidia GF FX 5600: about 600 fps
with Nvidia GF MX 4000: about 3 fps

###@###.### 2005-04-06 18:03:22 GMT

Comments
EVALUATION This bug was originally submitted to Nvidia for review. They investigated and found that the poor performance is caused by our technique for accelerating GradientPaint in hardware. We currently use a 2-pixel wide 1D texture containing a border pixel on either side so that GL_CLAMP interpolates properly when there is an acyclic GradientPaint. According to Nvidia, this texture border causes a slowdown on GF2-series boards. Fortunately, I found that the texture border technique can be avoided by using GL_CLAMP_TO_EDGE with a borderless texture (has the same clamping behavior as before). After making this change, we now get about 400 fps (instead of 3 fps) on the same GF2-based hardware, and performance is about the same on all other boards. And the icing on the cake... It turns out that using this new technique, GradientPaint now (mostly) works on ATI hardware, whereas before it would just render black where you'd expect to see the gradient. It looks like there are still some glitches on ATI hardware, but I'll file that issue separately with ATI. ###@###.### 2005-04-06 18:03:23 GMT
06-04-2005