From f7fda86c6dcb7894157bd35a0cf15d003d48b441 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 22 Jul 2003 03:34:54 +0000 Subject: Implement debugger callback, etc for vertex programs. Misc clean-ups. --- src/mesa/main/get.c | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) (limited to 'src/mesa/main/get.c') diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 3cf8453..3e02c99 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -136,14 +136,16 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) if (!params) return; - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glGetBooleanv %s\n", _mesa_lookup_enum_by_nr(pname)); + if (!ctx->_CurrentProgram) { + /* We need this in order to get correct results for + * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. + */ + FLUSH_VERTICES(ctx, 0); + } + if (ctx->Driver.GetBooleanv && (*ctx->Driver.GetBooleanv)(ctx, pname, params)) return; @@ -1679,14 +1681,16 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) if (!params) return; - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glGetDoublev %s\n", _mesa_lookup_enum_by_nr(pname)); + if (!ctx->_CurrentProgram) { + /* We need this in order to get correct results for + * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. + */ + FLUSH_VERTICES(ctx, 0); + } + if (ctx->Driver.GetDoublev && (*ctx->Driver.GetDoublev)(ctx, pname, params)) return; @@ -3216,14 +3220,16 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) if (!params) return; - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glGetFloatv %s\n", _mesa_lookup_enum_by_nr(pname)); + if (!ctx->_CurrentProgram) { + /* We need this in order to get correct results for + * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. + */ + FLUSH_VERTICES(ctx, 0); + } + if (ctx->Driver.GetFloatv && (*ctx->Driver.GetFloatv)(ctx, pname, params)) return; @@ -4729,19 +4735,19 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) if (!params) return; -#if 0 - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glGetIntegerv %s\n", _mesa_lookup_enum_by_nr(pname)); + if (!ctx->_CurrentProgram) { + /* We need this in order to get correct results for + * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. + */ + FLUSH_VERTICES(ctx, 0); + } + if (ctx->Driver.GetIntegerv && (*ctx->Driver.GetIntegerv)(ctx, pname, params)) return; -#endif switch (pname) { case GL_ACCUM_RED_BITS: -- cgit v1.1