mesa: add flag for GL_NV_conditional_render extension
authorBrian Paul <brianp@vmware.com>
Wed, 30 Dec 2009 21:49:49 +0000 (14:49 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 31 Dec 2009 15:49:26 +0000 (08:49 -0700)
src/mesa/main/condrender.c
src/mesa/main/extensions.c
src/mesa/main/mtypes.h

index 52762133a0ee1c43fd5a7e1e764e9bcb5b64c1ef..4e1989c8697f8c8a8bca72e9e93f8772ec8574a0 100644 (file)
@@ -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;
    }
index 7aec95f0480ea707ae73dad88ddc4426770a0780..1ccbe13d6579621ca2a0543a662d511e127a82fa 100644 (file)
@@ -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) },
index 1a7f87897a12105de9e9bb57d53b3f3e0434c292..a7f70a1875ba958f27c96cb73aca550bb07efcd6 100644 (file)
@@ -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;