removed GL_HP_occlusion_test extension
This commit is contained in:
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -890,9 +890,6 @@ _mesa_PopAttrib(void)
|
||||
_mesa_ClearDepth(depth->Clear);
|
||||
_mesa_set_enable(ctx, GL_DEPTH_TEST, depth->Test);
|
||||
_mesa_DepthMask(depth->Mask);
|
||||
if (ctx->Extensions.HP_occlusion_test)
|
||||
_mesa_set_enable(ctx, GL_OCCLUSION_TEST_HP,
|
||||
depth->OcclusionTest);
|
||||
}
|
||||
break;
|
||||
case GL_ENABLE_BIT:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -160,7 +160,6 @@ void _mesa_init_depth( GLcontext * ctx )
|
||||
ctx->Depth.Clear = 1.0;
|
||||
ctx->Depth.Func = GL_LESS;
|
||||
ctx->Depth.Mask = GL_TRUE;
|
||||
ctx->Depth.OcclusionTest = GL_FALSE;
|
||||
|
||||
/* XXX this is now per-framebuffer state */
|
||||
#if 00
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.1
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -70,7 +70,6 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
|
||||
x = IROUND(ctx->Current.RasterPos[0]);
|
||||
y = IROUND(ctx->Current.RasterPos[1]);
|
||||
|
||||
ctx->OcclusionResult = GL_TRUE;
|
||||
ctx->Driver.DrawPixels(ctx, x, y, width, height, format, type,
|
||||
&ctx->Unpack, pixels);
|
||||
}
|
||||
@@ -127,8 +126,6 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
|
||||
destx = IROUND(ctx->Current.RasterPos[0]);
|
||||
desty = IROUND(ctx->Current.RasterPos[1]);
|
||||
|
||||
ctx->OcclusionResult = GL_TRUE;
|
||||
|
||||
ctx->Driver.CopyPixels( ctx, srcx, srcy, width, height, destx, desty,
|
||||
type );
|
||||
}
|
||||
@@ -206,7 +203,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
|
||||
_mesa_update_state(ctx);
|
||||
}
|
||||
|
||||
ctx->OcclusionResult = GL_TRUE;
|
||||
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
|
||||
}
|
||||
#if _HAVE_FULL_GL
|
||||
@@ -271,7 +267,6 @@ _mesa_DrawDepthPixelsMESA( GLsizei width, GLsizei height,
|
||||
x = IROUND(ctx->Current.RasterPos[0]);
|
||||
y = IROUND(ctx->Current.RasterPos[1]);
|
||||
|
||||
ctx->OcclusionResult = GL_TRUE;
|
||||
ctx->Driver.DrawDepthPixelsMESA(ctx, x, y, width, height,
|
||||
colorFormat, colorType, colors,
|
||||
depthType, depths, &ctx->Unpack);
|
||||
|
@@ -5,9 +5,9 @@
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.1
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -687,19 +687,6 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
||||
client_state( ctx, cap, state );
|
||||
return;
|
||||
|
||||
/* GL_HP_occlusion_test */
|
||||
case GL_OCCLUSION_TEST_HP:
|
||||
CHECK_EXTENSION(HP_occlusion_test, cap);
|
||||
if (ctx->Depth.OcclusionTest == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
ctx->Depth.OcclusionTest = state;
|
||||
if (state)
|
||||
ctx->OcclusionResult = ctx->OcclusionResultSaved;
|
||||
else
|
||||
ctx->OcclusionResultSaved = ctx->OcclusionResult;
|
||||
break;
|
||||
|
||||
/* GL_SGIS_pixel_texture */
|
||||
case GL_PIXEL_TEXTURE_SGIS:
|
||||
CHECK_EXTENSION(SGIS_pixel_texture, cap);
|
||||
@@ -1255,11 +1242,6 @@ _mesa_IsEnabled( GLenum cap )
|
||||
CHECK_EXTENSION(EXT_histogram);
|
||||
return ctx->Pixel.MinMaxEnabled;
|
||||
|
||||
/* GL_HP_occlusion_test */
|
||||
case GL_OCCLUSION_TEST_HP:
|
||||
CHECK_EXTENSION(HP_occlusion_test);
|
||||
return ctx->Depth.OcclusionTest;
|
||||
|
||||
/* GL_SGIS_pixel_texture */
|
||||
case GL_PIXEL_TEXTURE_SGIS:
|
||||
CHECK_EXTENSION(SGIS_pixel_texture);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -129,7 +129,6 @@ static const struct {
|
||||
{ OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
|
||||
{ OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)},
|
||||
{ OFF, "GL_ATI_fragment_shader", F(ATI_fragment_shader)},
|
||||
{ OFF, "GL_HP_occlusion_test", F(HP_occlusion_test) },
|
||||
{ OFF, "GL_IBM_multimode_draw_arrays", F(IBM_multimode_draw_arrays) },
|
||||
{ ON, "GL_IBM_rasterpos_clip", F(IBM_rasterpos_clip) },
|
||||
{ OFF, "GL_IBM_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
|
||||
@@ -247,7 +246,6 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
|
||||
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
|
||||
ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE;
|
||||
ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
|
||||
ctx->Extensions.HP_occlusion_test = GL_TRUE;
|
||||
ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;
|
||||
ctx->Extensions.MESA_pack_invert = GL_TRUE;
|
||||
#if FEATURE_MESA_program_debug
|
||||
|
@@ -1179,24 +1179,6 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
|
||||
}
|
||||
break;
|
||||
case GL_OCCLUSION_TEST_HP:
|
||||
CHECK_EXTENSION_B(HP_occlusion_test, pname);
|
||||
params[0] = ctx->Depth.OcclusionTest;
|
||||
break;
|
||||
case GL_OCCLUSION_TEST_RESULT_HP:
|
||||
CHECK_EXTENSION_B(HP_occlusion_test, pname);
|
||||
{
|
||||
FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
if (ctx->Depth.OcclusionTest)
|
||||
params[0] = ctx->OcclusionResult;
|
||||
else
|
||||
params[0] = ctx->OcclusionResultSaved;
|
||||
/* reset flag now */
|
||||
ctx->OcclusionResult = GL_FALSE;
|
||||
ctx->OcclusionResultSaved = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_PIXEL_TEXTURE_SGIS:
|
||||
CHECK_EXTENSION_B(SGIS_pixel_texture, pname);
|
||||
params[0] = ctx->Pixel.PixelTextureEnabled;
|
||||
@@ -3024,24 +3006,6 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
params[15] = matrix[15];
|
||||
}
|
||||
break;
|
||||
case GL_OCCLUSION_TEST_HP:
|
||||
CHECK_EXTENSION_F(HP_occlusion_test, pname);
|
||||
params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.OcclusionTest);
|
||||
break;
|
||||
case GL_OCCLUSION_TEST_RESULT_HP:
|
||||
CHECK_EXTENSION_F(HP_occlusion_test, pname);
|
||||
{
|
||||
FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
if (ctx->Depth.OcclusionTest)
|
||||
params[0] = ctx->OcclusionResult;
|
||||
else
|
||||
params[0] = ctx->OcclusionResultSaved;
|
||||
/* reset flag now */
|
||||
ctx->OcclusionResult = GL_FALSE;
|
||||
ctx->OcclusionResultSaved = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_PIXEL_TEXTURE_SGIS:
|
||||
CHECK_EXTENSION_F(SGIS_pixel_texture, pname);
|
||||
params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PixelTextureEnabled);
|
||||
@@ -4869,24 +4833,6 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
params[15] = IROUND(matrix[15]);
|
||||
}
|
||||
break;
|
||||
case GL_OCCLUSION_TEST_HP:
|
||||
CHECK_EXTENSION_I(HP_occlusion_test, pname);
|
||||
params[0] = BOOLEAN_TO_INT(ctx->Depth.OcclusionTest);
|
||||
break;
|
||||
case GL_OCCLUSION_TEST_RESULT_HP:
|
||||
CHECK_EXTENSION_I(HP_occlusion_test, pname);
|
||||
{
|
||||
FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
if (ctx->Depth.OcclusionTest)
|
||||
params[0] = ctx->OcclusionResult;
|
||||
else
|
||||
params[0] = ctx->OcclusionResultSaved;
|
||||
/* reset flag now */
|
||||
ctx->OcclusionResult = GL_FALSE;
|
||||
ctx->OcclusionResultSaved = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_PIXEL_TEXTURE_SGIS:
|
||||
CHECK_EXTENSION_I(SGIS_pixel_texture, pname);
|
||||
params[0] = BOOLEAN_TO_INT(ctx->Pixel.PixelTextureEnabled);
|
||||
|
@@ -558,21 +558,6 @@ StateVars = [
|
||||
"matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"],
|
||||
"const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;", None ),
|
||||
|
||||
# GL_HP_occlusion_test
|
||||
( "GL_OCCLUSION_TEST_HP", GLboolean, ["ctx->Depth.OcclusionTest"], "",
|
||||
"HP_occlusion_test" ),
|
||||
( "GL_OCCLUSION_TEST_RESULT_HP", GLboolean, [],
|
||||
"""FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
if (ctx->Depth.OcclusionTest)
|
||||
params[0] = ctx->OcclusionResult;
|
||||
else
|
||||
params[0] = ctx->OcclusionResultSaved;
|
||||
/* reset flag now */
|
||||
ctx->OcclusionResult = GL_FALSE;
|
||||
ctx->OcclusionResultSaved = GL_FALSE;
|
||||
return;""",
|
||||
"HP_occlusion_test" ),
|
||||
|
||||
# GL_SGIS_pixel_texture
|
||||
( "GL_PIXEL_TEXTURE_SGIS", GLboolean, ["ctx->Pixel.PixelTextureEnabled"],
|
||||
"", "SGIS_pixel_texture" ),
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -584,7 +584,6 @@ struct gl_depthbuffer_attrib
|
||||
GLclampd Clear; /**< Value to clear depth buffer to */
|
||||
GLboolean Test; /**< Depth buffering enabled flag */
|
||||
GLboolean Mask; /**< Depth buffer writable? */
|
||||
GLboolean OcclusionTest; /**< GL_HP_occlusion_test */
|
||||
GLboolean BoundsTest; /**< GL_EXT_depth_bounds_test */
|
||||
GLfloat BoundsMin, BoundsMax;/**< GL_EXT_depth_bounds_test */
|
||||
};
|
||||
@@ -2358,7 +2357,6 @@ struct gl_extensions
|
||||
GLboolean ATI_texture_mirror_once;
|
||||
GLboolean ATI_texture_env_combine3;
|
||||
GLboolean ATI_fragment_shader;
|
||||
GLboolean HP_occlusion_test;
|
||||
GLboolean IBM_rasterpos_clip;
|
||||
GLboolean IBM_multimode_draw_arrays;
|
||||
GLboolean MESA_pack_invert;
|
||||
@@ -2836,8 +2834,6 @@ struct __GLcontextRec
|
||||
struct gl_list_extensions ListExt; /**< driver dlist extensions */
|
||||
|
||||
|
||||
GLboolean OcclusionResult; /**< for GL_HP_occlusion_test */
|
||||
GLboolean OcclusionResultSaved; /**< for GL_HP_occlusion_test */
|
||||
GLuint _Facing; /**< This is a hack for 2-sided stencil test.
|
||||
*
|
||||
* We don't have a better way to communicate this value from
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.0.2
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -325,8 +325,6 @@ _mesa_init_occlude(GLcontext *ctx)
|
||||
#if FEATURE_ARB_occlusion_query
|
||||
ctx->Occlusion.QueryObjects = _mesa_NewHashTable();
|
||||
#endif
|
||||
ctx->OcclusionResult = GL_FALSE;
|
||||
ctx->OcclusionResultSaved = GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -128,10 +128,6 @@
|
||||
ltor = (GLboolean) (area < 0.0F);
|
||||
}
|
||||
|
||||
#ifndef DO_OCCLUSION_TEST
|
||||
ctx->OcclusionResult = GL_TRUE;
|
||||
#endif
|
||||
|
||||
/* Plane equation setup:
|
||||
* We evaluate plane equations at window (x,y) coordinates in order
|
||||
* to compute color, Z, fog, texcoords, etc. This isn't terribly
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -80,7 +80,7 @@ _swrast_update_rasterflags( GLcontext *ctx )
|
||||
rasterMask |= CLIP_BIT;
|
||||
}
|
||||
|
||||
if (ctx->Depth.OcclusionTest || ctx->Occlusion.Active)
|
||||
if (ctx->Occlusion.Active)
|
||||
rasterMask |= OCCLUSION_BIT;
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -849,11 +849,6 @@ _swrast_write_index_span( GLcontext *ctx, struct sw_span *span)
|
||||
}
|
||||
}
|
||||
|
||||
/* if we get here, something passed the depth test */
|
||||
if (ctx->Depth.OcclusionTest) {
|
||||
ctx->OcclusionResult = GL_TRUE;
|
||||
}
|
||||
|
||||
#if FEATURE_ARB_occlusion_query
|
||||
if (ctx->Occlusion.Active) {
|
||||
/* update count of 'passed' fragments */
|
||||
@@ -1219,11 +1214,6 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span)
|
||||
}
|
||||
}
|
||||
|
||||
/* if we get here, some fragments passed the depth test */
|
||||
if (ctx->Depth.OcclusionTest) {
|
||||
ctx->OcclusionResult = GL_TRUE;
|
||||
}
|
||||
|
||||
#if FEATURE_ARB_occlusion_query
|
||||
if (ctx->Occlusion.Active) {
|
||||
/* update count of 'passed' fragments */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -910,7 +910,7 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
|
||||
ASSERT(ctx->Depth.Test); \
|
||||
ASSERT(!ctx->Depth.Mask); \
|
||||
ASSERT(ctx->Depth.Func == GL_LESS); \
|
||||
if (ctx->OcclusionResult && !ctx->Occlusion.Active) { \
|
||||
if (!ctx->Occlusion.Active) { \
|
||||
return; \
|
||||
}
|
||||
#define RENDER_SPAN( span ) \
|
||||
@@ -921,7 +921,6 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
|
||||
for (i = 0; i < span.end; i++) { \
|
||||
GLdepth z = FixedToDepth(span.z); \
|
||||
if (z < zRow[i]) { \
|
||||
ctx->OcclusionResult = GL_TRUE; \
|
||||
ctx->Occlusion.PassedCounter++; \
|
||||
} \
|
||||
span.z += span.zStep; \
|
||||
@@ -933,7 +932,6 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
|
||||
rb->GetPointer(ctx, rb, span.x, span.y); \
|
||||
for (i = 0; i < span.end; i++) { \
|
||||
if ((GLuint)span.z < zRow[i]) { \
|
||||
ctx->OcclusionResult = GL_TRUE; \
|
||||
ctx->Occlusion.PassedCounter++; \
|
||||
} \
|
||||
span.z += span.zStep; \
|
||||
@@ -1057,7 +1055,7 @@ _swrast_choose_triangle( GLcontext *ctx )
|
||||
}
|
||||
|
||||
/* special case for occlusion testing */
|
||||
if ((ctx->Depth.OcclusionTest || ctx->Occlusion.Active) &&
|
||||
if (ctx->Occlusion.Active &&
|
||||
ctx->Depth.Test &&
|
||||
ctx->Depth.Mask == GL_FALSE &&
|
||||
ctx->Depth.Func == GL_LESS &&
|
||||
|
@@ -1,9 +1,8 @@
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 5.1
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -133,7 +132,6 @@ do { \
|
||||
#define TAG(x) clip_##x##_verts
|
||||
#define INIT(x) tnl->Driver.Render.PrimitiveNotify( ctx, x )
|
||||
#define RESET_STIPPLE if (stipple) tnl->Driver.Render.ResetLineStipple( ctx )
|
||||
#define RESET_OCCLUSION ctx->OcclusionResult = GL_TRUE
|
||||
#define PRESERVE_VB_DEFS
|
||||
#include "t_vb_rendertmp.h"
|
||||
|
||||
@@ -220,7 +218,6 @@ static void clip_elt_triangles( GLcontext *ctx,
|
||||
(void) elt; (void) stipple
|
||||
|
||||
#define RESET_STIPPLE if (stipple) tnl->Driver.Render.ResetLineStipple( ctx )
|
||||
#define RESET_OCCLUSION ctx->OcclusionResult = GL_TRUE
|
||||
#define INIT(x) tnl->Driver.Render.PrimitiveNotify( ctx, x )
|
||||
#define RENDER_TAB_QUALIFIER
|
||||
#define PRESERVE_VB_DEFS
|
||||
|
@@ -1,9 +1,8 @@
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 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"),
|
||||
@@ -45,10 +44,6 @@
|
||||
#define RESET_STIPPLE
|
||||
#endif
|
||||
|
||||
#ifndef RESET_OCCLUSION
|
||||
#define RESET_OCCLUSION
|
||||
#endif
|
||||
|
||||
#ifndef TEST_PRIM_END
|
||||
#define TEST_PRIM_END(flags) (flags & PRIM_END)
|
||||
#define TEST_PRIM_BEGIN(flags) (flags & PRIM_BEGIN)
|
||||
@@ -70,7 +65,6 @@ static void TAG(render_points)( GLcontext *ctx,
|
||||
LOCAL_VARS;
|
||||
(void) flags;
|
||||
|
||||
RESET_OCCLUSION;
|
||||
INIT(GL_POINTS);
|
||||
RENDER_POINTS( start, count );
|
||||
POSTFIX;
|
||||
@@ -85,7 +79,6 @@ static void TAG(render_lines)( GLcontext *ctx,
|
||||
LOCAL_VARS;
|
||||
(void) flags;
|
||||
|
||||
RESET_OCCLUSION;
|
||||
INIT(GL_LINES);
|
||||
for (j=start+1; j<count; j+=2 ) {
|
||||
RESET_STIPPLE;
|
||||
@@ -104,7 +97,6 @@ static void TAG(render_line_strip)( GLcontext *ctx,
|
||||
LOCAL_VARS;
|
||||
(void) flags;
|
||||
|
||||
RESET_OCCLUSION;
|
||||
INIT(GL_LINE_STRIP);
|
||||
|
||||
if (TEST_PRIM_BEGIN(flags)) {
|
||||
@@ -128,7 +120,6 @@ static void TAG(render_line_loop)( GLcontext *ctx,
|
||||
|
||||
(void) flags;
|
||||
|
||||
RESET_OCCLUSION;
|
||||
INIT(GL_LINE_LOOP);
|
||||
|
||||
if (start+1 < count) {
|
||||
|
Reference in New Issue
Block a user