mesa: add ARB_conditional_render_inverted flags
authorTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Sat, 16 Aug 2014 01:25:28 +0000 (03:25 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 19 Aug 2014 12:54:35 +0000 (08:54 -0400)
Also add an extension bit so we can safely enable

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
src/mesa/main/condrender.c
src/mesa/main/extensions.c
src/mesa/main/mtypes.h

index 0ad1e5c2aee1e1f8bc9840090496c75567d8afa0..54cd423fa9411a411f7768f0db17514ec5f49a28 100644 (file)
@@ -77,8 +77,14 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
    case GL_QUERY_NO_WAIT:
    case GL_QUERY_BY_REGION_WAIT:
    case GL_QUERY_BY_REGION_NO_WAIT:
-      /* OK */
-      break;
+      break; /* OK */
+   case GL_QUERY_WAIT_INVERTED:
+   case GL_QUERY_NO_WAIT_INVERTED:
+   case GL_QUERY_BY_REGION_WAIT_INVERTED:
+   case GL_QUERY_BY_REGION_NO_WAIT_INVERTED:
+      if (ctx->Extensions.ARB_conditional_render_inverted)
+         break; /* OK */
+      /* fallthrough - invalid */
    default:
       _mesa_error(ctx, GL_INVALID_ENUM, "glBeginConditionalRender(mode=%s)",
                   _mesa_lookup_enum_by_nr(mode));
index c5bd7b3e9170981c6fcd952155cbf773d2ae1660..553c01e343beacff0c0cc96731847f824f8febda 100644 (file)
@@ -94,6 +94,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_color_buffer_float",                  o(ARB_color_buffer_float),                  GL,             2004 },
    { "GL_ARB_compressed_texture_pixel_storage",    o(dummy_true),                              GL,             2011 },
    { "GL_ARB_compute_shader",                      o(ARB_compute_shader),                      GL,             2012 },
+   { "GL_ARB_conditional_render_inverted",         o(ARB_conditional_render_inverted),         GL,             2014 },
    { "GL_ARB_copy_buffer",                         o(dummy_true),                              GL,             2008 },
    { "GL_ARB_copy_image",                          o(ARB_copy_image),                          GL,             2012 },
    { "GL_ARB_conservative_depth",                  o(ARB_conservative_depth),                  GL,             2011 },
index 97b1ad29b1c1dbc76e90190ba336e2f05aa6ce4e..cb2a4df4f2f464073331e33de03a7181bff459cd 100644 (file)
@@ -3553,6 +3553,7 @@ struct gl_extensions
    GLboolean ARB_clear_texture;
    GLboolean ARB_color_buffer_float;
    GLboolean ARB_compute_shader;
+   GLboolean ARB_conditional_render_inverted;
    GLboolean ARB_conservative_depth;
    GLboolean ARB_copy_image;
    GLboolean ARB_depth_buffer_float;