llvmpipe/query: add support for partial query waits.

Without overlap, the fence should always be signalled so this
won't be hit, but once overlap is enabled, then cases will start
to fail due to missing this.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14923>
This commit is contained in:
Dave Airlie 2022-02-11 15:01:06 +10:00 committed by Marge Bot
parent 2b658dea03
commit 7ae32fdb9a

View file

@ -238,6 +238,10 @@ llvmpipe_get_query_result_resource(struct pipe_context *pipe,
else {
unsigned i;
/* don't write a value if fence hasn't signalled,
and partial isn't set . */
if (unsignalled && !(flags & PIPE_QUERY_PARTIAL))
return;
switch (pq->type) {
case PIPE_QUERY_OCCLUSION_COUNTER:
for (i = 0; i < num_threads; i++) {