aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-12-02 14:58:56 +1000
committerDave Airlie <[email protected]>2019-12-06 06:48:30 +1000
commitf137672197936c00fae305e53eef12a665bc87ce (patch)
tree2b98b2bbb810271e6339f77de7cc6775c8e93824 /src/gallium
parent3b8e1b3ee4f029764a7f9346323f443b0a83cb3e (diff)
llvmpipe: disable occlusion queries when requested by state tracker
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_query.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c
index 89e4273bab9..a4217368fce 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.c
+++ b/src/gallium/drivers/llvmpipe/lp_query.c
@@ -485,6 +485,8 @@ llvmpipe_set_active_query_state(struct pipe_context *pipe, bool enable)
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
llvmpipe->queries_disabled = !enable;
+ /* for OQs we need to regenerate the fragment shader */
+ llvmpipe->dirty |= LP_NEW_OCCLUSION_QUERY;
}
void llvmpipe_init_query_funcs(struct llvmpipe_context *llvmpipe )
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 695ccb89682..75971f36bb2 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -3348,7 +3348,7 @@ make_variant_key(struct llvmpipe_context *lp,
/* alpha.ref_value is passed in jit_context */
key->flatshade = lp->rasterizer->flatshade;
- if (lp->active_occlusion_queries) {
+ if (lp->active_occlusion_queries && !lp->queries_disabled) {
key->occlusion_count = TRUE;
}