Summary: | Polygons disappear when using glDepthFunc and glPolygonOffset | ||
---|---|---|---|
Product: | Mesa | Reporter: | Paul Mackerras <paulus> |
Component: | Drivers/DRI/r128 | Assignee: | Eric Anholt <eta> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
URL: | http://ozlabs.org/~paulus/glbug.c | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Patch to fix glPolygonOffset on r128 |
Description
Paul Mackerras
2004-06-15 15:22:25 UTC
Created attachment 391 [details] [review] Patch to fix glPolygonOffset on r128 In my test program, the glPolygonOffset call changes the Z values given to r128_draw_triangle from about 0.9 to about 1.9. Since Z values at this point are supposed to be scaled to between 0 and 1, this explains why the polygons disappear. The problem seems to be that ctx->MRD, the minimum resolvable depth, is still 1.0. Setting it to rmesa->depth_scale, which is 1/65536 when using a 16-bit depth buffer, looks right to me and in fact fixes the problem. Could this go into CVS please? DEPTH_SCALE looks like the thing to be setting for that. I'll whack this one with the t_vertex.c conversion. Committed. Sorry for the delay -- r128 t_vertex.c conversion is not working out like expected. |
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.