From 3b8e1b3ee4f029764a7f9346323f443b0a83cb3e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 2 Dec 2019 14:58:09 +1000 Subject: [PATCH] llvmpipe: add queries disabled flag This flag is set when the state tracker request queries be disabled for meta operations. Reviewed-by: Roland Scheidegger --- src/gallium/drivers/llvmpipe/lp_context.h | 2 ++ src/gallium/drivers/llvmpipe/lp_query.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h index 1fd0d0a2dea..6ce0454538f 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.h +++ b/src/gallium/drivers/llvmpipe/lp_context.h @@ -103,6 +103,8 @@ struct llvmpipe_context { unsigned active_occlusion_queries; + bool queries_disabled; + unsigned dirty; /**< Mask of LP_NEW_x flags */ unsigned cs_dirty; /**< Mask of LP_CSNEW_x flags */ /** Mapped vertex buffers */ diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c index 8fd5ab52614..89e4273bab9 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.c +++ b/src/gallium/drivers/llvmpipe/lp_query.c @@ -482,6 +482,9 @@ llvmpipe_check_render_cond(struct llvmpipe_context *lp) static void llvmpipe_set_active_query_state(struct pipe_context *pipe, bool enable) { + struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); + + llvmpipe->queries_disabled = !enable; } void llvmpipe_init_query_funcs(struct llvmpipe_context *llvmpipe ) -- 2.30.2