Mesa (master): mesa: add flag for GL_NV_conditional_render extension
Brian Paul
brianp at kemper.freedesktop.org
Thu Dec 31 15:54:56 UTC 2009
Module: Mesa
Branch: master
Commit: 2be0d77a97cbe92f09dd97fb85a3d5372e52ad4c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2be0d77a97cbe92f09dd97fb85a3d5372e52ad4c
Author: Brian Paul <brianp at vmware.com>
Date: Wed Dec 30 14:49:49 2009 -0700
mesa: add flag for GL_NV_conditional_render extension
---
src/mesa/main/condrender.c | 4 ++--
src/mesa/main/extensions.c | 1 +
src/mesa/main/mtypes.h | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 5276213..4e1989c 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -43,7 +43,7 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
struct gl_query_object *q;
GET_CURRENT_CONTEXT(ctx);
- if (ctx->Query.CondRenderQuery) {
+ if (!ctx->Extensions.NV_conditional_render || ctx->Query.CondRenderQuery) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()");
return;
}
@@ -89,7 +89,7 @@ _mesa_EndConditionalRender(void)
{
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->Query.CondRenderQuery) {
+ if (!ctx->Extensions.NV_conditional_render || !ctx->Query.CondRenderQuery) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glEndConditionalRender()");
return;
}
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 7aec95f..1ccbe13 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -167,6 +167,7 @@ static const struct {
{ OFF, "GL_MESA_ycbcr_texture", F(MESA_ycbcr_texture) },
{ ON, "GL_MESA_window_pos", F(ARB_window_pos) },
{ OFF, "GL_NV_blend_square", F(NV_blend_square) },
+ { OFF, "GL_NV_conditional_render", F(NV_conditional_render) },
{ OFF, "GL_NV_depth_clamp", F(ARB_depth_clamp) },
{ OFF, "GL_NV_fragment_program", F(NV_fragment_program) },
{ OFF, "GL_NV_fragment_program_option", F(NV_fragment_program_option) },
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 1a7f878..a7f70a1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2496,6 +2496,7 @@ struct gl_extensions
GLboolean MESA_texture_array;
GLboolean MESA_texture_signed_rgba;
GLboolean NV_blend_square;
+ GLboolean NV_conditional_render;
GLboolean NV_fragment_program;
GLboolean NV_fragment_program_option;
GLboolean NV_light_max_exponent;
More information about the mesa-commit
mailing list