View Single Post
Old 10-09-08, 03:56 PM   #1
Registered User
Join Date: Oct 2008
Posts: 17
Default Bug in 177.80 with glCopyTexSubImage2D, glGetTexImage, glReadPixels


The test provided (requires glew and glut) shows that there is bug in the way
the colorbuffer or depth buffer are passed to a texture with
glCopyTexSubImage2D or to client memory with glReadPixels. It fails with
a nVidia Quadro FX 3600M (177.80).

The first line of the comment in the source code shows how to compile it.

This test passes on a nVidia GeForce 6800 (169.12).

Everything happens in draw().

The test first clears the color buffer with a red color. This is the back
buffer because the window is initialized with double buffer.

It copies a subpart of it into a 2D texture. I made the size odd intentionally.

It copies the the same subpart of the back color buffer to client memory
with glReadPixels(). But sometimes (which make me thing there is some
uninitialized values in the driver side), not all the rgb values are equal to

The texture is then also copied to client memory. Same thing, not all the rgb
values are equal to (255,0,0).

Then the back buffer is cleared again but with a blue color. This time
instead of copying a part the framebuffer starting at (0,0), the subpart starts
at (10,10) for the texture. The ReadPixel sill copies from (0,0).

Checking the values dumped to client memory shows that some values are not blue.

The code is then done on depth buffer. First by clearing at 1.0 and then by
clearing at 0.5. Some values dumped to client memory mismatch (some of them are


The machine with the Quadro FX 3600M is a laptop (nvidia-bug-report.log attached):

Dell Precision M6300
CPU: Intel Core Duo 2 T9500
nVidia Quadro FX 3600M (512MB)
The OS is GNU/Linux Debian x86_64 "testing".
The driver is 177.80 installed manually :
# /etc/init.d/gdm stop
# export CC=/usr/bin/gcc-4.1
# sh ./
# ...

The machine with the GeForce 6800 is a desktop:

Dell Dimension 8400
CPU: Intel Pentium 4 630 HT (3Ghz)
nVidia GeForce 6800 256MB
The OS is GNU/Linux Ubuntu x86 8.04LTS
The driver is 169.12 (package provided by Ubuntu)


François Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA
Attached Files
File Type: bz2 bug_nvidia_texsubcopy_not_starting_from_fb_origin.tar.bz2 (66.1 KB, 117 views)
kwvtk is offline   Reply With Quote