diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-06-24 16:36:03 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-06-24 16:36:03 +0000 |
commit | 73bece9bd29b84ce0e13b73467111fdccbb0af0c (patch) | |
tree | 859da31f3f6cd8f75573565ec8a1659c1aede860 | |
parent | eadb044ac483d5d1960e6010c94c7ff61a136b09 (diff) | |
download | mesa-73bece9bd29b84ce0e13b73467111fdccbb0af0c.tar.gz |
fix HP occlusion testing when using generic span path
-rw-r--r-- | src/mesa/swrast/s_span.c | 16 | ||||
-rw-r--r-- | src/mesa/swrast/s_triangle.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_tritemp.h | 8 |
3 files changed, 13 insertions, 12 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 118cec47e37..3b9a1c8c63c 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.0.2 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -841,7 +841,9 @@ _swrast_write_index_span( GLcontext *ctx, struct sw_span *span) } /* if we get here, something passed the depth test */ - ctx->OcclusionResult = GL_TRUE; + if (ctx->Depth.OcclusionTest) { + ctx->OcclusionResult = GL_TRUE; + } #if FEATURE_ARB_occlusion_query if (ctx->Occlusion.Active) { @@ -1054,7 +1056,9 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span) } /* if we get here, something passed the depth test */ - ctx->OcclusionResult = GL_TRUE; + if (ctx->Depth.OcclusionTest) { + ctx->OcclusionResult = GL_TRUE; + } #if FEATURE_ARB_occlusion_query if (ctx->Occlusion.Active) { @@ -1304,7 +1308,9 @@ _swrast_write_texture_span( GLcontext *ctx, struct sw_span *span) } /* if we get here, some fragments passed the depth test */ - ctx->OcclusionResult = GL_TRUE; + if (ctx->Depth.OcclusionTest) { + ctx->OcclusionResult = GL_TRUE; + } #if FEATURE_ARB_occlusion_query if (ctx->Occlusion.Active) { diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 13d2e0c8ae9..18b7c359c32 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -898,7 +898,6 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span, * Special tri function for occlusion testing */ #define NAME occlusion_zless_triangle -#define DO_OCCLUSION_TEST #define INTERP_Z 1 #define SETUP_CODE \ ASSERT(ctx->Depth.Test); \ diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index d7571f53485..8e905ccddeb 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.0.2 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -221,9 +221,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, oneOverArea = 1.0F / area; } -#ifndef DO_OCCLUSION_TEST - ctx->OcclusionResult = GL_TRUE; -#endif span.facing = ctx->_Facing; /* for 2-sided stencil test */ /* Edge setup. For a triangle strip these could be reused... */ @@ -1179,5 +1176,4 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #undef FixedToDepth -#undef DO_OCCLUSION_TEST #undef NAME |