diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-08-25 14:23:38 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-08-25 14:23:38 +0000 |
commit | 6e4f594a02fc384b17d5732be652d7d28618aec2 (patch) | |
tree | 8f1b737ae8cdc83f44b46224d410c8822e0689be /src/mesa/drivers/dri/tdfx | |
parent | dd1a9f75dc1d29e3383f27aaa1cf024c83e5c8e2 (diff) |
removed GL_HP_occlusion_test extension
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_dd.c | 95 |
2 files changed, 0 insertions, 96 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index d90d4f06b9..eaa6f46d91 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -97,7 +97,6 @@ const struct dri_extension card_extensions[] = { "GL_EXT_stencil_wrap", NULL }, { "GL_EXT_texture_env_add", NULL }, { "GL_EXT_texture_lod_bias", NULL }, - { "GL_HP_occlusion_test", NULL }, { "GL_IBM_multimode_draw_arrays", GL_IBM_multimode_draw_arrays_functions }, #ifdef need_GL_ARB_point_parameters diff --git a/src/mesa/drivers/dri/tdfx/tdfx_dd.c b/src/mesa/drivers/dri/tdfx/tdfx_dd.c index 02fbace5be..3dbd24d49b 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_dd.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_dd.c @@ -153,96 +153,6 @@ static void tdfxDDGetBufferSize( GLframebuffer *buffer, } - -/* - * Return the current value of the occlusion test flag and - * reset the flag (hardware counters) to false. - */ -static GLboolean get_occlusion_result( GLcontext *ctx ) -{ - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - GLboolean result; - - LOCK_HARDWARE( fxMesa ); - fxMesa->Glide.grFinish(); /* required to flush the FIFO - FB 21-01-2002 */ - - if (ctx->Depth.OcclusionTest) { - if (ctx->OcclusionResult) { - result = GL_TRUE; /* result of software rendering */ - } - else { - FxI32 zfail, in; - fxMesa->Glide.grGet(GR_STATS_PIXELS_DEPTHFUNC_FAIL, 4, &zfail); - fxMesa->Glide.grGet(GR_STATS_PIXELS_IN, 4, &in); - /* 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; - } - } - else { - result = ctx->OcclusionResultSaved; - } - - /* reset results now */ - fxMesa->Glide.grReset(GR_STATS_PIXELS); - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - - UNLOCK_HARDWARE( fxMesa ); - - return result; -} - - -/* - * We're only implementing this function to handle the - * GL_OCCLUSTION_TEST_RESULT_HP case. It's special because it - * has a side-effect: resetting the occlustion result flag. - */ -static GLboolean tdfxDDGetBooleanv( GLcontext *ctx, GLenum pname, - GLboolean *result ) -{ - if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { - *result = get_occlusion_result( ctx ); - return GL_TRUE; - } - return GL_FALSE; -} - -static GLboolean tdfxDDGetDoublev( GLcontext *ctx, GLenum pname, - GLdouble *result ) -{ - if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { - *result = (GLdouble) get_occlusion_result( ctx ); - return GL_TRUE; - } - return GL_FALSE; -} - -static GLboolean tdfxDDGetFloatv( GLcontext *ctx, GLenum pname, - GLfloat *result ) -{ - if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { - *result = (GLfloat) get_occlusion_result( ctx ); - return GL_TRUE; - } - return GL_FALSE; -} - -static GLboolean tdfxDDGetIntegerv( GLcontext *ctx, GLenum pname, - GLint *result ) -{ - if ( pname == GL_OCCLUSION_TEST_RESULT_HP ) { - *result = (GLint) get_occlusion_result( ctx ); - return GL_TRUE; - } - return GL_FALSE; -} - - - #define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ ((vis->redBits == r) && \ (vis->greenBits == g) && \ @@ -271,11 +181,6 @@ void tdfxDDInitDriverFuncs( const __GLcontextModes *visual, { functions->ReadPixels = tdfx_readpixels_R5G6B5; } - - functions->GetBooleanv = tdfxDDGetBooleanv; - functions->GetDoublev = tdfxDDGetDoublev; - functions->GetFloatv = tdfxDDGetFloatv; - functions->GetIntegerv = tdfxDDGetIntegerv; } |