Running emilia pinball on a Rage 128, the floor and walls aren't drawn.
I distilled down the GL calls that pinball does into the glbug.c test program at
http://ozlabs.org/~paulus/glbug.c. If you run it with no arguments it should
put up a window with a white background and one grey quad visible. If you run
it with an argument (it doesn't matter what) it will do two additional GL calls:
and on a Rage 128 the quad is no longer drawn, but with software rendering or on
a radeon the quad is still visible. I have verified that the bug shows up on a
PowerMac G4 cube running Linux with a Rage 128 PF, a PC with a Rage 128 Pro
Ultra TR, and a titanium PowerBook G4 running Linux.
There are two other GL calls in the test program that are also needed to show
If I take those out the quad is rendered even if I do the glPolygonOffset call.
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
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