Bug 42487 - Teapot visual artifact
Summary: Teapot visual artifact
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 7.11
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 14:19 UTC by vincent
Modified: 2011-11-02 10:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Code that show the bug. (3.90 KB, application/x-bzip)
2011-11-01 14:19 UTC, vincent
Details
Here is the image showing display artifact (140.79 KB, image/png)
2011-11-01 14:20 UTC, vincent
Details

Description vincent 2011-11-01 14:19:19 UTC
Created attachment 53020 [details]
Code that show the bug.

Hi,

when I execute the code in attachment (buildable with scons, freeglut, and glu), I get the image (in attachment as well),
using gallium nvc0 or gallium swrast.
Teapot should not be transparent...
Comment 1 vincent 2011-11-01 14:20:05 UTC
Created attachment 53021 [details]
Here is the image showing display artifact
Comment 2 vincent 2011-11-02 10:17:34 UTC
I've narrowed the bug :
the faulty command is

glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);

Adding an additionnal GLUT_DEPTH param make the code works.

AMD and Nvidia proprietary drivers seem to force GLUT_DEPTH in display mode when depth_test are enabled. I have no idea if there is a spec that tells if such a behavior is legit or not, I'm marking this as NEEDINFO.
Comment 3 Brian Paul 2011-11-02 10:50:55 UTC
(In reply to comment #2)
> I've narrowed the bug :
> the faulty command is
> 
> glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
> 
> Adding an additionnal GLUT_DEPTH param make the code works.
> 
> AMD and Nvidia proprietary drivers seem to force GLUT_DEPTH in display mode
> when depth_test are enabled. I have no idea if there is a spec that tells if
> such a behavior is legit or not, I'm marking this as NEEDINFO.

I think what's really happening is you're getting a GLX visual with a depth buffer just by luck with AMD/NVIDIA.

glxinfo will show you which visuals have a depth buffer.  With the NVIDIA driver, most visuals have a depth buffer.  Probably the same thing with AMD's driver.

If your application uses depth testing you _must_ call glutInitDisplayMode() with GLUT_DEPTH.  Similarly with stencil and accum buffers.

I think we can close this as not-a-bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.