need to flush vertices for GL_OCCLUSION_TEST_RESULT_HP query
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 15 Jul 2005 23:08:06 +0000 (23:08 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 15 Jul 2005 23:08:06 +0000 (23:08 +0000)
src/mesa/main/get.c
src/mesa/main/get_gen.py

index fcc879576ce8f08213dfcf98010536ee21aeb0f9..bfeb1d6d2a232e9cc02cc2446bd2df84056a1da2 100644 (file)
@@ -1186,6 +1186,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
       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
@@ -3030,6 +3031,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
       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
@@ -4874,6 +4876,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
       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
index 9f1be8b9350ec7c84df66a57cfde5c304db3395a..4eedc03c7a831e8c2da3e2467a9c6109d58fb0cf 100644 (file)
@@ -562,7 +562,8 @@ StateVars = [
        ( "GL_OCCLUSION_TEST_HP", GLboolean, ["ctx->Depth.OcclusionTest"], "",
          "HP_occlusion_test" ),
        ( "GL_OCCLUSION_TEST_RESULT_HP", GLboolean, [],
-         """if (ctx->Depth.OcclusionTest)
+         """FLUSH_VERTICES(ctx, _NEW_DEPTH);
+         if (ctx->Depth.OcclusionTest)
             params[0] = ctx->OcclusionResult;
          else
             params[0] = ctx->OcclusionResultSaved;