mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
fix HP occlusion testing when using generic span path
This commit is contained in:
parent
de67b3ea18
commit
939dd17653
3 changed files with 12 additions and 8 deletions
|
|
@ -939,10 +939,13 @@ _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) {
|
||||
/* update count of 'passed' fragments */
|
||||
GLuint i;
|
||||
for (i = 0; i < span->end; i++)
|
||||
ctx->Occlusion.PassedCounter += span->array->mask[i];
|
||||
|
|
@ -1155,10 +1158,13 @@ _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) {
|
||||
/* update count of 'passed' fragments */
|
||||
GLuint i;
|
||||
for (i = 0; i < span->end; i++)
|
||||
ctx->Occlusion.PassedCounter += span->array->mask[i];
|
||||
|
|
@ -1423,10 +1429,13 @@ _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) {
|
||||
/* update count of 'passed' fragments */
|
||||
GLuint i;
|
||||
for (i = 0; i < span->end; i++)
|
||||
ctx->Occlusion.PassedCounter += span->array->mask[i];
|
||||
|
|
|
|||
|
|
@ -900,7 +900,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); \
|
||||
|
|
|
|||
|
|
@ -304,9 +304,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... */
|
||||
|
|
@ -1329,5 +1326,4 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
|
|||
#undef InterpToInt
|
||||
#undef INTERP_ONE
|
||||
|
||||
#undef DO_OCCLUSION_TEST
|
||||
#undef NAME
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue