From ab14915dce41b26faabba878446b0ec0c8734434 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 7 Nov 2011 17:31:49 +0000 Subject: llvmpipe: add NV_conditional_render support. This ports the softpipe NV_conditional_render support to llvmpipe. This passes the nv_conditional_render-* piglit tests. Signed-off-by: Dave Airlie --- src/gallium/drivers/llvmpipe/lp_context.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gallium/drivers/llvmpipe/lp_context.c') diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 8a5655d4996..b6ac068f027 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -142,6 +142,17 @@ do_flush( struct pipe_context *pipe, } +static void +llvmpipe_render_condition ( struct pipe_context *pipe, + struct pipe_query *query, + uint mode ) +{ + struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe ); + + llvmpipe->render_cond_query = query; + llvmpipe->render_cond_mode = mode; +} + struct pipe_context * llvmpipe_create_context( struct pipe_screen *screen, void *priv ) { @@ -170,6 +181,8 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) llvmpipe->pipe.clear = llvmpipe_clear; llvmpipe->pipe.flush = do_flush; + llvmpipe->pipe.render_condition = llvmpipe_render_condition; + llvmpipe_init_blend_funcs(llvmpipe); llvmpipe_init_clip_funcs(llvmpipe); llvmpipe_init_draw_funcs(llvmpipe); -- cgit v1.2.3