aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/condrender.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-20 11:09:16 +0200
committerSamuel Pitoiset <[email protected]>2017-08-02 12:54:31 +0200
commit4ded964fed944e76e5c1aef149839567513e5909 (patch)
tree93e8c21df16bc7610b1f7be060a84e4732973424 /src/mesa/main/condrender.c
parent9a0b2033822cbc15181710ec80b2163447553038 (diff)
mesa: add end_conditional_render() render
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/condrender.c')
-rw-r--r--src/mesa/main/condrender.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 24a7f4b6945..051cd8f9629 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);
}