Forgot all about sending this in.... Fixes the HP_OCCLUSION_TEST on voodoo (5500) hardware.
Basically the FIFO needs flushed, otherwise you can end up getting the result from a previously rendered geometry. Also modified to handle a query on a polygon that gets clipped/culled out by the frustum or clip window etc.... FB -- The Moon is Waxing Crescent (39% of full)
Index: tdfx_dd.c =================================================================== RCS file: /cvsroot/dri/xc/xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v retrieving revision 1.10 diff -r1.10 tdfx_dd.c 162a163 > fxMesa->Glide.grFinish(); /* required to flush the FIFO - FB 21-01-2002 */ 171d171 < /*zfail = FX_grGetInteger_NoLock(GR_STATS_PIXELS_DEPTHFUNC_FAIL);*/ 173,177c173,177 < /*in = FX_grGetInteger_NoLock(GR_STATS_PIXELS_IN);*/ < if (in == zfail) < result = GL_FALSE; /* geom was completely occluded */ < else < result = GL_TRUE; /* all or part of geom was visible */ --- > /* Geometry is occluded if there is no input (in == 0) */ > /* or if all pixels failed the depth test (zfail == in) */ > /* The < 1 is there because I have empirically seen cases where */ > /* zfail > in.... go figure. FB - 21-01-2002. */ > result = ((in - zfail) < 1 || in == 0) ? GL_FALSE : GL_TRUE;
msg02455/pgp00000.pgp
Description: PGP signature
