[Mesa-dev] [PATCH 084/101] mesa: add end_conditional_render() render

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:40:33 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mesa/main/condrender.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 24a7f4b694..051cd8f962 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -133,23 +133,30 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
 }
 
 
+static void
+end_conditional_render(struct gl_context *ctx)
+{
+   FLUSH_VERTICES(ctx, 0x0);
+
+   if (ctx->Driver.EndConditionalRender)
+      ctx->Driver.EndConditionalRender(ctx, ctx->Query.CondRenderQuery);
+
+   ctx->Query.CondRenderQuery = NULL;
+   ctx->Query.CondRenderMode = GL_NONE;
+}
+
+
 void APIENTRY
 _mesa_EndConditionalRender(void)
 {
    GET_CURRENT_CONTEXT(ctx);
 
-   FLUSH_VERTICES(ctx, 0x0);
-
    if (!ctx->Extensions.NV_conditional_render || !ctx->Query.CondRenderQuery) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glEndConditionalRender()");
       return;
    }
 
-   if (ctx->Driver.EndConditionalRender)
-      ctx->Driver.EndConditionalRender(ctx, ctx->Query.CondRenderQuery);
-
-   ctx->Query.CondRenderQuery = NULL;
-   ctx->Query.CondRenderMode = GL_NONE;
+   end_conditional_render(ctx);
 }
 
 
-- 
2.13.3



More information about the mesa-dev mailing list