llvmpipe: add queries disabled flag
authorDave Airlie <airlied@redhat.com>
Mon, 2 Dec 2019 04:58:09 +0000 (14:58 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 5 Dec 2019 20:48:30 +0000 (06:48 +1000)
This flag is set when the state tracker request queries
be disabled for meta operations.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_context.h
src/gallium/drivers/llvmpipe/lp_query.c

index 1fd0d0a2dea2331f63e84e88bf3e885ea0497c52..6ce0454538f5d73add2de543d6d54b6bb5f43e6e 100644 (file)
@@ -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 */
index 8fd5ab526142e017315f51616fce60521eb7738f..89e4273bab97ee62cb889b9d3f5ac53661db4f8f 100644 (file)
@@ -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 )