aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-12-02 14:58:09 +1000
committerDave Airlie <[email protected]>2019-12-06 06:48:30 +1000
commit3b8e1b3ee4f029764a7f9346323f443b0a83cb3e (patch)
tree7d5a92253a60df2cd5d1855ea8a62757c8738422 /src/gallium
parentef893db468c60e1ab57ba5fa1677b3d34f09833e (diff)
llvmpipe: add queries disabled flag
This flag is set when the state tracker request queries be disabled for meta operations. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_query.c3
2 files changed, 5 insertions, 0 deletions
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 )