freedreno: Make sure that queries are disabled during shadow blits.
They shouldn't count toward occlusion queries. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8789>
This commit is contained in:
parent
50bac9f3fb
commit
75a4386676
|
@ -346,6 +346,10 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
|
||||||
blit.src.field = (val); \
|
blit.src.field = (val); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
/* Disable occlusion queries during shadow blits. */
|
||||||
|
bool saved_active_queries = ctx->active_queries;
|
||||||
|
pctx->set_active_query_state(pctx, false);
|
||||||
|
|
||||||
/* blit the other levels in their entirety: */
|
/* blit the other levels in their entirety: */
|
||||||
for (unsigned l = 0; l <= prsc->last_level; l++) {
|
for (unsigned l = 0; l <= prsc->last_level; l++) {
|
||||||
if (box && l == level)
|
if (box && l == level)
|
||||||
|
@ -397,6 +401,8 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pctx->set_active_query_state(pctx, saved_active_queries);
|
||||||
|
|
||||||
ctx->in_shadow = false;
|
ctx->in_shadow = false;
|
||||||
|
|
||||||
pipe_resource_reference(&pshadow, NULL);
|
pipe_resource_reference(&pshadow, NULL);
|
||||||
|
|
Loading…
Reference in New Issue